2 .\" Copyright (c) 1994 Christopher G. Demetriou
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by Christopher G. Demetriou.
16 .\" 3. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 .Nd print system accounting statistics
38 .Op Fl abcdDfijkKlmnqrstu
46 utility reports on, cleans up,
47 and generally maintains system
52 utility is able to condense the information in
54 into the summary files
55 .Pa /var/account/savacct
57 .Pa /var/account/usracct ,
58 which contain system statistics according
59 to command name and login id, respectively.
60 This condensation is desirable because on a
63 can grow by hundreds of blocks per day.
64 The summary files are normally read before
65 the accounting file, so that reports include
66 all available information.
68 If file names are supplied, they are read instead of
69 .Pa /var/account/acct .
70 After each file is read, if the summary
71 files are being updated, an updated summary will
73 Only one report is printed,
74 after the last file is processed.
76 The labels used in the output indicate the following, except
77 where otherwise specified by individual options:
80 Average number of I/O operations per execution
82 Sum of user and system time, in minutes
87 CPU-time averaged core usage, in 1k units
89 CPU storage integral, in 1k-core seconds
93 System time, in minutes
95 Total number of I/O operations
105 List all command names, including those containing unprintable
106 characters and those used only once.
109 places all names containing unprintable characters and
110 those used only once under the name ``***other''.
112 If printing command statistics, sort output by the sum of user and system
113 time divided by number of calls.
115 In addition to the number of calls and the user, system and real times
116 for each command, print their percentage of the total over all commands.
118 If printing command statistics, sort by the average number of disk
120 If printing user statistics, print the average number of
121 disk I/O operations per user.
123 If printing command statistics, sort and print by the total number
124 of disk I/O operations.
126 Force no interactive threshold comparison with the
130 Do not read in the summary files.
132 Instead of the total minutes per category, give seconds per call.
134 If printing command statistics, sort by the cpu-time average memory
136 If printing user statistics, print the cpu-time average
139 If printing command statistics, print and sort by the cpu-storage integral.
141 Separate system and user time; normally they are combined.
143 Print per-user statistics rather than per-command statistics.
145 Sort by number of calls.
149 for accessing the per-command accounting summary database,
150 instead of the default
151 .Pa /var/account/savacct .
153 Create no output other than error messages.
155 Reverse order of sort.
157 Truncate the accounting files when done and merge their data
158 into the summary files.
160 For each command, report the ratio of real time to the sum
161 of user and system cpu times.
162 If the cpu time is too small to report, ``*ignore*'' appears in
167 for accessing the per-user accounting summary database,
168 instead of the default
169 .Pa /var/account/usracct .
171 Superseding all other flags, for each entry
172 in the accounting file, print the user ID, total seconds of cpu usage,
173 total memory usage, number of I/O operations performed, and
176 For each command used
178 times or fewer, print the command name and await a reply
180 If the reply begins with ``y'', add
181 the command to the category ``**junk**''.
183 used to strip garbage from the report.
186 By default, per-command statistics will be printed.
188 calls, the total elapsed time in minutes, total cpu and user time
189 in minutes, average number of I/O operations, and CPU-time
190 averaged core usage will be printed.
193 option is specified, per-user statistics will be printed, including
194 the user name, the number of commands invoked, total cpu time used
195 (in minutes), total number of I/O operations, and CPU storage integral
199 option is specified, the uid, user and system time (in seconds),
200 CPU storage integral, I/O usage, and command name will be printed
201 for each entry in the accounting data file.
205 flag is specified, all flags other than
210 flag is specified, only the
220 .Bl -tag -width /var/account/usracct -compact
221 .It Pa /var/account/acct
222 raw accounting data file
223 .It Pa /var/account/savacct
224 per-command accounting summary database
225 .It Pa /var/account/usracct
226 per-user accounting summary database
242 from the specification provided by various systems' manual pages.
244 .An Chris G. Demetriou Aq Mt cgd@postgres.berkeley.edu
246 While the behavior of the options in this version of
248 was modeled after the original version, there are some intentional
249 differences and undoubtedly some unintentional ones as well.
253 option has been added, and the
255 option now understands more options than it used to.
257 The formats of the summary files created by this version of
259 are very different from the those used by the original version.
260 This is not considered a problem, however, because the accounting record
261 format has changed as well (since user ids are now 32 bits).
263 The number of options to this program is absurd, especially considering
264 that there is not much logic behind their lettering.
266 The field labels should be more consistent.
268 The VM system does not record the CPU storage integral.