Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acct(1M)

acctcms(1M)

acctcom(1)

acctcon(1M)

acctmerg(1M)

acctprc(1M)

cron(1M)

diskusg(1M)

fwtmp(1M)

runacct(1M)

acct(2)

acct(4)

utmp(4)



acctsh(1M)                                             acctsh(1M)



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

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

     /usr/lib/acct/ckpacct [blocks]

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

     /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/runacct [mmdd] [mmdd state]

     /usr/lib/acct/shutacct [ "reason" ]

     /usr/lib/acct/startup

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

DESCRIPTION
     Chargefee can be invoked to charge a number of units to
     login-name.  A record is written to /usr/adm/fee, to be
     merged with other accounting records at a later time.

     Ckpacct should be initiated via cron(1M).  It periodically
     checks the size of /usr/adm/pacct.  If the size exceeds
     blocks, 500 by default, turnacct will be invoked with argu-
     ment switch.  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 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
     executed, usually by cron.

     Dodisk should be invoked by cron to perform the disk
     accounting functions.  By default, it will do disk account-
     ing on the special files in /etc/checklist.  If the -o flag
     is used, it will do a slower version of disk accounting by



Page 1                            CX/UX Administrator's Reference





acctsh(1M)                                             acctsh(1M)



     login directory.  Files specify the one or more filesystem
     names where disk accounting will be done.  If files are
     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 spe-
     cial file names of mountable filesystems.

     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.  If
     number is not given, it defaults to the current month
     (01-12).  This default is useful if monacct is to executed
     via cron(1M) on the first day of each month.  Monacct
     creates summary files in /usr/adm/acct/fiscal and restarts
     summary files in /usr/adm/acct/sum.

     Nulladm creates file 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 (nor-
     mally /usr/adm/acct/nite/ctmp created by acctcon1 (see
     acctcon(1M)).

     Prdaily is invoked by runacct to format a report of the pre-
     vious day's accounting data.  The report resides in
     /usr/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 specify-
     ing the exact report date desired.  The -l flag prints a
     report of exceptional 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 may be used on current day's accounting data only.

     Prtacct can be used to format and print any total accounting
     (tacct) file.

     Runacct performs the accumulation of connect, process, fee,
     and disk accounting on a daily basis.  It also creates sum-
     maries of command usage.  For more information, see
     runacct(1M).

     Shutacct should be invoked during a system shutdown (usually
     in /etc/shutdown) to turn process accounting off and append
     a ``reason'' record to /etc/wtmp.




Page 2                            CX/UX Administrator's Reference





acctsh(1M)                                             acctsh(1M)



     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(1M)) to turn
     process accounting on or off.  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 one for each additional
     pacct file), then turns accounting back on again.  This pro-
     cedure is called by ckpacct and thus can be taken care of by
     the cron and used to keep pacct to a reasonable size.

FILES
     /usr/adm/fee              accumulator for fees
     /usr/adm/pacct            current file for per-process accounting
     /usr/adm/pacct*           used if pacct gets large and during
                               execution of daily accounting procedure
     /etc/wtmp                 login/logoff summary
     /usr/lib/acct/ptelus.awk  contains the limits for exceptional usage by login id
     /usr/lib/acct/ptecms.awk  contains the limits for exceptional usage by command name
     /usr/adm/acct/nite        working directory
     /usr/lib/acct             holds all accounting commands listed in sub-class 1M of this manual
     /usr/adm/acct/sum         summary directory, should be saved

SEE ALSO
     acct(1M), acctcms(1M), acctcom(1), acctcon(1M),
     acctmerg(1M), acctprc(1M), cron(1M), diskusg(1M), fwtmp(1M),
     runacct(1M), acct(2), acct(4), utmp(4).



























Page 3                            CX/UX Administrator's Reference



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026