Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sa(1) — BSD/386 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

accton(1)

acct(2)

acct(5)

sa(1)                        BSD Reference Manual                        sa(1)

NAME
     sa - process system accounting logs

SYNOPSIS
     sa -u [-S saveacctfile] [-U usracctfile] [acctfile]

     sa [-s] [-abcdDfijkKlmnrt] [-v thres] [-S saveacctfile] [-U usracctfile]
        [acctfile]

DESCRIPTION
     The sa utility is used to maintain and generate reports from the system
     accounting files.

     The summary accounting file is read before the accounting file so the re-
     port includes previous system data.

     The optional argument acctfile overrides the default system accounting
     file /var/account/acct. By defaults sa will sort by cpu time.

     The default output fields are labeled:
     cpu     sum of the user plus system time in minutes;
     re      real (wall clock) time in minutes;
     k       unused in the current implementation;
     avio    average number of I/O operations per execution;
     cnt     number of times the executable was executed.

     The optional field labels are:
     pct     percent of of total time;
     tio     total I/O operations;
     k*sec   CPU memory usage integral in kilo-core seconds;
     u       user time in minutes;
     s       system time in minutes;
     re/cpu  real (wall clock) time divided by cpu time in minutes.

     The flags are as follows:

     -a      Print all command names.  By default command names containing un-
             printable characters and those used only once are placed under
             `***other'.

     -b      Sort by average cpu time used (cpu divided by cnt).

     -c      Add the percent field (labeled pct) that is the percentage of to-
             tal time used by this command.

     -d      Sort by average number of I/O operations (avio).

     -D      Print and sort by the total number of I/O operations (tio, re-
             places avio).

     -f      Force compression of junk files if using the -v flag.

     -i      Ignore the summary file and only report the contents of the
             acctfile.

     -j      Report cpu field as seconds per execution.

     -k      Sort by CPU-time average memory usage.

     -K      Print and sort by the CPU memory usage integral (k*sec).

     -l      Print user and system time separately (under the u and s fields,

             replacing the cpu field).
     -m      Summarize system resource usage by user.  Some of the other flags
             don't make sense with this option.

     -n      Sort by number of executions (cnt).

     -r      Reverse the order of any sort.

     -s      Merge the accounting records from acctfile into the summary files
             savacctfile and usracctfile.

     -t      Print the ration of real (wall clock) time to cpu (re/cpu)

     -u      Print the command name and user ID for each record in the ac-
             counting file.  Overrides any other flags.

     -v      This argument allows you to filter out garbage.  Sa will prompt
             you for each command that was executed less than thres times.
             Responding with a y will cause that record to be added to the
             `***junk' category.  You can force this behavior using the -f
             flag.

     -S      Override the default accounting summary file
             /var/account/savacct.

     -U      Override the default per-user accounting file
             /var/account/usracct (printed by -m).

     The sa utility exits 0 on success, and >0 if an error occurs.

FILES
     /var/account/acct     system accounting file
     /var/account/savacct  accounting summary by command
     /var/account/usracct  accounting summary by user ID

SEE ALSO
     accton(1),  acct(2),  acct(5)

HISTORY
     A sa command appeared in Version 7 AT&T UNIX.  This sa was written by
     Andrew H. Marrinson <andy@terasil.terasil.com>.

BSDI BSD/386                    March 27, 1993                               2























Typewritten Software • bear@typewritten.org • Edmonds, WA 98026