From: Masatake YAMATO Date: Fri, 8 Nov 2024 19:47:51 +0000 (+0900) Subject: lsfd: (man) add more filter examples related to unix stream sockets X-Git-Tag: v2.42-start~157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd39081e3a6a7857efa29bad0ef6663955f67a84;p=thirdparty%2Futil-linux.git lsfd: (man) add more filter examples related to unix stream sockets 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 --- diff --git a/lsfd-cmd/lsfd.1.adoc b/lsfd-cmd/lsfd.1.adoc index 915bfa36d..71078f493 100644 --- a/lsfd-cmd/lsfd.1.adoc +++ b/lsfd-cmd/lsfd.1.adoc @@ -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: ::