syncsnoop(8)

πŸ“¦ version 0.36.1, in centos-stream 10, centos-stream 9, fedora 43, fedora 44

✨ syncsnoop(8) β€” NAME ✨

syncsnoop πŸ’– β€” Trace sync() syscall. Uses Linux eBPF/bcc.

πŸŽ€ SYNOPSIS πŸŽ€

syncsnoop

πŸ’… DESCRIPTION πŸ’…

okay so syncsnoop traces calls to sync(), which flushes file system buffers out to storage devices 🫢. These calls can cause performance perturbations, so it's lowkey super useful to know if they're happening and how often πŸ‘€.

this works by tracing the kernel sys_sync() function using dynamic tracing, and it will need updating to match any changes to that function πŸ› οΈ.

it makes use of a Linux 4.4 feature (bpf_perf_event_output()) πŸ¦‹. for kernels older than 4.4, see the version under tools/old, which uses an older mechanism πŸ™ˆ.

this program is also a basic example of eBPF/bcc 🧚.

since this uses BPF, only the root user can use this tool πŸ’€. no cap, that's the rule.

πŸ“‹ REQUIREMENTS πŸ“‹

CONFIG_BPF and bcc 🌸.

πŸ“ EXAMPLES πŸ“

trace calls to sync():

# syncsnoop

πŸ”₯ FIELDS πŸ”₯

  • TIME(s) β€” the time of the call, in seconds ⏰.
  • CALL β€” the call that was traced ✨.

🌈 OVERHEAD 🌈

this traces the kernel sync function and prints output for each event. the rate is generally expected to be low (<< 100/s), so the overhead is also expected to be negligible πŸ₯°.

πŸ¦‹ 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 πŸ’»

Linux 🐧

πŸ§ͺ STABILITY πŸ§ͺ

Unstable - in development. 🚧

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg wrote the original BCC Python version, and Tiago Ilieve wrote the CO-RE version 🫢.

πŸ”— SEE ALSO πŸ”—


bestie, that's the whole thing 😭✨ manual page from USER COMMANDS, dated 2015-08-18, syncsnoop(8) forever πŸŽ€πŸ’…

πŸ“¦ where this page comes from