aboutsummaryrefslogtreecommitdiffhomepage
path: root/debug.txt
diff options
context:
space:
mode:
authorjstolp <jstolp@synopsys.com>2020-03-02 15:18:31 +0100
committerjstolp <jstolp@synopsys.com>2020-03-02 15:18:31 +0100
commit37e14e8bf3c17b57fc3dd1ada14a690b6b5abd3a (patch)
treef58570641f0c5c417c0fe506a26b2de459f6171a /debug.txt
parent1ebf7220454e5912dedbfc7d67b73d7937e302ca (diff)
downloadnotes-37e14e8bf3c17b57fc3dd1ada14a690b6b5abd3a.tar.gz
notes-37e14e8bf3c17b57fc3dd1ada14a690b6b5abd3a.zip
enhance lsof notes
Diffstat (limited to 'debug.txt')
-rw-r--r--debug.txt13
1 files changed, 11 insertions, 2 deletions
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 <pid> -e signal
# lsof(8)
#
-lsof +fg -p <pid>
- -p <pid> ... list open files for process
+lsof
+ -a ......... AND slection filters instead ORing (OR: default)
+ -p <pid> ... 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 <pid>
+- 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)