loads.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

πŸ’– loads.bt(8) β€” System Manager's Manual πŸ’–

Okay bestie, this is the USER COMMANDS page for loads.bt(8) from the System Manager's Manual πŸŽ€ (the footer has the full receipts, I'll spill them at the very end 🫢).

✨ NAME ✨

loads.bt β€” Prints load averages. Uses bpftrace/eBPF. ⭐

🧚 SYNOPSIS 🧚

loads.bt

πŸ“– DESCRIPTION πŸ“–

okay so these are the exact same load averages that uptime shows you, except three decimal places instead of two πŸ¦‹ (not that it really matters, but we're here for precision). This tool is really more of a demo of how to grab a kernel structure and process it from bpftrace. it's giving teacher energy and I'm obsessed πŸ’…

πŸ”’ Heads up: this one uses BPF, so only the root user can run it. no root, no loads.bt. sorry bestie πŸ™ˆ

πŸŽ€ REQUIREMENTS πŸŽ€

You need CONFIG_BPF and bpftrace. no cap, that's the whole list πŸ’œ

πŸ“ EXAMPLES πŸ“

Print system load averages every second:

# loads.bt

🌈 FIELDS 🌈

⏰ HH:MM:SS

Every output line starts with the time it was printed, in HH:MM:SS format. Very handy, very cute ✨

πŸ“ˆ load averages

okay this one is a whole thing 😭 These are exponentially-damped moving sum averages of the system loads. Load is a measurement of demand on system resources. That includes CPUs, but also other resources the kernel accesses in an uninterruptible state (TASK_UNINTERRUPTIBLE), like some kinds of disk I/O and lock accesses. Fun fact: Linux load averages originally reflected only CPU demand, the same as other OSes, but that changed in Linux 0.99.14 🌸. The demand measurement reflects not just the resource being used, but also the queued demand (a saturation measurement) ✨.

Lastly, the three numbers are called the "one-", "five-", and "fifteen-minute" load averages. However, those times are just constants used in the exponentially-damping equation, and the load averages reflect load beyond those times. Were you expecting an accurate description of load averages in the man page of a bpftrace tool? πŸ™ˆπŸ’€

πŸ”‹ OVERHEAD πŸ”‹

Other than bpftrace startup time, it's negligible πŸ¦‹

🫢 SOURCE 🫢

This comes from bpftrace, bestie:

https://github.com/bpftrace/bpftrace

Also go check the bpftrace distribution for a companion _examples.txt file. It has example usage, output, and commentary for this tool, and it's so worth the click πŸŽ€

πŸ”— REFERENCE πŸ”—

If you want more on load averages, see:

http://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html

🐧 OS 🐧

Linux πŸƒ

🚧 STABILITY 🚧

Unstable - in development. it's still cooking, so be gentle πŸ₯Ή

πŸ‘‘ AUTHOR πŸ‘‘

Brendan Gregg, the queen of this whole topic πŸ‘‘βœ¨

πŸ’Œ SEE ALSO πŸ’Œ

uptime(1) β€” go see the original, it's the vibe this tool is copying πŸ’œ


Okay, footer check 🫢: this is the USER COMMANDS section, dated 2018-09-10, for loads.bt(8). Periodt πŸ’…πŸŒΈ