systime(1)

πŸ“¦ version 329, in nixpkgs unstable

πŸ’– systime(1) πŸ’–

okay so this is the General Commands Manual page for systime, and she is literally here to gather system-wide time during program execution. bestie, it's giving observability but make it cute. πŸ’…

✨ NAME ✨

systime β€” gather system-wide time during program execution

🌸 SYNOPSIS 🌸

systime [-P] [-r] [-t sleep_time] utility [argument ...]
systime -p [-r] [-t sleep_time]
systime [-P] -u user -s sys -i idle
systime [-P] [-r] [-t sleep_time] -T target_pid

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so systime is similar to time(1), bestie: you use it to execute a utility program. But after execution completes, it reports the system-wide time that was spent during that time period, instead of just the portion directly caused by the utility. it's giving bigger-picture receipts, not just the main-character command's slice. ✨

This can be used to gather information about CPU utilization by kernel threads (AIO, networking) and interrupt routines on behalf of a program, but not directly attributed to it. no cap, that's the whole vibe. 🧚

The systime program can also be used to snapshot counters with -p, and then later used with -u -s -i to calculate time spent during a time interval that doesn't correlate to a specific command execution. For example:

$ eval `systime -p`

$ ... time passes ...

$ systime -u $systime_user -s $systime_sys -i $systime_idle

18.79 real 2.03 user 1.04 sys

The systime program can also be used to print the usage of a process with -T target_pid, also printing the system-wide usage. 🫢

  • -P β€” print time spent as a percentage of overall CPU capacity of the system, capped at 100%.
  • -r β€” print the usage iteratively with sleep_time seconds sleep between iterations.
  • -t sleep_time β€” specify sleep_time between iterations. If you don't specify it, it defaults to 1 second.
  • -p β€” snapshot counters, so you can later feed the saved values into -u, -s, and -i.
  • -u user, -s sys, -i idle β€” use the saved user, sys, and idle values from a -p snapshot to calculate the time spent over that interval.
  • -T target_pid β€” print the usage of a process with that target_pid, and also print the system-wide usage.

🌈 SEE ALSO 🌈

systime(1) out β€” source/version: Darwin, date: April 24, 2012. πŸ’–βœ¨πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from