ACCTSH(1M) — UNIX 3.0
NAME
acctsh − shell procedures for accounting
SYNOPSIS
chargefee login-name number
ckpacct [blocks]
dodisk
lastlogin
monacct number
nulladm file
prctmp
prdaily
prtacct file [ "heading" ]
runacct [mmdd] [mmdd state]
shutacct [ "reason" ]
startup
turnacct [ on | off | switch ]
DESCRIPTION
Chargefee is invoked to charge number dollars to login-name. A record is written to /usr/adm/fee, to be merged with other accounting records during the night.
Ckpacct is initiated via cron. It periodically checks the size of /usr/adm/pacct. If the size exceeds blocks, 1000 by default, turnacct will be invoked with argument switch.
Dodisk is invoked by cron to perform the disk accounting functions.
Lastlogin is invoked by runacct to update /usr/adm/acct/sum/loginlog, which shows the last date on which each person logged in.
Monacct should be invoked once each month or each accounting period. Number indicates which month or period it is. It creates summary files in /usr/adm/acct/fiscal and restarts summary file in /usr/adm/acct/sum. Nulladm creates file with mode 644 and insures owner is adm. It is called by lastlogin, runacct, and turnacct.
Prctmp can be used to print the session record file (normally /usr/adm/acct/nite/ctmp created by acctcon1 (see acctcon(1M)).
Prdaily is invoked by runacct to print a report of the previous day’s accounting. The report resides in /usr/adm/acct/sum/rprtxxxx where xxxx is the month and day of the report. The daily accounting reports may be printed (by the command “cat /usr/adm/acct/sum/rprt∗”) as often as desired and they must be explicitly deleted when no longer needed.
Prtacct can be used to format and print any total accounting file.
Runacct performs the accumulation of connect, process, fee, and disk accounting on a daily basis. It also creates summaries of command usage. For more information, see runacct(1M).
Shutacct should be invoked during a system shutdown to turn process accounting off and append a “reason” record to /usr/adm/wtmp. Startup should be called by rc(8) to turn the accounting on whenever the system is brought up.
Turnacct is an interface to accton (see acct(1M)) to turn process accounting on or off. The switch argument moves the current /usr/adm/pacct to the next free name in /usr/adm/pacct[1-9], turns accounting off, then turns it back on again. This procedure is called by ckpacct via the cron to keep the pacct file size smaller.
FILES
/usr/adm/feeaccumulator for fees
/usr/adm/pacctcurrent file for per-process accounting
/usr/adm/pacct[1-9]used if pacct gets large and during
execution of daily accounting procedure
/usr/adm/wtmplogin/logoff summary
/usr/adm/wtmp[1-9]used during daily accounting procedure
/usr/adm/acct/niteworking directory
/usr/lib/acctholds all accounting commands listed in
sub-class 1M of this manual
/usr/adm/acct/sumsummary directory, should be saved
SEE ALSO
acct(1M), acctcms(1M), acctcom(1), acctcon(1M), acctmerg(1M), acctprc(1M), fwtmp(1M), runacct(1M), acct(2), acct(5), utmp(5).
May 16, 1980