acctsh(8) CLIX acctsh(8)
NAME
acctsh: chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp,
prdaily, prtacct, shutacct, startup, turnacct - Runs shell procedures for
accounting
SYNOPSIS
/usr/lib/acct/chargefee login-name number
/usr/lib/acct/ckpacct [blocks]
/usr/lib/acct/dodisk [-o] [file-system ... ]
/usr/lib/acct/lastlogin
/usr/lib/acct/monacct number
/usr/lib/acct/nulladm file
/usr/lib/acct/prctmp
/usr/lib/acct/prdaily [-l] [-c] [mmdd]
/usr/lib/acct/prtacct file [heading]
/usr/lib/acct/shutacct [reason]
/usr/lib/acct/startup
/usr/lib/acct/turnacct {on|off|switch}
DESCRIPTION
The chargefee command charges a number of units to login-name. A record
is written to /usr/adm/fee to be merged with other accounting records at
the time specified with runacct. (In most cases, this time occurs during
the night.)
The ckpacct command checks the size of /usr/adm/pacct and should be
invoked by cron. If the size exceeds blocks (1000 by default), turnacct
will be invoked with the switch argument. If the number of free disk
blocks in the /usr file system falls below 500, ckpacct will automatically
turn off the collection of process accounting records with the off
argument to turnacct. When 500 blocks or more are restored, accounting
will be activated again.
The dodisk performs the disk accounting functions and should be invoked by
cron. By default, it will perform disk accounting on the special files in
/etc/fstab. If the -o flag is specified, dodisk will run disk accounting
based on login directory, which will be slower. The value of file-system
2/94 - Intergraph Corporation 1
acctsh(8) CLIX acctsh(8)
specifies one or more file system names where disk accounting will occur.
If file-systems are specified, disk accounting will be performed on these
file systems only. If the -o flag is specified, file-systems should be
directories on which file systems are mounted. If -o is omitted, file-
systems should be the special filenames of mountable file systems.
The lastlogin command updates /usr/adm/acct/sum/loginlog, which shows the
last date on which each person logged in. It is invoked by runacct.
monacct should be invoked once each month or each accounting period. The
value of number indicates which month or period it is invoked. If number
is not given, it defaults to the current month (01-12). This default is
useful if monacct will execute with cron on the first day of each month.
The monacct command creates summary files in /usr/adm/acct/fiscal and
restarts summary files in /usr/adm/acct/sum.
The nulladm command creates file with mode 664 and ensures that owner and
group are the adm account. It is called by various accounting shell
procedures.
The prctmp command displays the session record file (usually
/usr/adm/acct/nite/ctmp created by acctcon).
The prdaily commands formats a report of the previous day's accounting
data; it is invoked by runacct. The report resides in
/usr/adm/acct/sum/rprtmmdd, where mmdd is the month and day of the report.
The user can display the current daily accounting reports by executing
prdaily. Previous accounting reports can be displayed with the mmdd
option specifying the exact report date desired. The -l flag displays a
report of exceptional usage by login ID for the specified date. monacct
deletes previous daily report. The -c flag displays a report of
exceptional resource usage by command and may be used on the current day's
accounting data only.
The prtacct command formats and displays any total accounting file in
tacct structure format.
The shutacct command is invoked during a system shutdown to turn process
accounting off and append a reason record to /etc/wtmp.
The startup command turns accounting on when the system acquires a
multiuser state.
The turnacct command is an interface to accton to turn process accounting
on or off (see acct). The switch argument turns accounting off, moves the
current /usr/adm/pacct to the next free name in /usr/adm/pacctincr (where
incr is a number starting with 1 and incrementing by 1 for each additional
pacctincr file), and then turns accounting back on again. the turnacct
command is called by ckpacct and thus can be invoked by cron(8) and
therefore maintain pacctincr at a reasonable size. the turnacct command
starts and stops process accounting using init and shutdown, respectively.
2 Intergraph Corporation - 2/94
acctsh(8) CLIX acctsh(8)
FILES
/usr/adm/fee Accumulator for fees
/usr/adm/pacct Current file for per-process accounting
/usr/adm/pacct* Used during daily accounting execution
/etc/wtmp Login/logout summary
/usr/lib/acct/ptelus.awk Limits for exceptional usage by login ID
/usr/lib/acct/ptecms.awk Limits for exceptional usage by command name
/usr/adm/acct/nite Working directory
/usr/lib/acct Holds all accounting commands in section (8)
/usr/adm/acct/sum Summary directory that should be saved
RELATED INFORMATION
Commands: acct(1), acctcms(8), acctcon(8), acctmerg(8), acctprc(8),
diskusg(8), fwtmp(8), runacct(8), acctcom(8), cron(8)
Functions: acct(2)
Files: acct(4), utmp(4)
2/94 - Intergraph Corporation 3