csarun  -  processes the daily accounting files and gener­
       ates reports


SYNOPSIS

       //uussrr//ssbbiinn//ccssaarruunn [--AA] [--VV level] [MMDD [hhmm [state]]]


DESCRIPTION

       The ccssaarruunn command, usually initiated by cron(8),  directs
       the processing of the daily accounting files.  ccssaarruunn pro­
       cesses accounting records written into the pacct file.

       If  errors  occur,  ccssaarruunn  does  not  damage  the  active
       accounting  file.   It  records  its  progress  by writing
       descriptive diagnostic messages to the aaccttiivvee file.   When
       an  error  is detected, a message is written to the SYSLOG
       file, and mail is sent to rroooott and aaddmm.  Further data pro­
       cessing is halted.

       Before  invoking ccssaarruunn on a new accounting period, ensure
       that the previous invocation of ccssaarruunn has completed  suc­
       cessfully.   If this is not done, information about unfin­
       ished jobs will not be accurate.

       The lloocckk and lloocckk11  files  are  used  to  protect  against
       simultaneous invocation.

       The  ccssaarruunn  command  accepts  the  following  options and
       operands:

       --AA        Accounts for both terminated  and  active  jobs.
                 By  default,  only terminated jobs are reported.
                 ccssaarruunn does not recycle active  jobs  when  this
                 option is specified.

       --VV level  Controls  verification  level of accounting data
                 files.

                 Level          Description

                 level 0        Run ccssaavveerriiffyy and  ccssaaeeddiitt;  this
                                is the default

                 level 1        Run ccssaavveerriiffyy only

                 level 2        Do not run ccssaavveerriiffyy

       MMDD [hhmm [state]]
                 Sets  month,  day,  hour,  minute, and state for
                 which ccssaarruunn  will  rerun  the  accounting.   If
                 ccssaarruunn  is restarted, the month and day are nec­
                 essary; other portions  are  optional.   If  you
                 supply  the  state on the command line, you must
                 also specify hhmm.

       restartable  states  using  ssttaatteeffiillee to remember the last
       state completed.  It  accomplishes  this  by  writing  the
       state  name  into ssttaatteeffiillee.  ccssaarruunn looks in ssttaatteeffiillee to
       determine what must be processed  next.   The  states  are
       executed in the following order:

       State Name     Description

       SSEETTUUPP          Moves  active  accounting files into a work
                      directory.

       VVEERRIIFFYY         Verifies the integrity of the data files.

       AARRCCHHIIVVEE11       User exit that  executes  a  site-generated
                      accounting script to archive the accounting
                      files.

       BBUUIILLDD          Organizes the accounting data into a ssoorrtteedd
                      ppaacccctt file.

       AARRCCHHIIVVEE22       User  exit  that  executes a site-generated
                      accounting script  to  archive  the  ssoorrtteedd
                      ppaacccctt file.

       CCMMSS            Generates command summaries.

       RREEPPOORRTT         Generates daily accounting reports.

       DDRREEPP           Generates daemon usage report.

       FFEEFF            User  exit  that  executes a site-generated
                      accounting  script  to  format  the  ssoorrtteedd
                      ppaacccctt  file  into a format that is suitable
                      for use on a front end.

       UUSSEERREEXXIITT       User exit that  executes  a  site-generated
                      accounting script.

       CCLLEEAANNUUPP        Cleans up temporary files and exits.

       Before restarting ccssaarruunn after a failure, check the aaccttiivvee
       file for diagnostics, then fix any corrupted pacct  files.
       The  lock  files  must  be  removed  before  ccssaarruunn can be
       restarted.  If ccssaarruunn is restarted, you must  specify  the
       MMDD  operand, which specifies the month and day for which
       ccssaarruunn will rerun the accounting.   The  entry  point  for
       processing  is  based  on  the  contents of ssttaatteeffiillee.  To
       override this entry point, include the  desired  state  on
       the  command  line  to  designate  where processing should
       begin.


