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

shmsnoop - Trace System V shared memory syscalls. Uses Linux eBPF/bcc.

shmsnoop [-h] [-T] [-p] [-t] [-d DURATION] [-n NAME]

shmsnoop traces System V shared memory syscalls: shmget, shmat, shmdt, shmctl

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)

# shmsnoop
# shmsnoop -T
# shmsnoop -n server

Time of shm syscall return, in seconds.
Process ID
Process/command name.
Return value of shm syscall.
"arg: value" couples that represent given syscall arguments as described in their manpage

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-09-24 USER COMMANDS