acctcom
PURPOSE
Displays selected process accounting record summaries.
SYNOPSIS
acctcom [ [ options ] [ file ] ] ...
DESCRIPTION
The acctcom command reads from specified files, from
standard input, or from /usr/adm/pacct 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 parameters and if standard
input is assigned to a work station or to /dev/null (as
it is when a process runs in the background), acctcom
reads /usr/adm/pacct instead of standard input.
By default, if you specify any file parameters, acctcom
reads each chronologically by process completion time.
Usually, /usr/adm/pacct is the current file that you want
acctcom to examine. Because the ckpacct procedure keeps
this file from growing too large, a busy system may have
several pacct files. All but the current file have the
following 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 K bytes). 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 can also display the
fork/exec flag ("F"), the system exit value ("STAT"), the
ratio of total CPU time to elapsed time ("HOG FACTOR"),
the product of memory used and elapsed time ("KCORE
MIN"), the ratio of user time to total (system and user)
time ("CPU FACTOR"), the number of characters transferred
in input/output operations ("CHARS TRNSFD"), and the
total number of blocks read or written ("BLOCKS READ").
If a process ran with superuser authority, its name is
prefixed with a # (hash mark). If a process is not
assigned to a known work station (for example, when cron
runs it), a question mark ("?") appears in the "TTYNAME"
field.
Notes:
1. The acctcom command only reports 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 proc-
esses selected. The statistics will be dis-
played after the output records.
-b Reads backwards, showing the most recent com-
mands first. This flag has no effect when
acctcom reads standard input.
-C seconds Shows only processes whose total CPU time
(system time + user time), exceeds number of
seconds.
-e time Selects processes existing at or before the
specified time. You can use the NLTIME envi-
ronment variable to specify the order of
hours, minutes, and seconds. The default
order is hh[mm[ss]].
-E time Selects processes ending at or before the
specified time. You can use the NLTIME envi-
ronment variable to specify the order of
hours, minutes, and seconds. 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 group. You
can specify either the group ID or the group
name.
-h Instead of mean memory size, shows the frac-
tion 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 factor.
(See the -h flag for a discussion of how this
factor is calculated.)
-i Displays columns showing the number of char-
acters transferred in read or write oper-
ations (the I/O counts).
-I num Shows only processes transferring more than
num characters.
-k Instead of memory size, shows total kcore
minutes.
-l line Shows only processes belonging to work
station /dev/line.
-m Shows mean main memory size. This flag is on
by default. Specifying the -h or -k flags
turns off -m.
-n pattern Shows only commands matching pattern, where
pattern is a regular expression like those in
the ed command (see page 356), except that
here 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 file,
keeping the input data format. This flag
suppresses writing to standard output.
-O seconds Shows only processes with CPU system time
exceeding seconds.
-q Does not display any output records; just
displays the average statistics that are dis-
played with the -a flag.
-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. You can use the
NLTIME environment variable to specify the
order of hours, minutes, and seconds. The
default order is hh[mm[ss]].
-S time Shows only those processes starting at or
after the specified time. You can use the
NLTIME environment variable to specify the
order of hours, minutes, and seconds. The
default order is hh[mm[ss]].
-t Shows separate system and user CPU times.
-u user Shows only processes belonging to user. For
user, you can give a user ID, a login name
that is converted to a user ID, a # to select
processes run with superuser authority, or a
"?" 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
The following commands: "acctdisk, acctdusg,"
"acctcms," "acctcon," "acctmerg," "acctprc," "acct,"
"fwtmp," "ps," "runacct," and "su."
The acct system call, the acct and utmp files and the
environment miscellaneous facility in AIX Operating
System Technical Reference.
"Running System Accounting" and "Overview of Interna-
tional Character Support" in Managing the AIX Operating
System.