Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(2)

ac(8)

sa(8)

Name

sa, accton − print process accounting statistics

Syntax

/etc/sa [ options ] [ file ]

/etc/accton [ file ]

Arguments

fileWith an argument naming an existing file, accton causes system accounting information for every process executed to be placed at the end of the file. If no argument is given, accounting is turned off.

Description

The sa command reports on, cleans up, and generally maintains accounting files.

The sa is able to condense the information in /usr/adm/acct into a summary file /usr/adm/savacct, which contains a count of the number of times each command was called and the time resources consumed. This condensation is desirable because on a large system /usr/adm/acct can grow by 100 blocks per day. The summary file is normally read before the accounting file, so the reports include all available information.

If a file name is given as the last argument, that file will be treated as the accounting file.  The file /usr/adm/acct is the default.

Output fields are labeled: “cpu” for the sum of user+system time (in cpu seconds), “re” for real time (also in cpu seconds), “k” for cpu-time averaged core usage (in 1k units), “avio” for average number of I/O operations per execution.  With options fields labeled “tio” for total I/O operations, “k*sec” for cpu storage integral (kilo-core seconds), “u” and “s” for user and system cpu time alone (both in cpu seconds) will sometimes appear. 

Options

−aList all command names including those containing unprintable characters and those used only once. By default, sa places all command names containing unprintable characters and those used only once under the name ‘***other.’

−bSort output by sum of user and system time divided by number of calls.  Default sort is by sum of user and system times. 

−cBesides total user, system, and real time for each command, print percentage of total time over all commands. 

−dSort by average number of disk I/O operations. 

−DPrint and sort by total number of disk I/O operations. 

−fForce no interactive threshold compression with −v option.

−iDo not read in summary file. 

−jInstead of total minutes for each category, give seconds per call. 

−kSort by cpu-time average memory usage. 

−KPrint and sort by cpu-storage integral. 

−lSeparate system and user time; normally they are combined. 

−mPrint number of processes and number of CPU minutes for each user. 

−nSort by number of calls. 

−rReverse order of sort. 

−sMerge accounting file into summary file /usr/adm/savacct when done.

−tFor each command, report ratio of real time to the sum of user and system times.  If the sum of user and system times is too small to report, ‘*ignore*’ appears in this field. 

−uSuperseding all other flags, print for each command in the accounting file the user ID and command name. 

−vFollowed by a number n, types the name of each command used n times or fewer.  Await a reply from the terminal; if it begins with ‘y’, add the command to the category ‘**junk**.’ This is used to strip out garbage. 

Restrictions

Accounting is suspended when there is less than 2% free space on disk.  Accounting resumes when free space rises above 4%. 

Files

/usr/adm/acct
Raw accounting

/usr/adm/savacct
Summary

/usr/adm/usracct
Per-user summary

See Also

acct(2), ac(8)

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