syncsnoop(8)
β¨ 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 π
iostat(1)π
bestie, that's the whole thing πβ¨ manual page from USER COMMANDS, dated 2015-08-18, syncsnoop(8) forever ππ
π¦ where this page comes from
- debian trixie: bpfcc-tools 0.31.0+ds-7 Β· Apache-2.0
- ubuntu questing: bpfcc-tools 0.31.0+ds-7ubuntu2 Β· Apache-2.0
- ubuntu resolute: bpfcc-tools 0.35.0+ds-1ubuntu2 Β· Apache-2.0
- ubuntu stonking: bpfcc-tools 0.35.0+ds-1ubuntu4 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms