EVENTSTAT(8)

๐Ÿ“ฆ
version 0.06.00 ยท 3 versions
, in debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ‘‘ EVENTSTAT(8) โ€” the system manager's manual page, but make it a vibe

okay bestie, welcome to eventstat, section 8 of the system manager's manual. this is the part where we measure โœจsystem eventsโœจ. put your hair up, grab a strawberry, let's go ๐Ÿ’…


โœจ NAME โœจ

eventstat โ€” a whole tool whose entire job is measuring system events. that's it. that's the job. ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

eventstat [options] [delay [count]]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so eventstat is a program that dumps out all the currently active system events that have been added to the kernel timer list. it's giving surveillance but make it consensual. it's literally just telling you which timers are doing the most. ๐Ÿ‘‘


๐Ÿ’– OPTIONS ๐Ÿ’–

here's the full menu of what eventstat options do, no skips, no cuts, we eat every single one:

  • -b โ€” just report events, PID and process name. by default the short task name from the kernel comm field gets displayed, BUT the -s and -l options will report more process name information. so -b is the minimalist queen, -s/-l are the over-sharers.
  • -c โ€” report cumulative events instead of events per sample period. running total energy. ๐Ÿ“ˆ
  • -C โ€” report the sample event count in the CSV output instead of the default events per second rate.
  • -d โ€” strip the full directory path off the process name in the CSV output. no more /usr/bin/this/that/the/other, just the name, clean. โœจ
  • -h โ€” show help. your bestie when you're lost.
  • -i โ€” show timer ID information. the receipts. ๐Ÿงพ
  • -k โ€” report just kernel threads. kernel girlies only, user space need not apply.
  • -l โ€” report long process name from /proc/pid/cmdline. this reports the process name AND all the command line arguments. the full tea, no crumbs withheld.
  • -n event_count โ€” only display the first event_count number of top events. top-N energy, main character only. ๐Ÿ‘‘
  • -q โ€” run quietly. only really makes sense with the -r option (iykyk).
  • -r csv_file โ€” output gathered data in a comma separated values file. you can then import it and graph it using your favourite open source spread sheet. data girlies rise up ๐Ÿ“Š
  • -s โ€” report short process name from /proc/pid/cmdline. this reports just the process name.
  • -S โ€” report the minimum, maximum, average and population standard deviation at the end of the CSV output. stats class but it's finally useful. ๐Ÿงฎ
  • -t threshold โ€” ignore samples where the event delta per second is less than the given threshold. if it's not loud enough, we don't hear it. ๐Ÿšซ
  • -T โ€” enable 'top' mode, refresh display on each update. live, laughing, loving, refreshing. ๐Ÿ”ฅ
  • -u โ€” report just user space processes. the people's processes.
  • -w โ€” add timestamp (the "whence" info) to the output. โฐ

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

dump events every second until stopped:

sudo eventstat

dump the top 20 events every 60 seconds until stopped:

sudo eventstat -n 20 60

dump events every 10 seconds just 5 times:

sudo eventstat 10 5

quietly dump events every 10 seconds just 5 times into a CSV file with short process name:

sudo eventstat 10 5 -q -s -r results.csv

๐Ÿ“ CSV OUTPUT ๐Ÿ“

the -r option generates a comma separated file report that you can import into spreadsheets or parse using text processing tools. very versatile, very demure. ๐Ÿ’…

column 1 of the data is the label for each row, and columns 2 onwards contain the data for each task that generated a wakeup event.

the first row lists the task name of the thread or process. task names in [ ] brackets are kernel threads, and other tasks are the names of user space processes. by default these names are derived from the task names from kernel trace events, but the -s and -l options fetch more complete task names from /proc/pid/cmdline instead.

the second and third rows list the names of the internal Linux kernel timer init function. yes, two whole rows of it.

the fourth row lists the total number of wakeup events for each task during the entire run of eventstat. the whole run, periodt.

the subsequent rows list the average number of wakeups per second measured during the sample interval for each task in column two onwards. and the first column indicates the sample time (in seconds) since the start of the measuring. so you always know when the numbers happened. ๐Ÿ•ฐ๏ธ


๐Ÿ’€ NOTES ๐Ÿ’€

version 4.0 of eventstat gathers event timer data from the kernel trace event timers and hence is not compatible with previous versions of eventstat. heads up bestie, this is a breaking change, not a glow-up you can ignore.

the move to using kernel trace events was necessary because the Linux 4.12 kernel dropped support for the /proc/timer_stats interface. so likeโ€ฆ we had no choice. it was adapt or perish. ๐Ÿ˜ญ


๐Ÿซถ SEE ALSO ๐Ÿซถ

powertop(8), top(1)


๐Ÿงš AUTHOR ๐Ÿงš

eventstat was written by Colin King <colin.king@canonical.com>

this manual page was written by Colin King <colin.i.king@gmail.com>, for the Ubuntu project (but may be used by others). generous king behavior honestly. ๐Ÿ‘‘


Copyright ยฉ 2011-2021 Canonical Ltd, Copyright ยฉ 2021-2024 Colin Ian King.

this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (translation: it's free, it's yours, but if it breaks, that's on you babes ๐Ÿ™ˆ)


and that's the whole page!! January 12, 2024 is when this was last touched, and yes the manual name is EVENTSTAT(8) in case you scrolled past it ๐Ÿ’– mwah, go measure some events, you've got this โœจ๐Ÿฆ‹๐ŸŽ€