NOTES

       The mail recipients (rroooott  and  aaddmm)  can  be  changed  by

       //eettcc//ccssaa..ccoonnff file.  You also can change the other parame­
       ters defined in the accounting configuration file for your
       site.

       ccssaarruunn checks the number of free blocks in the  filesystem
       that  contains the accounting files to ensure that it con­
       sists of more than 2000 blocks.  Block size is 1024 bytes.
       By default, ccssaarruunn assumes that the filesystem is //vvaarr; if
       this  is  not  the  case,   change   symbol   AACCCCTT_FFSS   in
       //eettcc//ccssaa..ccoonnff  accordingly.   To change the minimum number
       of free blocks on AACCCCTT_FFSS (the default  is  2000),  modify
       MMIINN_BBLLKKSS in the configuration file.

       To remove bad records in accounting data files encountered
       by ccssaarruunn, use csaedit(8) and csaverify(8).

       You need to make sure that ccssaarruunn can read the site-gener­
       ated  user  exit  scripts.   If  ccssaarruunn  cannot  read  the
       scripts, it does not handle the error graciously  like  it
       does  for  other errors.  This means the error will not be
       logged in the SYSLOG file and  the  active  file,  and  no
       notification email will be sent out.


BUGS

       If  possible,  do  not  restart ccssaarruunn in the SETUP state.
       Instead, run SETUP manually and restart  ccssaarruunn  by  using
       the following command line:

            ccssaarruunn MMDD hhmm VERIFY

       If  ccssaarruunn terminates abnormally and leaves the lock files
       in place, the next execution of ccssaarruunn will  remove  these
       locks, but it also will terminate abnormally.


EXAMPLES

       Example  1:  The  following  example  shows  how  to start
       ccssaarruunn:

            nnoohhuupp ccssaarruunn 22>> //vvaarr//ccssaa//nniittee//ffdd22lloogg &&

       Example 2: The following  example  shows  how  to  restart
       ccssaarruunn at the state specified in ssttaatteeffiillee:

            nnoohhuupp ccssaarruunn 00660011 11334455 22>>>> //vvaarr//ccssaa//nniittee//ffdd22lloogg &&

       Example  3:  The  following  example  shows how to restart
       ccssaarruunn at a specific state:

            nnoohhuupp ccssaarruunn 00660011 11334455 BBUUIILLDD 22>>>> //vvaarr//ccssaa//nniittee//ffdd22lloogg &&


FILES

       //eettcc//ccssaa..ccoonnff                      Accounting   configura­
                                          tion file

                                          current      accounting
                                          files

       //vvaarr//ccssaa//nniittee//aaccttiivvee               Record  of   accounting
                                          progress

       //vvaarr//ccssaa//nniittee//ccllaassttddaattee            Record of last date and
                                          time  that   accounting
                                          ran

       //vvaarr//ccssaa//nniittee//lloocckk                 Lock file that prevents
                                          simultaneous invocation

       //vvaarr//ccssaa//nniittee//lloocckk11                Lock file that prevents
                                          simultaneous invocation

       //vvaarr//ccssaa//nniittee//ssttaatteeffiillee            Record  of  last  state
                                          that ccssaarruunn was working
                                          on or completed

       //vvaarr//ccssaa//ssuumm//**                     Directory that contains
                                          daily  condensed   data
                                          files   and  accounting
                                          reports

       //vvaarr//ccssaa//wwoorrkk//**                    Directory that contains
                                          temporary   files  from
                                          daily accounting

       //uussrr//ssbbiinn//ccssaa..aarrcchhiivvee11             Site-generated     user
                                          exit  script to be exe­
                                          cuted    during     the
                                          AARRCCHHIIVVEE11 state.

       //uussrr//ssbbiinn//ccssaa..aarrcchhiivvee22             Site-generated     user
                                          exit script to be  exe­
                                          cuted     during    the
                                          AARRCCHHIIVVEE22 state.

       //uussrr//ssbbiinn//ccssaa..ffeeff                  Site-generated     user
                                          exit  script to be exe­
                                          cuted  during  the  FFEEFF
                                          state.

       //uussrr//ssbbiinn//ccssaa..uusseerr                 Site-generated     user
                                          exit script to be  exe­
                                          cuted     during    the
                                          UUSSEERREEXXIITT state.


SEE ALSO

       cron(8), csaaddc(8),  csabuild(8),  csacms(8),  csacon(8),
       csacrep(8),  csadrep(8),  csaedit(8),  csajrep(8),  csape­
       riod(8), csarecy(8), csaverify(8), acctctl(3c).


Man(1) output converted with man2html