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