NAME
acctcms - Produces command usage summaries from accounting
records
SYNOPSIS
acctcms [-acjnspot] file ...
FLAGS
-a Displays output in ASCII summary format rather
than binary summary format. Each output line con-
tains the following information under its own
heading: command name, the number of times the
command was run, total K-core time, total CPU
time, total real time, mean memory size in kilo-
bytes (KB), mean CPU time per command, CPU usage
(called hog factor), the number of characters
transferred, and the number of blocks read. All
times are expressed in minutes.
The acctcms command normally sorts its output in
descending order by total K-core minutes. The unit
K-core minutes is a measure of the amount of
storage used (in KB) multiplied by the amount of
time the buffer was in use. The hog factor is the
total CPU time divided by the total real time. The
default command summary output format has the fol-
lowing headings:
o COMMAND NAME
o NUMBER CMDS
o TOTAL KOREMIN
o TOTAL CPU-MIN
o TOTAL REAL-MIN
o MEAN SIZE-K
o MEAN CPU-MIN
o HOG FACTOR
o CHAR TRNSFD
o BLOCKS READ
-c Sorts in descending order by total CPU time rather
than total K-core minutes.
-j Combines all commands called only once by writing
"***other" in the COMMAND NAME column.
-n Sorts in decending order by the number of times
each command was called.
-o Displays a command summary of nonprime-time com-
mands.
-p Displays a command summary of prime-time commands.
-s Assumes that any named file that follows this flag
is in binary format.
-t Processes all records as total accounting records.
The default binary format splits each heading into
prime time and nonprime-time parts.
DESCRIPTION
The acctcms command outputs data in a format called TOTAL
COMMAND SUMMARY. This command reads each file specified by
the file parameter, combines and sorts all records for
identically named processes, and writes them in a binary
format to the output device. Files are usually organized in
the acct file format. When you use the -o and -p flags
together, the acctcms command produces a summary report that
combines commands processed during both prime and nonprime
time. All the output summaries specify total usage, except
for the number of times run, CPU minutes, and real minutes,
which are split into prime and nonprime minutes.
EXAMPLES
To collect command accounting records from one or more
source files into a command summary file called today and to
maintain a running total summary of commands in a file
called cmtotal, add the following lines to an accounting
shell script:
acctcms [source File(s) ....] > today
cp total prev_tot
acctcms -s today prev_tot > cmtotal
acctcms -a -s cmtotal
First, the acctcms command is used to redirect command
records in File(s) that you specify to a file called today.
Next the old total command summary file is renamed prev_tot.
Then the command summary records that are collected in the
today and the prev_tot files are redirected to a new command
summary file called cmtotal. These are all binary files. The
last acctcms command outputs to the default output device
the contents of the cmtotal file in the ASCII default com-
mand summary format previously described, so that the report
may be viewed.
FILES
/usr/lbin/acct/acctcms
Specifies the command path.
/etc/acct/holidays
This is where prime time is set.
/usr/include/sys/acct.h, /usr/include/utmp.h
Accounting header files that define formats for
writing accounting files.
RELATED INFORMATION
Commands: acct(8), runacct(8)
Functions: acct(2)
Files: acct(4), holidays(4)
Acknowledgement and Disclaimer