Reports and analysis

The Advanced Accounting subsystem provides accounting data for a wide variety of resources that are typically included within charge-back mechanisms.

The format of the accounting data file, as well as the format of the individual accounting records are in the sys/aacct.h are in the header file. Use the acctrpt command to parse the accounting data file and produce accounting reports. You can use this command to produce three types of accounting reports: Process Accounting reports, LPAR Accounting reports, and Transaction Accounting reports, and Workload Partition Accounting reports.

Along with the acctrpt command, AIX provides a sample program that parses the accounting data file. This program is readaacct. This program can be used to analyze accounting data and import accounting data into a spreadsheet. This command has the following syntax:
/usr/samples/aacct/readaacct [-F file] [-t trid] [-b begin_time] [-e end_time] [-c] [-h] [-@ <wpar>]
This command has the following flags:
  • The -c flag is used to display information in colon-separated format.
  • The -h flag is used to display information about the file, such as the hostname and machine model, and serial number of where the data was produced.
  • The -b and -e flags give a time-based view of the information.
  • The -t flag gives a record-based view of the information.
  • The -@ flag gives records specific to a Workload Partition.

The following is an example of the output displayed after running the readaacct -F /tmp/afile -h command:

# readaacct -F /tmp/afile -h
File Name=/tmp/a
Version=0
Flags=0
Offset=3084288
File Size=3145728
State=2
ID=1
First Time=1087266596
Last Time=1087301336
System ID=IBM,01025990A
System Model=IBM,7040-681
Host Name=bigboylp9
Partition Name=bigboylp9
Partition Number=9
--------------------------------------------------------------
Transaction ID=1
Flags=f1
Transaction Project=0
Sub project ID=0
Transaction start time=6-14-2004 21:29:56
UID=0
GID=0
PID=335912
eWLM Service Class=0
Flags=1
Command Name=acctctl
Controlling Terminal's Device Number=23,5
Process Start Time=1087266596
WLM Class key=7770295601810996315
Incrementing Statistics:
Elapsed process time=0.032406 seconds
Elapsed thread time=0.032406 seconds
Process CPU time=0.015238 seconds
Elapsed Page seconds of disk pages=0 seconds
Elapsed Page seconds of real pages=5 seconds
Elapsed Page seconds of virtual memory=5 seconds
Bytes of local file I/O=0
Bytes of other file I/O=0
Bytes of local sockets=0
Bytes of remote sockets=0