SysIII/usr/src/man/man1/acctsh.1m
.TH ACCTSH 1M
.SH NAME
acctsh \- shell procedures for accounting
.SH SYNOPSIS
.B chargefee
login-name number
.PP
.B ckpacct
[\^blocks\^]
.PP
.B dodisk
.PP
.B lastlogin
.PP
.B monacct
number
.PP
.B nulladm
file
.PP
.B prctmp
.PP
.B prdaily
.PP
.B prtacct
file [
\f3"\fPheading\f3"\fP
]
.PP
.B runacct
[\^mmdd\^] [\^mmdd state\^]
.PP
.B shutacct
[
\f3"\fPreason\f3"\fP
]
.PP
.B startup
.PP
.B turnacct
[
.B on
|
.B off
|
.B switch
]
.SH DESCRIPTION
.I Chargefee\^
is invoked to charge
.I number\^
dollars to
.IR login-name .
A record is written to
.BR /usr/adm/fee ,
to be merged with other accounting records during the night.
.PP
.I Ckpacct\^
is initiated via \fIcron\fP.
It periodically checks the size of
.BR /usr/adm/pacct .
If the size exceeds \fIblocks\fP, 1000 by default,
.I turnacct\^
will be invoked with argument
.IR switch .
.PP
.I Dodisk\^
is invoked by
.I cron\^
to perform the disk accounting functions.
.PP
.I Lastlogin\^
is invoked by
.I runacct\^
to update
.BR /usr/adm/acct/sum/loginlog ,
which shows the last date on which each person logged in.
.PP
.I Monacct\^
should be invoked once each month or each accounting
period.
.I Number\^
indicates
which month or period it is.
It creates summary files in
.B /usr/adm/acct/fiscal
and restarts summary file in
.BR /usr/adm/acct/sum .
.I Nulladm\^
creates
.I file\^
with mode 644 and insures owner is
.BR adm .
It is called by
.IR lastlogin ,
.IR runacct ,
and
.IR turnacct .
.PP
.I Prctmp\^
can be used to print the session record file (normally
.B /usr/adm/acct/nite/ctmp
created by
.I acctcon1\^
(see
.IR acctcon (1M)).
.PP
.I Prdaily\^
is invoked by
.I runacct\^
to print a report of the previous day's accounting.
The report resides in
.BI /usr/adm/acct/sum/rprt xxxx\^
where
.I 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.
.PP
.I Prtacct\^
can be used to format and print any total accounting file.
.PP
.I 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 \fIrunacct\fP(1M).
.PP
.I Shutacct\^
should be invoked during a system shutdown to turn process accounting
off and append a
``reason'' record to
.BR /usr/adm/wtmp .
.I Startup\^
should be called by
.IR rc (8)
to turn the accounting on
whenever the system is brought up.
.PP
.I Turnacct\^
is an interface to
.I accton\^
(see
.IR acct (1M))
to turn process accounting \fBon\fP or \fBoff\fP.
The
.B switch\^
argument moves the current
.B /usr/adm/pacct
to
the next free name in
.BR /usr/adm/pacct[1-9] ,
turns accounting off,
then turns it back on again.
This procedure is called by
.I ckpacct\^
via the \fIcron\fP to keep the \fBpacct\fP file
size smaller.
.SH FILES
.ta \w'/usr/adm/pacct[1-9]\ \ \ \ 'u +.5i
.nf
/usr/adm/fee accumulator for fees
/usr/adm/pacct current file for per-process accounting
/usr/adm/pacct[1-9] used if pacct gets large and during
execution of daily accounting procedure
/usr/adm/wtmp login/logoff summary
/usr/adm/wtmp[1-9] used during daily accounting procedure
/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
.fi
.DT
.SH SEE ALSO
acct(1M),
acctcms(1M),
acctcom(1),
acctcon(1M),
acctmerg(1M),
acctprc(1M),
fwtmp(1M),
runacct(1M),
acct(2),
acct(5),
utmp(5).