|SA(8)||System Manager's Manual||SA(8)|
sa — print system
sa utility reports on, cleans up, and
generally maintains system accounting files. See
accton(8) for details on
enabling system accounting.
sa is able to condense the information in
/var/account/acct into the summary files
/var/account/usracct, which contain system
statistics according to command name and login ID, respectively. This
condensation is desirable because on a large system,
/var/account/acct can grow by hundreds of blocks per
day. The summary files are normally read before the accounting file, so that
reports include all available information.
If file names are supplied, they are read instead of /var/account/acct. After each file is read, if the summary files are being updated, an updated summary will be saved to disk. Only one report is printed, after the last file is processed.
The labels used in the output indicate the following, except where otherwise specified by individual options:
The options are as follows:
saplaces all names containing unprintable characters and those used only once under the name “***other”.
-sflags are honored.
-q), for each entry in the accounting file print the user ID, total seconds of CPU usage, total memory usage, number of I/O operations performed, and command name.
By default, per-command statistics are printed and show the number of calls, the total elapsed time in minutes, total CPU and user time in minutes, average number of I/O operations, and CPU time averaged core usage. Children which have not yet called execve(2) have ‘*’ appended to their command names.
sa utility exits 0 on success,
and >0 if an error occurs.
sa was written for NetBSD
0.9A from the specification provided by various systems' manual
pages. Its date of origin is unknown to the author.
Chris G. Demetriou <firstname.lastname@example.org>
While the behavior of the options in this version of
sa was modeled after the original version, there are
some intentional differences and undoubtedly some unintentional ones as
well. In particular, the
-q option has been added,
-m option now understands more options than
it used to.
The formats of the summary files created by this version of
sa are very different than those used by the
original version. This is not considered a problem, however, because the
accounting record format has changed as well (since user IDs are now 32
The number of options to this program is absurd, especially considering that there's not much logic behind their lettering.
The field labels should be more consistent.
OpenBSD's VM system does not record the CPU storage integral.
|December 21, 2016||OpenBSD-6.4|