Merges total accounting files into an intermediary file or a daily report.
/usr/sbin/acct/acctmerg [ -a [ Specification ] ] [ -h [ Specification ] ] [ -i [ Specification ] ] [ -p [ Specification ] ] [ -q Filename ] [ -v [ Specification ] ] [ -t ] [ -u ] [ File ... ]
The acctmerg command merges process, connect-time, fee, disk-usage, and queuing (printer) total accounting records (in tacct binary or tacct ASCII format) and then writes the results to standard output. (See the tacct structure in the acct File Format for a description of the total accounting format). The acctmerg command reads the total accounting records from standard input and from the additional files (up to nine) specified by the File parameter. The acctmerg command then merges the records by identical keys, usually a user ID and name. To facilitate storage, the acctmerg command writes the output in binary format unless you use either the -a, -v, or -p flag.
The acctmerg command is called by the runacct command to produce either an intermediate report when one of the input files is full, or to merge the intermediate reports into a cumulative total. The intermediate report is stored in the /var/adm/acct/nite/daytacct file. The cumulative report is stored in the /var/adm/acct/sum/tacct file. The cumulative total is the source from which the monacct command produces the ASCII-format monthly summary report. The monthly summary report is stored in the /var/adm/acct/fiscal file.
The Specification variable allows you to select input or output fields, as illustrated in Example 1 on page 1-3. A field specification is a comma-separated list of field numbers, in the order specified in the tacct structure in the acct File Format. Field ranges may be used, with array sizes taken into account, except for the ta_name characters. In the following example:
The -h flag causes column headings to display for the following types of data, in this order:
The default displays all fields, otherwise specified as 1-18 or 1-, and produces wide output lines containing all the available accounting data.
Queueing system, disk usage, or fee data can be converted into tacct records by using the acctmerg -i Specification command.
Access Control: This command should grant execute (x) access only to members of the adm group.
acctmerg -i1-2,13,18 <dacct | acctmerg tacct >outputThe acctmerg command reads the field specifications for the user ID, login name, number of blocks, and number of disk samples (i1-2,13,18) from the dacct file, merges this information with a tacct record, and writes the result to standard output.
acctmerg -v <Jan.2.rpt >jan2.tmpNow edit the file jan2.tmp as desired. This command redirects the content of Jan2.rpt to Jan2.tmp, with the output in ASCII format.
acctmerg -i <jan2.tmp >jan2.rpt
The acctcms command, acctcom command, acctcon1 or acctcon2 command, acctdisk command, acctprc1, acctprc2, or accton command, fwtmp command, runacct command.
The acct file format, utmp, wtmp, failedlogin file format.
The acct subroutine.
Accounting Overview, Queuing System Overview for System Management 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.