X-Git-Url: https://git.saurik.com/apple/system_cmds.git/blobdiff_plain/709a58224ea43109dc10bfd6a67de1e432174197..34d340d711a2b033f5da480ed7b5eb147679a588:/sa.tproj/sa.8 diff --git a/sa.tproj/sa.8 b/sa.tproj/sa.8 index 4ba9503..288df04 100644 --- a/sa.tproj/sa.8 +++ b/sa.tproj/sa.8 @@ -36,19 +36,19 @@ .Nm sa .Nd print system accounting statistics .Sh SYNOPSIS -.Nm +.Nm sa .Op Fl abcdDfijkKlmnqrstu .Op Fl v Ar cutoff .Op Ar .Sh DESCRIPTION The -.Nm +.Nm sa utility reports on, cleans up, and generally maintains system accounting files. .Pp The -.Nm +.Nm sa utility is able to condense the information in .Pa /var/account/acct into the summary files @@ -75,87 +75,115 @@ after the last file is processed. The labels used in the output indicate the following, except where otherwise specified by individual options: .Bl -tag -width k*sec +.\" ========== .It Dv avio Average number of I/O operations per execution +.\" ========== .It Dv cp Sum of user and system time, in minutes +.\" ========== .It Dv cpu Same as .Dv cp +.\" ========== .It Dv k CPU-time averaged core usage, in 1k units +.\" ========== .It Dv k*sec CPU storage integral, in 1k-core seconds +.\" ========== .It Dv re Real time, in minutes +.\" ========== .It Dv s System time, in minutes +.\" ========== .It Dv tio Total number of I/O operations +.\" ========== .It Dv u User time, in minutes .El .Pp The options to -.Nm +.Nm sa are: .Bl -tag -width Ds +.\" ========== .It Fl a List all command names, including those containing unprintable characters and those used only once. By default, -.Nm +.Nm sa places all names containing unprintable characters and those used only once under the name ``***other''. +.\" ========== .It Fl b If printing command statistics, sort output by the sum of user and system time divided by number of calls. +.\" ========== .It Fl c In addition to the number of calls and the user, system and real times for each command, print their percentage of the total over all commands. +.\" ========== +.It Fl D +If printing command statistics, sort and print by the total number +of disk I/O operations. +.\" ========== .It Fl d If printing command statistics, sort by the average number of disk I/O operations. If printing user statistics, print the average number of disk I/O operations per user. -.It Fl D -If printing command statistics, sort and print by the total number -of disk I/O operations. +.\" ========== .It Fl f Force no interactive threshold comparison with the .Fl v option. +.\" ========== .It Fl i Do not read in the summary files. +.\" ========== .It Fl j Instead of the total minutes per category, give seconds per call. +.\" ========== +.It Fl K +If printing command statistics, print and sort by the cpu-storage integral. +.\" ========== .It Fl k If printing command statistics, sort by the cpu-time average memory usage. If printing user statistics, print the cpu-time average memory usage. -.It Fl K -If printing command statistics, print and sort by the cpu-storage integral. +.\" ========== .It Fl l Separate system and user time; normally they are combined. +.\" ========== .It Fl m Print per-user statistics rather than per-command statistics. +.\" ========== .It Fl n Sort by number of calls. +.\" ========== .It Fl q Create no output other than error messages. +.\" ========== .It Fl r Reverse order of sort. +.\" ========== .It Fl s Truncate the accounting files when done and merge their data into the summary files. +.\" ========== .It Fl t For each command, report the ratio of real time to the sum of user and system cpu times. If the cpu time is too small to report, ``*ignore*'' appears in this field. +.\" ========== .It Fl u Superseding all other flags, 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. +.\" ========== .It Fl v Ar cutoff For each command used .Ar cutoff @@ -219,7 +247,7 @@ The field labels should be more consistent. The VM system does not record the CPU storage integral. .Sh CAVEATS While the behavior of the options in this version of -.Nm +.Nm sa was modeled after the original version, there are some intentional differences and undoubtedly some unintentional ones as well. In particular, the @@ -229,7 +257,7 @@ option has been added, and the option now understands more options than it used to. .Pp The formats of the summary files created by this version of -.Nm +.Nm sa are very different from the 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 bits).