BSD 4_2 development
[unix-history] / usr / man / man8 / sa.8
CommitLineData
3fff8dae
C
1.TH SA 8 "20 April 1980"
2.SH NAME
3sa, accton \- system accounting
4.SH SYNOPSIS
5.B /etc/sa
6[
7.B \-abcdDfijkKlnrstuv
8] [ file ]
9.PP
10.B /etc/accton
11[ file ]
12.SH DESCRIPTION
13With an argument naming an existing
14.I file,
15.I accton
16causes system accounting information for
17every process executed to be placed at the end of the file.
18If no argument is given, accounting is turned off.
19.PP
20.I Sa
21reports on, cleans up, and generally maintains accounting files.
22.PP
23.I Sa
24is able to condense the information in
25.I /usr/adm/acct
26into a summary file
27.I /usr/adm/savacct
28which contains a count of the
29number of times each command was called and the time resources consumed.
30This condensation is desirable because on a large system
31.I /usr/adm/acct
32can grow by 100 blocks per day.
33The summary file is normally read before the accounting file,
34so the reports include all available information.
35.PP
36If a file name is given as the last argument, that file will be treated
37as the accounting file;
38.I /usr/adm/acct
39is the default.
40.PP
41Output fields are labeled: \*(lqcpu\*(rq for the sum of user+system time
42(in minutes), \*(lqre\*(rq for real time (also in minutes),
43\*(lqk\*(rq for cpu-time averaged core usage (in 1k units),
44\*(lqavio\*(rq for average number of i/o operations per execution.
45With options fields labeled \*(lqtio\*(rq for total i/o operations,
46\*(lqk*sec\*(rq for cpu storage integral (kilo-core seconds), \*(lqu\*(rq and \*(lqs\*(rq
47for user and system cpu time alone (both in minutes) will sometimes appear.
48.PP
49There are near a googol of options:
50.PP
51.TP
52a
53Place all command names containing unprintable characters
54and those used only once under the name `***other.'
55.TP
56b
57Sort output by sum of user and system time divided by number of calls.
58Default sort is by sum of user and system times.
59.TP
60c
61Besides total user, system, and real time for each command print percentage
62of total time over all commands.
63.TP
64d
65Sort by average number of disk i/o operations.
66.TP
67D
68Print and sort by total number of disk i/o operations.
69.TP
70f
71Force no interactive threshold compression with \-v flag.
72.TP
73i
74Don't read in summary file.
75.TP
76j
77Instead of total minutes time for each category, give seconds per call.
78.TP
79k
80Sort by cpu-time average memory usage.
81.TP
82K
83Print and sort by cpu-storage integral.
84.TP
85l
86Separate system and user time; normally they are combined.
87.TP
88m
89Print number of processes and number of CPU minutes for each user.
90.TP
91n
92Sort by number of calls.
93.TP
94r
95Reverse order of sort.
96.TP
97s
98Merge accounting file into summary file
99.I /usr/adm/savacct
100when done.
101.TP
102t
103For each command report ratio of real time to the sum of user and system times.
104.TP
105u
106Superseding all other flags, print for each command in the accounting file the
107user ID and command name.
108.TP
109v
110Followed by a number
111.I n,
112types the name of each command used
113.I n
114times or fewer.
115Await a reply from the terminal; if it begins with `y', add the command to
116the category `**junk**.' This is used to strip out garbage.
117.dt
118.SH FILES
119.ta 2i
120/usr/adm/acct raw accounting
121.br
122/usr/adm/savacct summary
123.br
124/usr/adm/usracct per-user summary
125.SH "SEE ALSO"
126ac(8), acct(2)
127.SH BUGS
128The number of options to this program is absurd.