up | Inhaltsverzeichniss | Kommentar

Manual page for ACCTSH(8)

chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp, prdaily, prtacct, runacct, shutacct, startup, turnacct - shell procedures for accounting


/usr/lib/acct/chargefee login-name number

/usr/lib/acct/ckpacct [ blocks ]

/usr/lib/acct/dodisk [ -o ] [ filename... ]


/usr/lib/acct/monacct number

/usr/lib/acct/nulladm filename

/usr/lib/acct/prctmp filename

/usr/lib/acct/prdaily [ -cl ] [ mmdd ]

/usr/lib/acct/prtacct filename [ heading ]

/usr/lib/acct/runacct [ mmdd ] [ mmdd state ]

/usr/lib/acct/shutacct [ reason ]


/usr/lib/acct/turnacct on|off|switch



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 by cron.8 every hour. It periodically checks the size of /var/adm/pacct. If the size exceeds blocks, 1000 by default, turnacct is called with the argument switch. If the number of free disk blocks in the /usr file system falls below 500, ckpacct automatically turns off the collection of process accounting records using the off argument to turnacct. When at least this number of blocks is restored, accounting is activated again. This feature is sensitive to the frequency at which ckpacct is executed, usually by cron.


dodisk should be executed by cron to perform the disk accounting functions. By default, it does disk accounting on the 4.2 file systems in /etc/fstab. filenames specify the one or more filesystem names where disk accounting will be done. If filenames are used, disk accounting will be done on these filesystems only. They should be the special file names of mountable filesystems.


lastlogin is invoked by runacct to update /var/adm/acct/sum/loginlog, which shows the last date on which each person logged in. lastlogin deletes the entries of users no longer in /etc/passwd and creates new entries.


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-12). This default is useful if monacct is executed by cron.8 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 filename with mode 664 and insures that owner and group are adm. It is called by various accounting shell procedures.


prctmp can be used to print the session record file with headings (normally /var/adm/acct/nite/ctmp created by acctcon1 (see acctcon.8 The heading specifies device, user ID, login name, prime connect time (in seconds), non-prime connect time (in seconds), session starting time (numeric) and starting date and time.


prdaily is invoked by runacct to format a report of the previous day's accounting 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. Previous daily reports are cleaned up and therefore inaccessible after each invocation of monacct.


prtacct can be used to format and print any total accounting (tacct) file with headings. See Chapter 8 in the [a manual with the abbreviation ADMIN] manual, for an explanation of this output.


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.8


shutacct should be invoked during a system shutdown (usually in /etc/shutdown) to turn process accounting off and append a ``reason'' record to /var/adm/wtmp. If reason is not specified, shutdown is provided as a default reason.


startup should be called by /etc/rc to turn the accounting on whenever the system is brought up.


turnacct is an interface to accton (see acct.8 to turn process accounting on or off. The switch argument turns accounting off, moves the current /var/adm/pacct to the next free name in /var/adm/pacctincr (where incr is a number starting with 1 and incrementing by one for each additional pacct file), then turns accounting back on again. This procedure is called by ckpacct and thus can be taken care of by cron and used to keep pacct to a reasonable size. This command is restricted to the super-user.



Do a slower version of disk accounting by login directory. filenames should be mount points of mounted filesystem.


Prints a report of exceptional resource usage by command. This may be used on current day's accounting data only.
Print a report of exceptional usage by login ID for the specifed date.


list of file systems /var/adm/fee accumulator for fees
current file for per-process accounting
used if pacct gets large and during execution of daily accounting procedure
login/logoff summary
limits for exceptional usage by login id
limits for exceptional usage by command name
working directory
directory of accounting commands
summary directory, should be saved


acctcom.1 acct.2v acct.5 utmp.5v acct.8 acctcms.8 acctcon.8 acctmerg.8 acctprc.8 cron.8 diskusg(8), fwtmp.8 runacct.8

[a manual with the abbreviation ADMIN]

index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 21/April/97