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