[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

acctcms Command

Purpose

Produces command-usage summaries from accounting records.

Syntax

/usr/sbin/acct/acctcms-t -a -o ] [ -p ] ] [ -c ] [ -j ] [ -n ] [ -s ] [ File ... ]

Description

The acctcms command reads each file specified by the File parameter, adds and sorts all records for identically named processes, and writes the records to standard output. By default, the output file is in binary format. Input files are usually in the acct file format.

When you use the -o and -p flags together, the acctcms command produces a report that combines prime and nonprime time. Prime and nonprime times are defined by entries in the /etc/acct/holidays file. Prime times are assumed to be the period when the system is most active, such as weekdays. Saturdays and Sundays are always nonprime time for the accounting systems, as are any holidays that you specify in the /etc/acct/holidays file. All the output summaries are of total usage, except for number of times run, CPU minutes, and real minutes, which are split into prime and nonprime minutes.

Flags

-a Displays output in ASCII summary format rather than binary summary format. Each output line contains the command name, the number of times the command was run, total kcore time (memory measurement in kilobyte segments), total CPU time, total real time, mean memory size (in K-bytes), mean CPU time per invocation of the command, and the CPU usage factor. The listed times are all in minutes. The acctcms command normally sorts its output by total kcore minutes. The unit kcore minutes is a measure of the amount of memory used (in kilobytes) multiplied by the amount of time it was in use. This flag cannot be used with the -t flag.

The default items have the following headings in the output:

         TOTAL COMMAND SUMMARY 
 
 
COMMAND  NUMBER  TOTAL     TOTAL    TOTAL    
NAME     CMDS    KCOREMIN  CPU-MIN  REAL-MIN 
 
 
MEAN    MEAN     HOG     CHARS   BLOCKS
SIZE-K  CPU-MIN  FACTOR  TRNSFD  READ
-c Sorts by total CPU time rather than total kcore minutes. When this flag is used with the -n flag, only the -n flag takes effect.
-j Combines all commands called only once under the heading other.
-n Sorts by the number of times the commands were called. When this flag is used with the -c flag, only the -n flag takes effect.
-o Displays a command summary of nonprime time commands. You can use this flag only when the -a flag is used.
-p Displays a command summary of prime time commands. You can use this flag only when the -a flag is used.
-s Assumes that any named files that follow this flag are already in binary format.
-t Processes all records as total accounting records. The default binary format splits each field into prime and nonprime time sections. This flag cannot be used with the -a flag.

Security

Access Control: This command should grant execute (x) access only to members of the adm group.

Examples

To collect daily command accounting records in a today file and maintain a running total in a total file, add the following to a shell script:

acctcms File . . . > today
cp total previoustotal
acctcms -s today previoustotal > total
acctcms -a -s total

The File parameters that you specify are redirected to a file called today, added to the previous total (in a file renamed previoustotal) to produce a new total (called total). All files are binary files. In the last line, the -a flag displays the total file in ASCII format so you can view the report.

Files

/etc/acct/holidays Specifies prime and nonprime time for accounting records.
/usr/sbin/acct/acctcms Contains the acctcms command.

Related Information

The lastcomm command, runacct command.

The acct file format, utmp, wtmp, failedlogin file format.

The acct subroutine.

For more information about the Accounting System, the preparation of daily and monthly reports, and the accounting files, see the Accounting Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.

Setting Up an Accounting System in AIX Version 4.3 System Management Guide: Operating System and Devices describes the steps you must take to establish an accounting system.

Accounting Commands in AIX Version 4.3 System Management Guide: Operating System and Devices.

AIX Performance Monitoring and Tuning Commands in AIX Versions 3.2 and 4 Performance Tuning Guide.


[ Previous | Next | Contents | Glossary | Home | Search ]