DOKK / manpages / debian 12 / bpfcc-tools / spfdsnoop-bpfcc.8.en
sofdsnoop(8) System Manager's Manual sofdsnoop(8)

sofdsnoop - Trace FDs passed through unix sockets. Uses Linux eBPF/bcc.

sofdsnoop [-h] [-T] [-p PID] [-t TID] [-n NAME] [-d DURATION]

sofdsnoop traces FDs passed through unix sockets

Every file descriptor that is passed via unix sockets os displayed on separate line together with process info (TID/COMM columns), ACTION details (SEND/RECV), file descriptor number (FD) and its translation to file if available (NAME).

Since this uses BPF, only the root user can use this tool.

CONFIG_BPF and bcc.

Print usage message.
Include a timestamp column.
Trace this process ID only (filtered in-kernel).
Trace this thread ID only (filtered in-kernel).
Total duration of trace in seconds.
Only print command lines matching this command name (regex)

# sofdsnoop
# sofdsnoop -T
# sofdsnoop -n server

Time of SEDN/RECV actions, in seconds.
Operation on the fd SEND/RECV.
Process TID
Parent process/command name.
The socket carrier.
file descriptor number
file name for SEND lines

This is from bcc.

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file containing example usage, output, and commentary for this tool.

Linux

Unstable - in development.

Jiri Olsa

opensnoop(1)

2018-11-08 USER COMMANDS