acctrpt Command
Purpose
Generates advanced accounting subsystem data reports.
Syntax
acctrpt [ -f filename ] [ -F ] [ -U uid ] [ -G gid ] [ -P projID ] [ -C command ] [ -b begin_time ] [ -e end_time ] [ -p projfile ] [ -n ]
acctrpt [ -f filename ] [ -F ] -L resource [ -b begin_time ] [ -e end_time ]
acctrpt [ -f filename ] [ -F ] -T [ -b begin_time ] [ -e end_time ]
acctrpt { -c | -x } [ -f filename ] [ -p projfile ] [ -n ]
acctrpt [-b begin_time] [-e end_time] [ [ [-U uid] [-G gid] [-C command] [-@ wpar] ] | [ -L resource [-@ wpar] ] ] [-n] [-f filename ]
Description
The acctrpt command displays the advanced accounting statistics. advanced accounting subsystem supports process accounting, LPAR accounting, and transaction accounting.
For process accounting, users can generate accounting reports by projects, by groups, by users, by commands, or by a combination of these four identifiers. The command arguments -U, -G, -P, and -C command arguments are used to generate process accounting reports. The order in which these arguments are specified affects the order in which the data is displayed in the report. For example, the acctrpt -U ALL -P ALL command sorts by UID first and project second.
For transaction accounting, users can generate accounting reports describing application transactions. Transaction reports provide scheduling and accounting information, such as transaction resource usage requirements. These reports consume data that is produced by applications that are instrumented with the application response and measurement application programming interface (APIs). The -T command argument is used to generate transaction accounting reports.
If the -U, -G, -P, -C, -L, and -T command arguments are not specified, individual process accounting records are displayed.
Flags
Item | Description |
---|---|
-@ wpar | Specifies the workload partition for which the report is generated. The -@ option is not supported when executed within a workload partition. |
-b begin_time | Specifies the begin time of an interval. The begin_time parameter is a 10-character string in the MMDDhhmmyy format, where MM is month, DD is day, hh is hour, mm is minute, and yy is the last 2 digits of the year. All characters are numeric. If begin_time is not specified, all encountered records that were written before end_time are considered. If neither end_time or begin_time is specified, all records are considered. |
-C command | Displays process accounting statistics for the specified command. More than one command name can be specified using a comma-separated list. Only the first 12 characters of the base command name are considered. To display all commands, specify -C ALL. |
-c | Displays the project definitions in human readable format. |
-e end_time | Specifies the end time of an interval. The end_time parameter is a 10-character string in the MMDDhhmmyy format, where MM is month, DD is day, hh is hour, mm is minute, and yy is the last 2 digits of the year. All characters are numeric. If end_time is not specified, all encountered records that were written after begin_time are considered. If neither end_time or begin_time is specified, all records are considered. |
-f filename | Specifies the path name of the accounting data file to be used. More than one file can be specified using a comma-separated list. If the -f flag is not specified, the /var/aacct/aacctdata file is used by default. |
-F | Displays information about the specified accounting data file. The report includes the host name, partition name, machine model, and serial number of the system where the accounting data file was generated. |
-G gid | Displays process accounting statistics for the specified GIDs. More than one GID can be specified using a comma-separated list. To display all GIDs, specify -G ALL. |
-L resource | Displays LPAR accounting statistics for the specified resource. The resource parameter must be one of the following
values:
|
-n | Displays the IDs in numbers. By default, names are displayed. |
-P projID | Displays process accounting statistics for the specified project ID. More than one project ID can be specified using a comma-separated list. To display all projects, specify -P ALL. |
-p projfile | Specifies the project definition file to be used to resolve the projects associated with the transaction records. If -p is not specified, the projects are resolved using the currently loaded projects. |
-T | Displays transaction accounting statistics. The -T argument cannot be specified with -U, -P, -G, -C, or -L flags. |
-U uid | Displays process accounting statistics for the specified UIDs. More than one UID can be specified using a comma-separated list. To display all UIDs, specify -U ALL. |
-x | Displays the project definitions in the project definition file format. |
Exit Status
Item | Description |
---|---|
0 | Successful completion. |
>0 | An error occurred. |
Security
Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
Examples
- To generate a file header report from the /var/aacct/acctdata data file, type:
acctrpt -F -f /var/aacct/acctdata
- To generate process accounting report by Users from the /var/aacct/acctdata data file, type:
acctrpt -U ALL -f /var/aacct/acctdata
- To generate a process accounting report for user ID
256
and user ID257
and command uname from the /var/aacct/acctdata data file, type:acctrpt -U 256 257 -C uname -f /var/aacct/acctdata
- To generate a process accounting report by projects and by users
from the/var/aacct/acctdata data file, type:
acctrpt -P ALL -U ALL -f /var/aacct/acctdata
- To generate CPU and Memory statistics from the /var/aacct/acctdata data file, type:
acctrpt -L cpumem -f /var/aacct/acctdata
- To display the project definitions associated with the accounting
records, type:
Information similar to the following is displayed:acctrpt -c -f /var/aacct/acctdata
PROJNAME PROJID AGGR ORIGIN System 0 ENABLED LOCAL
- To display the associated IDs in numbers, type:
acctrpt -P ALL -f /var/aacct/acctdata -n
Standard Output
Item | Description |
---|---|
File Name | The full path name of the accounting data file. |
Open Date | The timestamp of first transaction record in the data file. |
Last Close Date | The timestamp of last transaction record in the data file. |
Host Name | The host where the data file was produced. |
Partition Name | The partition where the data file was produced. |
Partition ID | The partition number where the data file was produced. |
System Model | The system model where the data file was produced. |
System ID | The system serial number where the data file was produced. |
Item | Description |
---|---|
PROJID | The project name (Project ID). |
UID | The user name (User ID). |
GID | The group name (Group ID). |
CMD | The base name of the executed command. |
CNT | The count of transaction records aggregated per row of accounting report. |
CPU | The CPU time (in seconds). |
LFILE | The local File I/O (in MB). |
DFILE | Other File I/O (in MB). |
LSOCKET | The local socket I/O (in MB). |
RSOCKET | Other socket I/O (in MB). |
DMEM | Page seconds of disk pages. |
PMEM | Page seconds of real pages. |
VMEM | Page seconds of virtual memory. |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
IDLE | The CPU idle time (in seconds). |
IOWAIT | The CPU I/O wait time (in seconds). |
SPROC | The system process time (in seconds). |
UPROC | The user process time (in seconds). |
INTR | The interrupt time (in seconds). |
IO | The number of I/Os. |
PGSPIN | The number of page swap-ins. |
PGSPOUT | The number of page swap-outs. |
LGPGUTIL | The average utilization of large page pool. |
PGRATE | The average page rate (per second). |
PMEMUTIL | The average amount of physical memory that is allocated to an LPAR (in MB). |
IOMEMUTIL | The average utilization of I/O memory entitlement (in MB). |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
DEVNAME | The device name. |
MOUNTPT | The mount point name. |
FSTYPE | The file system type. |
RDWR | The number of reads and writes. |
OPEN | The number of file opens. |
CREATE | The number of file creates. |
LOCKS | The number of file locks. |
XFERS | The data transferred (in MB). |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
NETIFNAME | The network interface name. |
NUMIO | The number of I/Os. |
XFERS | The data transferred (in MB). |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
DISKNAME | The disk name. |
BLKSZ | The disk block size (in bytes). |
XFERS | The number of disk transfers. |
READ | The number of reads from the disk. |
WRITE | The number of writes to the disk. |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
CLIENT# | The client partition number. |
SERVERID | The server Unit ID. |
UNITID | The device logical unit ID. |
BYTESIN | The data in (in MB). |
BYTESOUT | The data out (in MB). |
Item | Description |
---|---|
CNT | The count of transaction records aggregated per row of accounting report. |
CLIENT# | The client partition number. |
SERVERID | The server Unit ID. |
UNITID | The device logical unit ID. |
BYTESIN | The data in (in MB). |
BYTESOUT | The data out (in MB). |
Item | Description |
---|---|
PROJID | The project name (Project ID). |
CNT | The count of transaction records aggregated per row of accounting report. |
CLASS | The account class. |
GROUP | The application group name. |
NAME | The application name. |
TRANSACTION | The transaction name |
USER | The user name. |
RESPONSE | The response time (in milliseconds). |
QUEUED | The queued time (in milliseconds). |
USER | The CPU time (in milliseconds). |
If you specify the -@ flag , the acctrprt command displays workload partition names in the process accounting report and the LPAR accounting report.
TRID_agg_proc
cannot be aggregated on group IDs
and command names because these transaction records do not have the
respective fields. For such records, the acctrpt command displays a *
(asterisk) character
in the command name field and a value of -2
in the
group ID field. It is an indication that these records are not aggregated
and the caller has to look up for the command name.Files
Item | Description |
---|---|
/usr/bin/acctrpt | Contains the acctrpt command. |
/var/aacct/acctdata | Contains the default accounting data file. |