ext4dist(8)

πŸ“¦ version 0.36.1, in alpine 3.24, nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ ext4dist(8) πŸŽ€ (System Manager's Manual)

✨ NAME ✨

okay so ext4dist is the tool that summarizes ext4 operation latency πŸ’… It uses Linux eBPF/bcc to do it, and it's giving precise. πŸ”₯

πŸ’– SYNOPSIS πŸ’–

ext4dist [-h] [-T] [-m] [-p PID] [interval] [count]

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, this tool tracks how long common ext4 file operations take 🫢 That means reads, writes, opens, and syncs. It shows the results as a power-of-2 histogram, which is so clean to look at 😭 It stores that histogram in an in-kernel eBPF map, so it stays efficient. ✨

Since this works by tracing the ext4_file_operations interface functions, it will need updating to match any changes to these functions. not me forgetting to update it πŸ™ˆ

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


🧚 REQUIREMENTS 🧚

You'll need CONFIG_BPF and bcc. no cap, these are the must-haves πŸ’œ

🌸 OPTIONS 🌸

  • -h β€” prints the usage message πŸ“
  • -T β€” skips the timestamps on the interval output πŸ¦‹
  • -m β€” shows the output in milliseconds instead of microseconds 🌈
  • -p PID β€” only traces this PID. main character energy for one process πŸ‘‘

πŸ“ EXAMPLES πŸ“

Trace the ext4 operation time, then print a summary when you hit Ctrl-C πŸ’…

# ext4dist

Trace PID 181 only πŸŽ€

# ext4dist -p 181

Print 1 second summaries, 10 times ✨

# ext4dist 1 10

1 second summaries, printed in milliseconds πŸ’–

# ext4dist -m 1

πŸ’œ FIELDS πŸ’œ

  • msecs β€” the range of milliseconds for this bucket ⏱️
  • usecs β€” the range of microseconds for this bucket ⏱️
  • count β€” how many operations landed in this time range πŸ”₯
  • distribution β€” an ASCII picture of the distribution, based on the count column πŸ“Š

πŸ™ˆ OVERHEAD πŸ™ˆ

⚠️ ngl this one matters: the tool adds low-overhead instrumentation to these ext4 operations, including reads and writes from the file system cache. Those reads and writes can be super frequent (it depends on the workload, eg, 1M/sec), and at that point the overhead of this tool may become noticeable. Measure and quantify before use. πŸ’€

🌈 SOURCE 🌈

This is from bcc, bestie 🫢

https://github.com/iovisor/bcc

Also look in the bcc distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's iconic 🧚

πŸ¦‹ OS πŸ¦‹

Linux 🐧

🫧 STABILITY 🫧

Unstable - in development. so expect things to shift πŸ™ˆ

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg πŸ’œ

⭐ SEE ALSO ⭐

Check out ext4snoop(8) next, it's the perfect bestie for this one πŸ’…


Okay that's the whole tea! 🫢 This page came from the USER COMMANDS crew and was last updated on 2016-02-12. Love you, mwah! πŸ’‹βœ¨