Debian Codegraph @

upstream/debian-unstable/man8/sa.8

raw
1 .TH SA 8 "1997 August 19"
2 .SH NAME
3 sa \- summarizes accounting information
4 .SH SYNOPSIS
5 .hy 0
6 .na
7 .TP
8 .B sa
9 [
10 .B \-a
11 |
12 .B \-\-list-all-names
13 ]
14 .br
15 [
16 .B \-b
17 |
18 .B \-\-sort-sys-user-div-calls
19 ]
20 .br
21 [
22 .B \-c
23 |
24 .B \-\-percentages
25 ]
26 [
27 .B \-d
28 |
29 .B \-\-sort-avio
30 ]
31 .br
32 [
33 .B \-D
34 |
35 .B \-\-sort-tio
36 ]
37 [
38 .B \-f
39 |
40 .B \-\-not-interactive
41 ]
42 .br
43 [
44 .B \-i
45 |
46 .B \-\-dont-read-summary-files
47 ]
48 .br
49 [
50 .B \-j
51 |
52 .B \-\-print-seconds
53 ]
54 [
55 .B \-k
56 |
57 .B \-\-sort-cpu-avmem
58 ]
59 .br
60 [
61 .B \-K
62 |
63 .B \-\-sort-ksec
64 ]
65 [
66 .B \-l
67 |
68 .B \-\-separate-times
69 ]
70 .br
71 [
72 .B \-m
73 |
74 .B \-\-user-summary
75 ]
76 [
77 .B \-n
78 |
79 .B \-\-sort-num-calls
80 ]
81 .br
82 [
83 .B \-p
84 |
85 .B \-\-show-paging
86 ]
87 [
88 .B \-P
89 |
90 .B \-\-show-paging-avg
91 ]
92 .br
93 [
94 .B \-r
95 |
96 .B \-\-reverse-sort
97 ]
98 [
99 .B \-s
100 |
101 .B \-\-merge
102 ]
103 .br
104 [
105 .B \-t
106 |
107 .B \-\-print-ratio
108 ]
109 [
110 .B \-u
111 |
112 .B \-\-print-users
113 ]
114 .br
115 [
116 .BI \-v " num"
117 |
118 .BI \-\-threshold " num"
119 ]
120 [
121 .B \-\-sort-real-time
122 ]
123 .br
124 [
125 .B \-\-debug
126 ]
127 [
128 .B \-V
129 |
130 .B \-\-version
131 ]
132 [
133 .B \-h
134 |
135 .B \-\-help
136 ]
137 .br
138 [
139 .BI "\-\-other-usracct-file " filename
140 ]
141 [
142 .BI \-\-ahz " hz"
143 ]
144 .br
145 [
146 .BI "\-\-other-savacct-file " filename
147 ]
148 .br
149 [
150 [
151 .B "\-\-other-acct-file "
152 ]
153 .I filename
154 ]
155 .SH DESCRIPTION
156 .LP
157 .B sa
158 summarizes information about previously executed commands as
159 recorded in the
160 .I acct
161 file. In addition, it condenses this data into a summary file named
162 .I savacct
163 which contains the number of times the command was called and the system
164 resources used. The information can also be summarized on a per-user
165 basis;
166 .B sa
167 will save this information into a file named
168 .I usracct.
169 .LP
170 If no arguments are specified,
171 .B sa
172 will print information about all of the commands in the
173 .I acct
174 file.
175 .LP
176 If called with a file name as the last argument,
177 .B sa
178 will use that file instead of the system's default
179 .I acct
180 file.
181 .LP
182 By default,
183 .B sa
184 will sort the output by sum of user and system time.
185 If command names have unprintable characters, or are only called once,
186 .B sa
187 will sort them into a group called `***other'.
188 If more than one sorting option is specified, the list will
189 be sorted by the one specified last on the command line.
190 .LP
191 The output fields are labeled as follows:
192 .TP
193 .I cpu
194 sum of system and user time in cpu minutes
195 .TP
196 .I re
197 "elapsed time" in minutes
198 .TP
199 .I k
200 cpu-time averaged core usage, in 1k units
201 .TP
202 .I avio
203 average number of I/O operations per execution
204 .TP
205 .I tio
206 total number of I/O operations
207 .TP
208 .I k*sec
209 cpu storage integral (kilo-core seconds)
210 .TP
211 .I u
212 user cpu time in cpu seconds
213 .TP
214 .I s
215 system time in cpu seconds
216 .LP
217 Note that these column titles do not appear in the first row of the
218 table, but after each numeric entry (as units of measurement) in every
219 row. For example, you might see `79.29re', meaning 79.29 cpu seconds
220 of "real time".
221 .LP
222 An asterisk will appear after the name of commands that forked but didn't call
223 .B exec.
224 .LP
225 GNU
226 .B sa
227 takes care to implement a number of features not found in other versions.
228 For example, most versions of
229 .B sa
230 don't pay attention to flags like `\-\-print-seconds' and
231 `\-\-sort-num-calls' when printing out commands when combined with
232 the `\-\-user-summary' or `\-\-print-users' flags. GNU
233 .B sa
234 pays attention to these flags if they are applicable.
235 Also, MIPS'
236 .B sa
237 stores the average memory use as a short rather than a double, resulting
238 in some round-off errors. GNU
239 .B sa
240 uses double the whole way through.
241 .SH OPTIONS
242 .LP
243 The availability of these program options depends on your operating
244 system. In specific, the members that appear in the
245 .B struct acct
246 of your system's process accounting header file (usually
247 .I acct.h
248 ) determine which flags will be present. For example, if your system's
249 .B struct acct
250 doesn't have the `ac_mem' field, the installed
251 version of
252 .B sa
253 will not support the `\-\-sort-cpu-avmem', `\-\-sort-ksec', `\-k', or
254 `\-K' options.
255 .LP
256 In short, all of these flags may not be available on your machine.
257 .TP
258 .PD 0
259 .B \-a, \-\-list-all-names
260 Force
261 .B sa
262 not to sort those command names with unprintable characters and those
263 used only once into the
264 .I ***other
265 group.
266 .TP
267 .B \-b, \-\-sort-sys-user-div-calls
268 Sort the output by the sum of user and system time divided by the
269 number of calls.
270 .TP
271 .B \-c, \-\-percentages
272 Print percentages of total time for the command's user, system,
273 and real time values.
274 .TP
275 .B \-d, \-\-sort-avio
276 Sort the output by the average number of disk I/O operations.
277 .TP
278 .B \-D, \-\-sort-tio
279 Print and sort the output by the total number of disk I/O operations.
280 .TP
281 .B \-f, \-\-not-interactive
282 When using the `\-\-threshold' option, assume that all answers to
283 interactive queries will be affirmative.
284 .TP
285 .B \-i, \-\-dont-read-summary-files
286 Don't read the information in the system's default
287 .I savacct
288 file.
289 .TP
290 .B \-j, \-\-print-seconds
291 Instead of printing total minutes for each category, print seconds per call.
292 .TP
293 .B \-k, \-\-sort-cpu-avmem
294 Sort the output by cpu time average memory usage.
295 .TP
296 .B \-K, \-\-sort-ksec
297 Print and sort the output by the cpu-storage integral.
298 .TP
299 .B \-l, \-\-separate-times
300 Print separate columns for system and user time; usually the two
301 are added together and listed as `cpu'.
302 .TP
303 .B \-m, \-\-user-summary
304 Print the number of processes and number of CPU minutes on a
305 per-user basis.
306 .TP
307 .B \-n, \-\-sort-num-calls
308 Sort the output by the number of calls. This is the default sorting method.
309 .TP
310 .B \-p, \-\-show-paging
311 Print the number of minor and major pagefaults and swaps.
312 .TP
313 .B \-P, \-\-show-paging-avg
314 Print the number of minor and major pagefaults and swaps divided by
315 the number of calls.
316 .TP
317 .B \-r, \-\-reverse-sort
318 Sort output items in reverse order.
319 .TP
320 .B \-s, \-\-merge
321 Merge the summarized accounting data into the summary files
322 .I savacct
323 and
324 .I usracct.
325 .TP
326 .B \-t, \-\-print-ratio
327 For each entry, print the ratio of real time to the sum of system
328 and user times. If the sum of system and user times is too small
329 to report--the sum is zero--`*ignore*' will appear in this field.
330 .TP
331 .B \-u, \-\-print-users
332 For each command in the accounting file, print the userid and
333 command name. After printing all entries, quit. *Note*: this flag
334 supersedes all others.
335 .TP
336 .BI \-v " num " \-\-threshold " num"
337 Print commands which were executed
338 .I num
339 times or fewer and await a
340 reply from the terminal. If the response begins with `y', add the
341 command to the `**junk**' group.
342 .TP
343 .B \-\-separate-forks
344 It really doesn't make any sense to me that the stock version of
345 .B sa
346 separates statistics for a particular executable depending on
347 whether or not that command forked. Therefore, GNU
348 .B sa
349 lumps this information together unless this option is specified.
350 .TP
351 .BI \-\-ahz " hz"
352 Use this flag to tell the program what
353 .B AHZ
354 should be (in hertz). This option is useful if you are trying to view
355 an
356 .I acct
357 file created on another machine which has the same byte order and file
358 format as your current machine, but has a different value for
359 .B AHZ.
360 .TP
361 .B \-\-debug
362 Print verbose internal information.
363 .TP
364 .B \-V, \-\-version
365 Print the version number of
366 .B sa.
367 .TP
368 .B \-h, \-\-help
369 Prints the usage string and default locations of system files to
370 standard output and exits.
371 .TP
372 .BI \-\-sort-real-time
373 Sort the output by the "real time" field.
374 .TP
375 .BI \-\-other-usracct-file " filename"
376 Write summaries by user ID to
377 .I filename
378 rather than the system's default
379 .I usracct
380 file.
381 .TP
382 .BI \-\-other-savacct-file " filename"
383 Write summaries by command name to
384 .I filename
385 rather than the system's default
386 .I SAVACCT
387 file.
388 .TP
389 .BI \-\-other-acct-file " filename"
390 Read from the file
391 .I filename
392 instead of the system's default
393 .I ACCT
394 file.
395 .SH FILES
396 .TP
397 .I acct
398 The raw system wide process accounting file. See
399 .BR acct (5)
400 for further details.
401 .TP
402 .I savacct
403 A summary of system process accounting sorted by command.
404 .TP
405 .I usracct
406 A summary of system process accounting sorted by user ID.
407 .RE
408 .LP
409
410 .SH BUGS
411 There is not yet a wide experience base for comparing the output of GNU
412 .B sa
413 with versions of
414 .B sa
415 in many other systems. The problem is that the data files grow big in a short
416 time and therefore require a lot of disk space.
417 .LP
418
419 .SH AUTHOR
420 The GNU accounting utilities were written by Noel Cragg
421 <[email protected]>. The man page was adapted from the accounting
422 texinfo page by Susan Kleinmann <[email protected]>.
423 .SH "SEE ALSO"
424 .BR acct (5),
425 .BR ac (1)