loads.bt(8)

πŸ“¦ version 0.17.0, in debian bookworm

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

okay bestie, welcome to the loads.bt page, it's giving system manager's manual energy and honestly? iconic 🫢


✨ NAME ✨

loads.bt β€” prints load averages. uses bpftrace/eBPF. that's the whole thing, no cap 🌸


🌈 SYNOPSIS 🌈

loads.bt

that's it. one line. she's lowkey effortless like that πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so these are the same load averages that uptime prints for you, except here you get three decimal places instead of two (not that it really matters, fr fr, but she's precise πŸ’–).

real talk though β€” this one is really a demonstration of fetching and processing a kernel structure from bpftrace. it's a lil showcase, a vibe check for kernel structs πŸŽ€

⚠️ since this uses BPF, only the root user can use this tool. root only. periodt πŸ‘‘

πŸ’œ REQUIREMENTS πŸ’œ

  • CONFIG_BPF
  • bpftrace

both of them, no skipping 🌟


πŸ“ EXAMPLES πŸ“

print system load averages every second:

# loads.bt

look at her go 😭✨


🧚 FIELDS 🧚

  • HH:MM:SS β€” every output line includes the time of printing in "HH:MM:SS" format. timestamps, because context is everything bestie πŸ’…
  • load averages: β€” okay so these are exponentially-damped moving sum averages of the system loads. and load here is a measurement of demand on system resources β€” that includes CPUs, plus other resources that are accessed with the kernel in an uninterruptible state (TASK_UNINTERRUPTIBLE), which covers types of disk I/O and lock accesses. 🫢

Linux load averages originally reflected CPU demand only, the way it does in other OSes, but that got changed in Linux 0.99.14. this demand measurement reflects not just the utilized resource, but also the queued demand β€” so it's a saturation measurement, not just a "how busy is the CPU" measurement. 🌈

and finally, the three numbers are called the "one-", "five-", and "fifteen-minute" load averages, HOWEVER β€” plot twist β€” those times are just constants used in the exponentially-damping equation, and the load averages actually reflect load beyond these times. 🀯

were you expecting an accurate description of load averages in the man page of a bpftrace tool? πŸ’€ (ngl that's the actual line, she said what she said)

πŸ”₯ OVERHEAD πŸ”₯

other than bpftrace startup time β€” negligible. basically free, bestie. she's not gonna eat your resources πŸŽ€


⭐ SOURCE ⭐

this is from bpftrace.

https://github.com/iovisor/bpftrace

also look in the bpftrace distribution for a companion _examples.txt file β€” it's got example usage, output, and commentary for this tool. iykyk πŸ“–βœ¨


🌸 REFERENCE 🌸

for more on load averages, see:

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

required reading, honestly 🫢


πŸ‘‘ OS πŸ‘‘

Linux 🐧


πŸ’€ STABILITY πŸ’€

Unstable β€” in development. she's a work in progress and that's valid πŸ™ˆ


πŸ’– AUTHOR πŸ’–

Brendan Gregg


πŸŽ€ SEE ALSO πŸŽ€


that's the whole page bestie, slay πŸ’…βœ¨ and for the record, this little icon dropped as part of the USER COMMANDS collection, dated 2018-09-10, under the name loads.bt(8) β€” stan her πŸŒŸπŸ¦‹

πŸ“¦ where this page comes from