shmsnoop(8) System Manager's Manual shmsnoop(8)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#DESCRIPTION)

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

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

# [REQUIREMENTS](#REQUIREMENTS)

CONFIG\_BPF and bcc.

# [OPTIONS](#OPTIONS)

[-h](#h)

Print usage message.

[-T](#T)

Include a timestamp column.

[-p PID](#p)

Trace this process ID only (filtered in-kernel).

[-t TID](#t)

Trace this thread ID only (filtered in-kernel).

[-d DURATION](#d)

Total duration of trace in seconds.

[-n NAME](#n)

Only print command lines matching this command name (regex)

# [EXAMPLES](#EXAMPLES)

[Trace all shm* syscalls:](#Trace)

\# **shmsnoop**

[Trace all shm* syscalls, and include timestamps:](#Trace~2)

\# **shmsnoop -T**

[Only trace shm* syscalls where the process contains "server":](#Only)

\# **shmsnoop -n server**

# [FIELDS](#FIELDS)

[TIME(s)](#TIME%28s%29)

Time of shm syscall return, in seconds.

[PID](#PID)

Process ID

[COMM](#COMM)

Process/command name.

[RET](#RET)

Return value of shm syscall.

[ARGS](#ARGS)

"arg: value" couples that represent given syscall arguments as described in their manpage

# [SOURCE](#SOURCE)

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.

# [OS](#OS)

Linux

# [STABILITY](#STABILITY)

Unstable - in development.

# [AUTHOR](#AUTHOR)

Jiri Olsa

# [SEE ALSO](#SEE_ALSO)

[opensnoop(1)](/man/enterprise-packages/bcc/opensnoop.1)

2018-09-24 USER COMMANDS

---

Document: shmsnoop(8) from bcc 0.37.0-r2 (Chainguard OS)
Source: https://github.com/iovisor/bcc
