syncsnoop.bt(8)
π syncsnoop.bt(8) π
Okay so this is the System Manager's Manual page for syncsnoop.bt π
β¨ NAME β¨
syncsnoop.bt β trace the sync() variety of syscalls. It uses bpftrace/eBPF π
π SYNOPSIS π
syncsnoop.bt
π DESCRIPTION π
okay so syncsnoop traces calls to sync() syscalls (sync(), fsync(), msync(), etc) π§Ή which flush the file system cache and buffers out to storage devices. These calls can cause performance perturbations, so it's lowkey super useful to know if they're happening, when they happen, and how often π
This works by tracing the sync() variety of syscalls via tracepoints π¦
This program is also a basic example of eBPF/bcc π§
Since this uses BPF, only the root user can use this tool π₯ no cap, it's root-only, bestie.
πΈ REQUIREMENTS πΈ
You'll need CONFIG_BPF and bpftrace π
π EXAMPLES π
Trace calls to sync() syscalls:
# syncsnoop.bt
π«Ά FIELDS π«Ά
TIMEβ a timestamp on the output, inHH:MM:SSformat β°PIDβ the process ID that was on-CPU during the event πCOMMβ the process name that was on-CPU during the event πEVENTβ the tracepoint name for the sync event β¨
π OVERHEAD π
This traces sync syscalls 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 π it's giving chill.
π§ SOURCE π§
This is from bpftrace π¦
https://github.com/bpftrace/bpftrace
Also look in the bpftrace distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool π
This is a bpftrace version of the bcc tool of the same name π
https://github.com/iovisor/bcc
π» OS π»
Linux π§
π§ STABILITY π§
Unstable, still in development. Be careful, bestie π
π AUTHOR π
Brendan Gregg π
π SEE ALSO π
iostat(1) π
π«Ά Bye bestie! This page came from the USER COMMANDS section, dated 2018-09-06, for syncsnoop.bt(8) πΈ slay forever πβ¨
π¦ where this page comes from
- alpine 3.24: bpftrace-tools-doc 0.26.1-r0 Β· Apache-2.0
- arch rolling: bpftrace 0.27.0-2 Β· Apache-2.0
- centos-stream 10: bpftrace 0.26.1-1.el10 Β· Apache-2.0
- centos-stream 9: bpftrace 0.26.1-1.el9 Β· ASL 2.0
- debian trixie: bpftrace 0.23.2-1 Β· Apache-2.0
- fedora 43: bpftrace 0.24.0-1.fc43 Β· Apache-2.0
- fedora 43: bpftrace 0.24.2-1.fc43 Β· Apache-2.0
- fedora 44: bpftrace 0.24.2-3.fc44 Β· Apache-2.0
- nixos 26.05: bpftrace 0.25.1
- nixpkgs unstable: bpftrace 0.27.1
- opensuse-leap 16.0: bpftrace-tools 0.23.5-160000.1.2 Β· Apache-2.0
- ubuntu questing: bpftrace 0.23.5-1ubuntu1 Β· Apache-2.0
- ubuntu resolute: bpftrace 0.25.0-1ubuntu1 Β· Apache-2.0
- ubuntu stonking: bpftrace 0.25.0-1ubuntu2 Β· Apache-2.0
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms