Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acctdir(8) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acctcms

acctcom

acctcon1, acctcon2

acctmerg

chmod

cron

runacct

acct

and

utmp



acct/*(8,C)                 AIX Commands Reference                  acct/*(8,C)



-------------------------------------------------------------------------------
acct/*



PURPOSE

Provides accounting shell procedures.

SYNTAX


/usr/lib/acct/chargefee --- user --- number ---|

                         +--- 500 -----+
/usr/lib/acct/ckpacct ---|             |---|
                         +- numblocks -+

                        +------+   +--------------+
/usr/lib/acct/dodisk ---|      |---|              |---|
                        +- -o -+   +- filesystem -+
                                    ^            |
                                    +------------+

/usr/lib/acct/lastlogin ---|

                         +----------+
/usr/lib/acct/monacct ---|         1|---|
                         +- number -+

/usr/lib/acct/nulladm --- file ---|
                       ^        |
                       +--------+

/usr/lib/acct/prctmp ---|

                           +------+   +--------+
                         +-|      |---|       2|-+
/usr/lib/acct/prdaily ---| +- -l -+   +- mmdd -+ |---|
                         +------- -c ------------+


-----------------
1 The default number is the current month.
2 The default mmdd is the current day.










Processed November 8, 1990        acct/*(8,C)                                 1





acct/*(8,C)                 AIX Commands Reference                  acct/*(8,C)




                         +--------------+        +-------------+
/usr/lib/acct/prtacct ---| -f fieldspec |- file -|             |---|
                         | -v           |        +- 'heading' -+
                         +--------------+

/usr/lib/acct/remove ---|

                          +------------+
/usr/lib/acct/shutacct ---|            |---|
                          +- 'reason' -+

/usr/lib/acct/startup ---|

                            one of
                          +--------+
                          | on     |
/usr/lib/acct/turnacct ---| off    |---|
                          | switch |
                          +--------+


DESCRIPTION

chargefee

The chargefee command charges the specified number of units to the specified
user.  The number variable can have an integer or decimal value.  The command
writes a record to the /usr/adm/fee file to be merged with other accounting
records by the runacct command.

ckpacct

The ckpacct command checks the size of /usr/adm/pacct.  If the size exceeds the
number specified in the numblocks parameter, the ckpacct command invokes the
turnacct switch command.  The default value for numblocks is 500.

If the number of free disk blocks in the /usr file system falls below 500, the
ckpacct command automatically turns off the collection of process accounting
records by invoking the turnacct off command.  When 500 blocks are available
again, accounting is reactivated.  This feature is sensitive to how frequently
ckpacct is run (usually by the cron command).

dodisk

The dodisk command performs the disk-usage accounting functions.  The cron
command normally runs dodisk periodically.  By default, the dodisk command does
disk accounting on the special files whose stanzas in /etc/filesystems contain
the attribute "account=true".  If you specify the -o flag, dodisk does a slower
version of disk accounting by login directory.





Processed November 8, 1990        acct/*(8,C)                                 2





acct/*(8,C)                 AIX Commands Reference                  acct/*(8,C)



The filesystem parameter specifies the one or more file systems where disk
accounting is to be done.  If you specify any file names, disk accounting is
done on only these file systems.  If you do not use the -o flag, file system
names should be the special file names of mountable file systems.  If you use
both the -o flag and filesystem parameter, the files should be mount points of
mounted file systems.

lastlogin

The lastlogin command updates the file /usr/adm/acct/sum/loginlog to show the
last date each user logged in.  The runacct command normally calls lastlogin.

monacct

The monacct command performs monthly or periodic accounting.  The cron command
should run this command once each month or accounting period.  The number
parameter indicates the month or period to process.  The default number is the
current month.  This default is useful if monacct is run by cron on the first
day of each month.  The monacct command creates summary files in
/usr/adm/acct/fiscal and restarts summary files in /usr/adm/acct/sum.

Daily reports are deleted and thus inaccessible each time the monacct command
runs.

nulladm

The nulladm command creates a file, assigns it permission code 664, and ensures
that its owner and group are "adm".  (See "chmod" for an explanation of file
permissions.)  Various accounting shell procedures call the nulladm command.

prctmp

The prctmp command displays the session record file (normally the
/usr/adm/acct/nite/ctmp file) created by the acctcon1 command.

prdaily

The prdaily command formats a report of the day's accounting data.  Use the
mmdd parameter to specify a date other than the current day.  The report
resides in /usr/adm/acct/sum/rprtmmdd, where mmdd specifies the month and day
of the report.  The runacct command invokes this command to format a report of
the previous day's accounting data.

The -c flag reports exceptional resource usage by command and also can be used
on the current day's accounting data only.  The -l flag reports exceptional
usage by login ID for the specified date.

prtacct

The prtacct command formats and displays total accounting (tacct) files.  You
can specify a heading for the report by enclosing it in quotation marks.




Processed November 8, 1990        acct/*(8,C)                                 3





acct/*(8,C)                 AIX Commands Reference                  acct/*(8,C)



The -f fieldspec parameter selects fields to be displayed, using the field
selection mechanism of the acctmerg command.  The -v flag produces verbose
output in which more precise notation is used for floating point numbers.

remove

The remove command deletes all /usr/adm/acct/sum/wtmp*,
/usr/adm/acct/sum/pacct*, and /usr/adm/acct/nite/lock* files.

shutacct

The shutacct command turns process accounting off and adds a "reason" record to
the /usr/adm/wtmp file.  It is usually invoked during a system shutdown.

startup

The startup command turns on the accounting functions when the system is
started up.  It is usually called by the /etc/rc command.

turnacct

The turnacct command provides an interface to the accton command for turning on
or off process accounting.

The switch flag turns accounting off, moves the current /usr/adm/pacct file to
the next free name in the /usr/adm/pacctincr file, where incr is a number
starting at 1 and increased by one for each additional pacct file.  After
moving the pacct file, turnacct turns accounting back on.

The turnacct command is usually called by the ckpacct command, which in turn is
called by the cron command, keeping the pacct file to a manageable size.

FILES

/usr/adm/fee                Accumulator for fees charged to login names
/usr/adm/pacct              Current file for process accounting
/usr/adm/pacct*             File used if pacct gets large and during running of
                            the daily accounting procedures
/usr/adm/wtmp               Login/logout history file
/usr/lib/acct/ptelus.awk    Shell procedure that calculates the limits for
                            exceptional usage by login ID
/usr/lib/acct/ptecms.awk    Shell procedure that calculates the limits of
                            exceptional usage by command name
/usr/adm/acct/nite          Working directory
/usr/lib/acct               Holds all accounting commands
/usr/adm/acct/sum           Summary directory

RELATED INFORMATION

See the following commands:  "acctcms,"  "acctcom,"  "acctcon1, acctcon2,"
"acctmerg,"  "chmod,"  "cron," and "runacct."




Processed November 8, 1990        acct/*(8,C)                                 4





acct/*(8,C)                 AIX Commands Reference                  acct/*(8,C)



See the acct system call and the acct, utmp, and filesystems files in AIX
Operating System Technical Reference.

See "Running System Accounting" in Managing the AIX Operating System.



















































Processed November 8, 1990        acct/*(8,C)                                 5



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