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 ] [ -d | --sort-avio ]
12 [ -D | --sort-tio ] [ -f | --not-interactive ]
13 [ -i | --dont-read-summary-file ]
14 [ -j | --print-seconds ] [ -k | --sort-cpu-avmem ]
15 [ -K | --sort-ksec ] [ -l | --separate-times ]
16 [ -m | --user-summary ] [ -n | --sort-num-calls ]
17 [ -p | --show-paging ] [ -P | --show-paging-avg ]
18 [ -r | --reverse-sort ] [ -s | --merge ]
19 [ -t | --print-ratio ] [ -u | --print-users ]
20 [ -v num | --threshold num ] [ --sort-real-time ]
21 [ --debug ] [ -V | --version ] [ -h | --help ]
22 [ --other-usracct-file filename ] [ --ahz hz ]
23 [ --other-savacct-file filename ]
24 [ [ --other-acct-file ] filename ]
25
27 sa summarizes information about previously executed commands as
28 recorded in the acct file. In addition, it condenses this data into a
29 summary file named savacct which contains the number of times the
30 command was called and the system resources used. The information can
31 also be summarized on a per-user basis; sa will save this information
32 into a file named usracct.
33
34 If no arguments are specified, sa will print information about all of
35 the commands in the acct file.
36
37 If called with a file name as the last argument, sa will use that file
38 instead of the system's default acct file.
39
40 By default, sa will sort the output by sum of user and system time. If
41 command names have unprintable characters, or are only called once, sa
42 will sort them into a group called `***other'. If more than one
43 sorting option is specified, the list will be sorted by the one
44 specified last on the command line.
45
46 The output fields are labeled as follows:
47
48 cpu
49 sum of system and user time in cpu seconds
50
51 re
52 "real time" in cpu seconds
53
54 k
55 cpu-time averaged core usage, in 1k units
56
57 avio
58 average number of I/O operations per execution
59
60 tio
61 total number of I/O operations
62
63 k*sec
64 cpu storage integral (kilo-core seconds)
65
66 u
67 user cpu time in cpu seconds
68
69 s
70 system time in cpu seconds
71
72 Note that these column titles do not appear in the first row of the
73 table, but after each numeric entry (as units of measurement) in every
74 row. For example, you might see `79.29re', meaning 79.29 cpu seconds
75 of "real time".
76
77 An asterisk will appear after the name of commands that forked but
78 didn't call exec.
79
80 GNU sa takes care to implement a number of features not found in other
81 versions. For example, most versions of sa don't pay attention to
82 flags like `--print-seconds' and `--sort-num-calls' when printing out
83 commands when combined with the `--user-summary' or `--print-users'
84 flags. GNU sa pays attention to these flags if they are applicable.
85 Also, MIPS' sa stores the average memory use as a short rather than a
86 double, resulting in some round-off errors. GNU sa uses double the
87 whole way through.
88
90 The availability of these program options depends on your operating
91 system. In specific, the members that appear in the struct acct of
92 your system's process accounting header file (usually acct.h )
93 determine which flags will be present. For example, if your system's
94 struct acct doesn't have the `ac_mem' field, the installed version of
95 sa will not support the `--sort-cpu-avmem', `--sort-ksec', `-k', or
96 `-K' options.
97
98 In short, all of these flags may not be available on your machine.
99
100 -a, --list-all-names
101 Force sa not to sort those command names with unprintable
102 characters and those used only once into the ***other group.
103 -b, --sort-sys-user-div-calls
104 Sort the output by the sum of user and system time divided by
105 the number of calls.
106 -c, --percentages
107 Print percentages of total time for the command's user, system,
108 and real time values.
109 -d, --sort-avio
110 Sort the output by the average number of disk I/O operations.
111 -D, --sort-tio
112 Print and sort the output by the total number of disk I/O
113 operations.
114 -f, --not-interactive
115 When using the `--threshold' option, assume that all answers to
116 interactive queries will be affirmative.
117 -i, --dont-read-summary-file
118 Don't read the information in the system's default savacct file.
119 -j, --print-seconds
120 Instead of printing total minutes for each category, print
121 seconds per call.
122 -k, --sort-cpu-avmem
123 Sort the output by cpu time average memory usage.
124 -K, --sort-ksec
125 Print and sort the output by the cpu-storage integral.
126 -l, --separate-times
127 Print separate columns for system and user time; usually the two
128 are added together and listed as `cpu'.
129 -m, --user-summary
130 Print the number of processes and number of CPU minutes on a
131 per-user basis.
132 -n, --sort-num-calls
133 Sort the output by the number of calls. This is the default
134 sorting method.
135 -p, --show-paging
136 Print the number of minor and major pagefaults and swaps.
137 -P, --show-paging-avg
138 Print the number of minor and major pagefaults and swaps divided
139 by the number of calls.
140 -r, --reverse-sort
141 Sort output items in reverse order.
142 -s, --merge
143 Merge the summarized accounting data into the summary files
144 savacct and usracct.
145 -t, --print-ratio
146 For each entry, print the ratio of real time to the sum of
147 system and user times. If the sum of system and user times is
148 too small to report--the sum is zero--`*ignore*' will appear in
149 this field.
150 -u, --print-users
151 For each command in the accounting file, print the userid and
152 command name. After printing all entries, quit. *Note*: this
153 flag supersedes all others.
154 -v num --threshold num
155 Print commands which were executed num times or fewer and await
156 a reply from the terminal. If the response begins with `y', add
157 the command to the `**junk**' group.
158 --separate-forks
159 It really doesn't make any sense to me that the stock version of
160 sa separates statistics for a particular executable depending on
161 whether or not that command forked. Therefore, GNU sa lumps
162 this information together unless this option is specified.
163 --ahz hz
164 Use this flag to tell the program what AHZ should be (in hertz).
165 This option is useful if you are trying to view an acct file
166 created on another machine which has the same byte order and
167 file format as your current machine, but has a different value
168 for AHZ.
169 --debug
170 Print verbose internal information.
171 -V, --version
172 Print the version number of sa.
173 -h, --help
174 Prints the usage string and default locations of system files to
175 standard output and exits.
176 --sort-real-time
177 Sort the output by the "real time" field.
178 --other-usracct-file filename
179 Write summaries by user ID to filename rather than the system's
180 default usracct file.
181 --other-savacct-file filename
182 Write summaries by command name to filename rather than the
183 system's default SAVACCT file.
184 --other-file filename
185 Read from the file filename instead of the system's default ACCT
186 file.
188 acct The raw system wide process accounting file. See acct(5) for
189 further details.
190 savacct
191 A summary of system process accounting sorted by command.
192 usracct
193 A summary of system process accounting sorted by user ID.
195 There is not yet a wide experience base for comparing the output of GNU
196 sa with versions of sa in many other systems. The problem is that the
197 data files grow big in a short time and therefore require a lot of disk
198 space.
200 The GNU accounting utilities were written by Noel Cragg
201 <noel@gnu.ai.mit.edu>. The man page was adapted from the accounting
202 texinfo page by Susan Kleinmann <sgk@sgk.tiac.net>.
204 acct(5), ac(8)
205
206
207
208 1997 August 19 SA(8)