HP-UX Reference (11i v2 04/09) - 1M System Administration Commands A-M (vol 3)
a
acctsh(1M) acctsh(1M)
NAME
chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp, prdaily, prtacct, shutacct, startup, tur-
nacct - shell procedures for accounting
SYNOPSIS
/usr/sbin/acct/chargefee
login-name number
/usr/sbin/acct/ckpacct
[ blocks ]
/usr/sbin/acct/dodisk
[-o][files ... ]
/usr/sbin/acct/lastlogin
/usr/sbin/acct/monacct
number
/usr/sbin/acct/nulladm
file
/usr/sbin/acct/prctmp
/usr/sbin/acct/prdaily
[-l][
-c][mmdd ]
/usr/sbin/acct/prtacct
file [ heading ]
/usr/sbin/acct/shutacct
[ reason ]
/usr/sbin/acct/startup
/usr/sbin/acct/turnacct on
off switch
DESCRIPTION
chargefee Can be invoked to charge a number of units to login-name . A record is written to
/var/adm/fee, to be merged with other accounting records during the night.
ckpacct Should be initiated via cron(1M). It periodically checks the size of /var/adm/pacct
.
If the size exceeds blocks , 1000 by default,
turnacct is invoked with argument switch.
If the number of free disk blocks in the /var file system falls below 500,
ckpacct
automatically turns off the collection of process accounting records via the off argument
to turnacct. When at least this number of blocks is restored, the accounting will be
activated again. This feature is sensitive to the frequency at which ckpacct is exe-
cuted, usually by cron.
dodisk Should be invoked by cron to perform the disk accounting functions. By default, it will
do disk accounting on the special files in /etc/fstab. If the -o flag is used, it does a
slower version of disk accounting by login directory. files specifies the one or more
filesystem names where disk accounting is to be done. If files is used, disk accounting
will be done on these filesystems only. If the -o flag is used, files should be mount
points of mounted filesystem. If omitted, they should be the special file names of mount-
able filesystems.
lastlogin Invoked by runacct to update /var/adm/acct/sum/loginlog which shows the
last date on which each user logged in (see runacct(1M)).
monacct Should be invoked once each month or each accounting period. number indicates which
month or period it is. If number is not given, it defaults to the current month (01 through
12). This default is useful if monacct is to executed via cron on the first day of each
month. monacct creates summary files in /var/adm/acct/fiscal and restarts
summary files in /var/adm/acct/sum.
nulladm Creates file with mode 664 and ensures that owner and group are adm. It is called by
various accounting shell procedures.
prctmp Can be used to print the session record file normally /var/adm/acct/nite/ctmp
created by acctcon1 (see acctcon (1M)).
prdaily Invoked by runacct (see runacct (1M)) to format a report of the previous day’s account-
ing data. The report resides in /var/adm/acct/sum/rprtmmdd where mmdd is the
month and day of the report. The current daily accounting reports may be printed by
typing prdaily . Previous days’ accounting reports can be printed by using the mmdd
option and specifying the exact report date desired. The -l flag prints a report of excep-
tional usage by login id for the specifed date. Previous daily reports are cleaned up and
therefore inaccessible after each invocation of monacct. The -c flag prints a report of
exceptional resource usage by command, and can be used on current day’s accounting
Section 1M−−14 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: September 2004