From 37e14e8bf3c17b57fc3dd1ada14a690b6b5abd3a Mon Sep 17 00:00:00 2001 From: jstolp Date: Mon, 2 Mar 2020 15:18:31 +0100 Subject: enhance lsof notes --- debug.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'debug.txt') diff --git a/debug.txt b/debug.txt index 5b97a65..87ca483 100644 --- a/debug.txt +++ b/debug.txt @@ -32,9 +32,13 @@ strace -f -p -e signal # lsof(8) # -lsof +fg -p - -p ... list open files for process +lsof + -a ......... AND slection filters instead ORing (OR: default) + -p ... list open file descriptors for process +fg ........ show file flags for file descripros + -n ......... don't convert network addr to hostnames + -P ......... dont' convert network port to know service names + -i <@h[:p]>. show connections to h (hostname|ip addr) with optional port p file flags: R/W/RW ..... read/write/read-write @@ -46,6 +50,11 @@ uase cases: - show open files with file flags lsof +fg -p +- show open tcp connections from user +lsof -a -u $USER -i tcp + +- show open connections to 'localhost' for user +lsof -a -u $USER -i @localhost # # pmap(1) -- cgit v1.2.3