Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct/*

acctcms

acctcom

acctcon1, acctcon2

acctdisk, acctdusg

runacct

acct

utmp



ACCTMERG(8,C)               AIX Commands Reference                ACCTMERG(8,C)



-------------------------------------------------------------------------------
acctmerg



PURPOSE

Merges total accounting files.

SYNTAX


                        +-----------------------------+ +--------+ +--------+
/usr/lib/acct/acctmerg -| +-------+   +-------------+ |-| +----+ |-|       1|-|
                        +-| -a -i |---|2            |-+ +-| -t |-+ +- file -+
                         ^| -h -p |   +- fieldspec -+|   ^| -u ||   ^      |
                         || -v    |                  |   |+----+|   +------+
                         |+-------+                  |   +------+   9 maximum
                         +---------------------------+

-----------------
1 acctmerg always reads standard input in addition to any named files.
2 Do not put a blank between these items.


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 Operating 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,
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).  The dacct file contains these
records and can be merged into an existing total accounting file, tacct, with:

  acctmerg  -i1-2,13,18  <dacct | acctmerg  tacct  >output





Processed November 8, 1990       ACCTMERG(8,C)                                1





ACCTMERG(8,C)               AIX Commands Reference                ACCTMERG(8,C)



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

See the following commands:  "acct/*,"  "acctcms,"  "acctcom," "acctcon1,
acctcon2," "acctdisk, acctdusg" and "runacct."

See the acct system call and the acct and utmp files in AIX Operating System
Technical Reference.

See "Running System Accounting" in Managing the AIX Operating System.


















Processed November 8, 1990       ACCTMERG(8,C)                                2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026