syncsnoop.bt(8)

πŸ“¦
version 0.27.0 Β· 3 versions
  • 0.27.0 Β· alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.14.0 Β· ubuntu jammy
  • 0.20.2 Β· ubuntu noble
, in alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ 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, in HH:MM:SS format ⏰
  • 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 πŸ’–βœ¨