ACCTCOM(8,C) AIX Commands Reference ACCTCOM(8,C)
-------------------------------------------------------------------------------
acctcom
PURPOSE
Displays selected process accounting record summaries.
SYNTAX
+------------------------+
| one of |
/usr/bin/acctcom ---| +---------+ |--->
| | -q | |
| +----| -o file |-----+ |
+-| +---------+ |-+
| +------------+ |
+---| -a -i -t |---+
^ | -b -k -v | |
| | -f -m | |
| | -h -r | |
| +------------+ |
+----------------+
+------------------------------+ +------------+
>---| +----------------------+ |---| |---|
+---| -C seconds -e time |---+ +--- file ---+
^ | -g group -E time | | ^ |
| | -H factor -s time | | +--------+
| | -I num -S time | |
| | -l line | |
| | -n pattern | |
| | -O seconds | |
| | -u user | |
| +----------------------+ |
+--------------------------+
DESCRIPTION
The acctcom command reads from specified files, standard input, or the
/usr/adm/pacct file and writes records (selected by flags) to standard output.
The input file format is described under acct in AIX Operating System Technical
Reference.
If you do not specify any file arguments and standard input is assigned to a
work station or /dev/null file (as it is when a process runs in the
background), acctcom reads the /usr/adm/pacct file instead of standard input.
Processed November 8, 1990 ACCTCOM(8,C) 1
ACCTCOM(8,C) AIX Commands Reference ACCTCOM(8,C)
By default, if you specify any file arguments, the acctcom command reads each
file chronologically by process completion time. Usually /usr/adm/pacct is the
current file that you want acctcom to examine. Because the ckpacct command
keeps this file from growing too large, a busy system can have several pacct
files. All but the current file have the path name /usr/adm/pacct?, where ? is
an integer incremented each time a new file is created.
Each record represents one completed process. The default display consists of
the command name, user name, tty name, start time, end time, real seconds, CPU
seconds, and mean memory size in kilobytes. These default items have the
following headings in the output:
COMMAND START END REAL CPU MEAN
NAME USER TTYNAME TIME TIME (SECS) (SECS) SIZE(K)
By using the appropriate flags, you also can display the following system
statistics:
Flag Statistic
F Fork/exec
STAT System exit value
HOG FACTOR Ratio of total CPU time to elapsed time
KCORE MIN Product of memory used and elapsed time
CPU FACTOR Ratio of user time to total (system and user) time
CHARS TRNSFD Number of characters transferred in input/output operations
BLOCKS READ Total number of blocks read or written.
If a process ran with superuser authority, its name is prefixed with a #
(number sign). If a process is not assigned to a known work station (for
example, when the cron command runs it), a ? (question mark) appears in the
"TTYNAME" field.
Notes:
1. The acctcom command reports only on processes that have finished. Use the
ps command to examine active processes.
2. If a specified time is later than the current time, it is interpreted as
occurring on the previous day.
FLAGS
-a Shows some average statistics about the processes selected. The
statistics are displayed after the output records.
Processed November 8, 1990 ACCTCOM(8,C) 2
ACCTCOM(8,C) AIX Commands Reference ACCTCOM(8,C)
-b Reads backwards, showing the most recent commands first. This
flag has no effect when acctcom reads standard input.
-C seconds Shows only processes whose total CPU time (system time plus user
time) exceeds the number specified in the seconds variable.
-e time Selects processes existing at or before the specified time. The
order of hours, minutes, and seconds is displayed in the current
locale format. The default order is hh:mm:ss.
-E time Selects processes ending at or before the specified time. The
order of hours, minutes, and seconds is displayed in the current
locale format. The default order is hh:mm:ss. If you specify the
same time for both the -E and -S flags, acctcom displays the
process that existed at the specified time.
-f Displays the fork/exec flag and the system exit value columns in
the output.
-g group Selects processes belonging to the specified group. You can
specify either the group ID or the group name.
-h Instead of mean memory size, shows the fraction of total available
CPU time consumed by the process while it ran (hog factor). This
factor is computed as (total CPU time)/(elapsed time).
-H factor Shows only processes that exceed the specified factor. See the -h
flag for a discussion of how this factor is calculated.
-i Displays columns showing the number of characters transferred in
read or write operations (I/O counts).
-I num Shows only processes transferring more characters than specified
by the num variable.
-k Instead of mean memory size, shows total k-core minutes.
-l line Shows only processes belonging to work station specified by the
/dev/line file.
-m Shows mean memory size. This flag is on by default. Specifying
the -h or -k flags turns off -m.
-n pattern Shows only commands matching a pattern, where the pattern variable
is a regular expression like those in the ed command (see page
ed-1). However, in this case you can use a + (plus sign) as
a special symbol for one or more occurrences of the preceding
character.
-o file Copies selected process records to the specified file, keeping the
input data format. This flag suppresses writing to standard
output.
Processed November 8, 1990 ACCTCOM(8,C) 3
ACCTCOM(8,C) AIX Commands Reference ACCTCOM(8,C)
-O seconds Shows only processes with CPU system time exceeding the specified
number of seconds.
-q Displays the average statistics that are displayed with the -a
flag but does not display output records.
-r Shows CPU factor. This factor is computed as (user-time) /
(system-time + user-time).
-s time Shows only those processes that existed on or after the specified
time. The order of hours, minutes, and seconds is displayed in
the current locale format. The default order is hh:mm:ss.
-S time Shows only those processes starting at or after the specified
time. The order of hours, minutes, and seconds is displayed in
the current locale format. The default order is hh:mm:ss.
-t Shows separate system and user CPU times.
-u user Shows only processes belonging to user. The user variable can be
a user ID, login name that is converted to a user ID, # to select
processes run with superuser authority, or "?" to select processes
associated with unknown user IDs.
-v Eliminates column headings from the output.
FILES
/usr/adm/pacct Current process accounting file.
/etc/passwd User names and user IDs.
/etc/group Group names and group IDs.
RELATED INFORMATION
See the following commands: "acctdisk, acctdusg," "acctcms," "acctcon1,
acctcon2," "acctmerg," "acct/*," "ps," and "runacct."
See the acct system call, the acct and utmp files, and the environment
miscellaneous facility in AIX Operating System Technical Reference.
See "Running System Accounting" and "Introduction to International Character
Support" in Managing the AIX Operating System.
Processed November 8, 1990 ACCTCOM(8,C) 4