Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ acct(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acctcms

acctcom

acctcon

acctmerg

acctprc

chmod

cron

fwtmp

runacct

acct

and

utmp

acct

PURPOSE

     Provides accounting shell procedures.

SYNOPSIS
     /usr/lib/acct/chargefee [ user number ]

     /usr/lib/acct/ckpacct [ numblocks ] [1000]

     /usr/lib/acct/dodisk [ -o ] [ file ]

     /usr/lib/acct/lastlogin

     /usr/lib/acct/monacct [ number ]

     /usr/lib/acct/nulladm file...

     /usr/lib/acct/prctmp

     /usr/lib/acct/prdaily [ [ -i ] [ mmdd ] ]   [ -c ]

     /usr/lib/acct/prtacct [ -f fieldspec ] [ -v ] [ 'heading' ]

     /usr/lib/acct/remove

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

     /usr/lib/acct/startup

     /usr/lib/acct/turnacct [ on ] [ off ] [ switch ]

DESCRIPTION

     Note:  You should not  share accounting files among nodes
     in a Distributed Services  system.  Each node should have
     its own copy of the various accounting files.

       chargefee

     The  chargefee command  charges the  specified number  of
     units to the specified user.   number can have an integer
     or decimal value.  It writes a record to /usr/adm/fee, 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 numblocks,
     ckpacct invokes turnacct switch.   (The default value for
     numblocks is 1000.)  If the number of free disk blocks in
     the /usr  file system  falls below 500,  ckpacct automat-
     ically  turns off  the collection  of process  accounting
     records by  invoking turnacct off.   When 500  blocks are
     again  available, accounting  is  activated again.   This
     feature  is sensitive  to how  frequently ckpacct  is run
     (usually by cron).
       dodisk

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

     The file parameter specifies the  one or more file system
     names  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 specify -o, file names
     should  be  the  special  file names  of  mountable  file
     systems.   If you  specify both  -o and  file names,  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 on.  runacct normally calls this command.

       monacct

     The  monacct  command   performs  monthly  (or  periodic)
     accounting.  cron should run this command once each month
     or  accounting period.   number  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 monacct runs.

       nulladm

     The nulladm  command creates 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 nulladm.

       prctmp

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

       prdaily

     The  prdaily  command  formats  a  report  of  the  day's
     accounting data.  Use  mmdd 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.  runacct invokes  this command to
     format a report of the previous day's accounting data.

     FLAGS

     -c    Reports exceptional resource  usage by command, and
           may be  used on  the current day's  accounting data
           only.
     -l    Reports exceptional usage by login ID for the spec-
           ified date.

       prtacct

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

     FLAGS

     -ffieldspec
             Selects fields  to be displayed, using  the field
             selection mechanism of acctmerg.
     -v      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 /usr/adm/wtmp.   It is usually
     invoked during a system shutdown.

       startup

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

       turnacct

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

     The switch  flag turns accounting off,  moves the current
     /usr/adm/pacct    to    the    next    free    name    in
     /usr/adm/pacctincr, 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.

     This command is usually called  by ckpacct, which in turn
     is called by cron, keeping the  pacct file down to a man-
     ageable size.

FILES

     /usr/adm/fee                Accumulator for  fees charged
                                 to login names.
     /usr/adm/pacct              Current   file  for   process
                                 accounting.
     /usr/adm/pacct*             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  calcu-
                                 lates  the limits  for excep-
                                 tional usage by login ID.
     /usr/lib/acct/ptecms.awk    Shell  procedure that  calcu-
                                 lates  the  limits of  excep-
                                 tional usage by command name.
     /usr/adm/acct/nite          Working directory.
     /usr/lib/acct               Holds  all   accounting  com-
                                 mands.
     /usr/adm/acct/sum           Summary directory.

RELATED INFORMATION

     The    following   commands:     "acctcms,"   "acctcom,"
     "acctcon,"   "acctmerg,"  "acctprc,"   "chmod,"   "cron,"
     "fwtmp," and  "runacct."

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

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

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