acctmerg
PURPOSE
Merges total accounting files.
SYNOPSIS
/usr/lib/acct/acctmerg [-ahvip[fspec]] [-tu][file]
DESCRIPTION
The acctmerg command reads records from standard input
and up to nine additional files, all in the tacct binary
format or the tacct ASCII format. It merges these by
adding records with keys (normally user ID and name) that
are identical, and expects the input records to be sorted
by those key fields. It writes these merged records to
standard output.
The optional fieldspecs allow you to select input or
output fields. A field specification is a comma-
separated list of fields or field ranges. Field numbers
are in the order specified in the tacct file in AIX Oper-
ating System Technical Reference, with array sizes,
except for the ta_name characters, taken into account.
For example, "-h2-3,7,15-13,2" displays the login name,
prime CPU and connect times, fee, queueing system, and
disk usage data, and the login name again, in that order,
with column headings. The default specification is "all
fields" ("1-18" or "1-"), which produces very wide output
lines containing all the available accounting data.
Queueing system, disk usage, or fee data can be converted
into tacct records using the -ifieldspec argument. For
example, disk accounting records, produced by acctdisk,
consist of lines containing the user ID, login name,
number of blocks, and number of disk samples (always 1).
A file, dacct, containing these records can be merged
into an existing total accounting file, tacct, with:
acctmerg -i1-2,13,18 <dacct |. acctmerg tacct >output
FLAGS
-a[fieldspec] Produces output in the form of ASCII
records.
-h[fieldspec] Displays column headings. This flag
implies -a but is effective with -p or -v.
-i[fieldspec] Expects input files composed of ASCII
records.
-p[fieldspec] Displays input without processing.
-t Produces a single record that contains the
totals of all input.
-u Summarizes by user ID rather than by user
name.
-v[fieldspec] Produces output in ASCII format, with more
precise notation for floating-point
numbers.
EXAMPLE
The following sequence is useful for making repairs to
any file in tacct format:
"
acctmerg -v <file1 >file2"
edit file2 as desired . . .
"acctmerg -a <file2 >file1"
RELATED INFORMATION
The following commands: "acct," "acctcms," "acctcom,"
"acctcon," "acctdisk, acctdusg," "fwtmp," "acctprc,"
and "runacct."
The acct system call and the acct and utmp files in AIX
Operating System Technical Reference.
"Running System Accounting" in Managing the AIX Operating
System.