BSD 3 development
[unix-history] / usr / man / man1 / sa.1m
CommitLineData
52a4e1c9
BJ
1.TH SA 1M
2.SH NAME
3sa, accton \- system accounting
4.SH SYNOPSIS
5.B sa
6[
7.B \-abcjlnrstuv
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 arguemnt is given, accounting is turned off.
19.PP
20.I Sa
21reports on, cleans up, and generally maintains
22accounting files.
23.PP
24.I Sa
25is able to condense
26the information in
27.I /usr/adm/acct
28into a summary file
29.I /usr/adm/savacct
30which contains a count of the
31number of times each command was called and the time resources
32consumed.
33This condensation is desirable because on a large system
34.I /usr/adm/acct
35can grow by 100 blocks per day.
36The summary file is read before the accounting file,
37so the reports include all available information.
38.PP
39If a file name is given as the last argument,
40that file will be treated
41as the accounting file;
42.I /usr/adm/acct
43is the default.
44There are zillions of options:
45.PP
46.TP
47a
48Place all command names containing unprintable characters
49and those used only once under the name `***other.'
50.TP
51b
52Sort output by sum of user and system time divided by number of
53calls.
54Default sort is by sum of user and system times.
55.TP
56c
57Besides total user, system, and real time for each command print percentage
58of total time over all commands.
59.TP
60j
61Instead of total minutes time for each category,
62give seconds per call.
63.TP
64l
65Separate system and user time; normally they are combined.
66.TP
67m
68Print number of processes and number of CPU minutes for each user.
69.TP
70n
71Sort by number of calls.
72.TP
73r
74Reverse order of sort.
75.TP
76s
77Merge accounting file into summary file
78.I /usr/adm/savacct
79when done.
80.TP
81t
82For each command report ratio of real time to the sum of user and
83system times.
84.TP
85u
86Superseding all other flags,
87print for each command in the accounting file the
88user ID and command name.
89.TP
90v
91If the next character is a digit
92.I n,
93then type the name of
94each command used
95.I n
96times or fewer.
97Await a reply from the terminal;
98if it begins with `y', add the command to
99the category `**junk**.'
100This is used to strip out garbage.
101.dt
102.SH FILES
103.ta 2i
104/usr/adm/acct raw accounting
105.br
106/usr/adm/savacct summary
107.br
108/usr/adm/usracct per-user summary
109.SH "SEE ALSO"
110ac(1), acct(2)