Produces command-usage summaries from accounting records.
/usr/sbin/acct/acctcms [ -t | -a [ -o ] [ -p ] ] [ -c ] [ -j ] [ -n ] [ -s ] [ File ... ]
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.
Access Control: This command should grant execute (x) access only to members of the adm group.
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.
/etc/acct/holidays | Specifies prime and nonprime time for accounting records. |
/usr/sbin/acct/acctcms | Contains the acctcms command. |
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.