]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (man) add more filter examples related to unix stream sockets
authorMasatake YAMATO <yamato@redhat.com>
Fri, 8 Nov 2024 19:47:51 +0000 (04:47 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 8 Nov 2024 19:48:07 +0000 (04:48 +0900)
Inspired by the blog article:
https://blog.fraggod.net/2024/08/06/list-connected-processes-for-unix-sockets-on-linux.html

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
lsfd-cmd/lsfd.1.adoc

index 915bfa36d1bd5a4617fb9b3a863882f16b650bdd..71078f493f80c6f764339451b264d944a1155e32 100644 (file)
@@ -666,6 +666,16 @@ List timerfd files expired within 0.5 seconds: ::
 # lsfd -Q '(TIMERFD.remaining < 0.5) and (TIMERFD.remaining > 0.0)'
 ....
 
+List processes communicating via unix stream sockets: ::
+....
+# lsfd  -Q 'TYPE == "UNIX-STREAM" && UNIX.PATH =~ ".+"' -oUNIX.PATH,PID,COMMAND,FD,SOCK.STATE,ENDPOINTS
+....
+
+List processes communicating via a specified unix stream socket: ::
+....
+# lsfd  -Q 'TYPE == "UNIX-STREAM" && UNIX.PATH == "@/tmp/.X11-unix/X0"' -oUNIX.PATH,PID,COMMAND,FD,SOCK.STATE,ENDPOINTS
+....
+
 == COUNTER EXAMPLES
 
 Report the numbers of netlink socket descriptors and unix socket descriptors: ::