display system activity at each priority level (QNX)
sac [-i factor] [-n node] [-p priority] [-s seconds] [<file] [>file]
Take a snapshot of an active system with an integration factor of 8:
sac -i 8
Start a realtime monitor of the dynamics of the system:
sac -i 3 -s .1
Monitor node 8 using its current integration factor:
sac -n 8
The sac utility is a system activity monitor. It displays a bar graph showing the amount of processor activity at each priority level. If you run sac on an idle system, you would see one large bar at priority 0 (priority 1 if clock is running).
The Kernel collects statistics on processor activity at each priority level. These statistics are integrated over time. The -i option sets the integration factor for the system. Smaller values average over shorter periods, resulting in a faster response to changes in system activity. Larger values let you monitor average activity over a longer period of time. If you set the integration factor to 0, then statistics won't be gathered. If you don't specify the -i option, then the current integration factor will be used. If a node is not gathering statistics, you will be told to set a value for the integration factor. In this case, re-run sac with a nonzero value for the -i option.
By default, sac takes a snapshot of the system statistics once every second. You can adjust this using the -s option, which takes an argument in seconds and fractions of seconds. For example, -s 0.5 would snap every half second. To stop sac after the next snap, press Enter.
If you specify a file for the standard output, sac will write a log of system activity to the file. You may play the log back by invoking sac with its standard input redirected.
On slow machines, sac may itself affect priority loading when it runs.