Installation guide

ckpacct script invokes the turnacct switch shell script to move the
contents of the /var/adm/pacct file to the /var/adm/pacct
n
file and
create a new /var/adm/pacct file.
You can set up your cron daemon to invoke the ckpacct script
periodically. Refer to Section 12.2.4 for more information.
The ckpacct shell script has the following syntax:
ckpacct
[ blocksize]
The
blocksize
variable specifies the size limit (in disk blocks) for the
/var/adm/pacct file. The default size is 500 disk blocks.
If you invoke the ckpacct shell script, the script checks the number of
disk blocks that are available in the /var/adm directory. If the number of
available blocks is less than the size limit, process accounting is disabled
by invoking the turnacct off shell script. A diagnostic message is
displayed and mailed to the address that is specified with the MAILCOM
environment variable. Use the putenv function to set the MAILCOM
environment variable to the following command:
mail root adm
The following diagnostic message shows that there are 224 disk blocks
remaining in the /var/adm directory:
ckpacct: /var/adm too low on space (224 blocks)
"turning acctg off"
The ckpacct shell script continues to display diagnostic messages until
adequate space exists in the /var/adm directory.
12.5.4 The acctcom Command
The acctcom command displays summaries of process accounting records.
Command options allow you to specify the type and format of the output.
You do not have to be superuser to use the acctcom command.
The acctcom command displays information only about processes that
have terminated; use the ps command to display information about active
processes. The acctcom command has the following syntax:
/usr/bin/acctcom
[ option...] [ filename...]
If you do not specify the
filename
variable, the command uses the
/var/adm/pacct file to obtain the process accounting records. You can use
the
filename
variable to specify a different process accounting file that has
the acct.h header file structure. If you specify more than one
filename
variable, the acctcom command reads the files in chronological order.
12–24 Administering the System Accounting Services