1SA(8) System Manager's Manual SA(8)
2
3
4
6 sa - summarizes accounting information
7
9 sa [ -a | --list-all-names ]
10 [ -b | --sort-sys-user-div-calls ]
11 [ -c | --percentages ] [ -f | --not-interactive ]
12 [ -i | --dont-read-summary-file ]
13 [ -j | --print-seconds ] [ -k | --sort-cpu-avmem ]
14 [ -K | --sort-ksec ] [ -l | --separate-times ]
15 [ -m | --user-summary ] [ -n | --sort-num-calls ]
16 [ -r | --reverse-sort ] [ -s | --merge ]
17 [ -t | --print-ratio ] [ -u | --print-users ]
18 [ -v num | --threshold num ] [ --sort-real-time ]
19 [ --debug ] [ -V | --version ] [ -h | --help ]
20 [ --other-usracct-file filename ]
21 [ --other-savacct-file filename ]
22 [ [ --other-acct-file ] filename ]
23
25 sa summarizes information about previously executed commands as
26 recorded in the acct file. In addition, it condenses this data into a
27 summary file named savacct which contains the number of times the
28 command was called and the system resources used. The information can
29 also be summarized on a per-user basis; sa will save this information
30 into a file named usracct.
31
32 If no arguments are specified, sa will print information about all of
33 the commands in the acct file.
34
35 If called with a file name as the last argument, sa will use that file
36 instead of the system's default acct file.
37
38 By default, sa will sort the output by sum of user and system time. If
39 command names have unprintable characters, or are only called once, sa
40 will sort them into a group called `***other'. If more than one
41 sorting option is specified, the list will be sorted by the one
42 specified last on the command line.
43
44 The output fields are labeled as follows:
45
46 cpu
47 sum of system and user time in cpu seconds
48
49 re
50 "real time" in cpu seconds
51
52 k
53 cpu-time averaged core usage, in 1k units
54
55 k*sec
56 cpu storage integral (kilo-core seconds)
57
58 u
59 user cpu time in cpu seconds
60
61 s
62 system time in cpu seconds
63
64 An asterisk will appear after the name of commands that forked but
65 didn't call exec.
66
67 GNU sa takes care to implement a number of features not found in other
68 versions. For example, most versions of sa don't pay attention to
69 flags like `--print-seconds' and `--sort-num-calls' when printing out
70 commands when combined with the `--user-summary' or `--print-users'
71 flags. GNU sa pays attention to these flags if they are applicable.
72 Also, MIPS' sa stores the average memory use as a short rather than a
73 double, resulting in some round-off errors. GNU sa uses double the
74 whole way through.
75
77 -a, --list-all-names
78 Force sa not to sort those command names with unprintable
79 characters and those used only once into the ***other group.
80 -b, --sort-sys-user-div-calls
81 Sort the output by the sum of user and system time divided by
82 the number of calls.
83 -c, --percentages
84 Print percentages of total time for the command's user, system,
85 and real time values.
86 -f, --not-interactive
87 When using the `--threshold' option, assume that all answers to
88 interactive queries will be affirmative.
89 -i, --dont-read-summary-file
90 Don't read the information in the system's default savacct file.
91 -j, --print-seconds
92 Instead of printing total minutes for each category, print
93 seconds per call.
94 -k, --sort-cpu-avmem
95 Sort the output by cpu time average memory usage.
96 -K, --sort-ksec
97 Print and sort the output by the cpu-storage integral.
98 -l, --separate-times
99 Print separate columns for system and user time; usually the two
100 are added together and listed as `cpu'.
101 -m, --user-summary
102 Print the number of processes and number of CPU minutes on a
103 per-user basis.
104 -n, --sort-num-calls
105 Sort the output by the number of calls. This is the default
106 sorting method.
107 -r, --reverse-sort
108 Sort output items in reverse order.
109 -s, --merge
110 Merge the summarized accounting data into the summary files
111 savacct and usracct.
112 -t, --print-ratio
113 For each entry, print the ratio of real time to the sum of
114 system and user times. If the sum of system and user times is
115 too small to report--the sum is zero--`*ignore*' will appear in
116 this field.
117 -u, --print-users
118 For each command in the accounting file, print the userid and
119 command name. After printing all entries, quit. *Note*: this
120 flag supersedes all others.
121 -v num --threshold num
122 Print commands which were executed num times or fewer and await
123 a reply from the terminal. If the response begins with `y', add
124 the command to the `**junk**' group.
125 --separate-forks
126 It really doesn't make any sense to me that the stock version of
127 sa separates statistics for a particular executable depending on
128 whether or not that command forked. Therefore, GNU sa lumps
129 this information together unless this option is specified.
130 --debug
131 Print verbose internal information.
132 -V, --version
133 Print the version number of sa.
134 -h, --help
135 Prints the usage string and default locations of system files to
136 standard output and exits.
137 --sort-real-time
138 Sort the output by the "real time" field.
139 --other-usracct-file filename
140 Write summaries by user ID to filename rather than the system's
141 default usracct file.
142 --other-savacct-file filename
143 Write summaries by command name to filename rather than the
144 system's default SAVACCT file.
145 --other-acct-file filename
146 Read from the file filename instead of the system's default ACCT
147 file.
149 acct The raw system wide process accounting file. See acct(5) for
150 further details.
151 savacct
152 A summary of system process accounting sorted by command.
153 usracct
154 A summary of system process accounting sorted by user ID.
156 There is not yet a wide experience base for comparing the output of GNU
157 sa with versions of sa in many other systems. The problem is that the
158 data files grow big in a short time and therefore require a lot of disk
159 space.
161 The GNU accounting utilities were written by Noel Cragg
162 <noel@gnu.ai.mit.edu>. The man page was adapted from the accounting
163 texinfo page by Susan Kleinmann <sgk@sgk.tiac.net>.
165 acct(5), ac(8)
166
167
168
169 1997 August 19 SA(8)