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