Installation guide

commands. The following sections describe the process accounting shell
scripts and commands.
12.5.1 The accton Command
The accton command enables and disables process accounting. The
accton command has the following syntax:
/usr/sbin/acct/accton
[ filename]
If you do not specify the
filename
variable, process accounting is disabled.
If you specify the
filename
variable, process accounting is turned on and
the kernel writes process accounting records to the specified file. Usually,
this file is the /var/adm/pacct file; however, you can specify a different
process accounting database file. The file must exist in the /var/adm
directory, be owned by user adm, and be a member of the adm login group.
_______________________ Note _______________________
The runacct and turnacct shell scripts use the
/var/adm/pacct process accounting database file. If you
specify a process accounting database file other than the
/var/adm/pacct file, the runacct and turnacct shell scripts
will be affected.
12.5.2 The turnacct Shell Script
The turnacct shell script controls the process accounting functions and
creates process accounting files. You must be superuser to use the shell
script. The turnacct script has the following syntax:
turnacct
[ on| off| switch]
The turnacct on shell script turns on process accounting by invoking the
accton shell script with the /var/adm/pacct file argument.
The turnacct off shell script turns off process accounting by invoking
the accton command without an argument to disable process accounting.
The turnacct switch shell script moves the contents of the
/var/adm/pacct file to the /var/adm/pacct
n
file and then creates a
new /var/adm/pacct file.
12.5.3 The ckpacct Shell Script
The /var/adm/pacct file can grow in size. If the /var/adm/pacct file is
larger than a specified limit and if enough disk space is available, the
Administering the System Accounting Services 12–23