csaperiod(1M)                                                    csaperiod(1M)


NAME
     csaperiod - runs periodic accounting

SYNOPSIS
     /usr/lib/acct/csaperiod [-e MMDDhhmm] [-r] [-s MMDDhhmm]

DESCRIPTION
     The csaperiod command directs the processing of the daily consolidated
     accounting files, which are created by the csarun(1M) command.  The
     csaaddc(1M) command merges the daily files into one file.  The
     csacrep(1M) command then generates a report based on the merged file.

     The progress of csaperiod is recorded in the pdact file.  When an error
     is detected, a message is written to the /var/adm/SYSLOG file, and mail
     is sent to root and adm.  Further data processing is halted.

     The cron(1M) command usually initiates csaperiod.

     The csaperiod command accepts the following options:

     -e MMDDhhmm
          Selects consolidated accounting data generated at or before the
          specified date, MMDDhhmm.

     -r   Removes the daily data files after processing is done.  The default
          is to leave the daily data files in the /var/adm/acct/sum/csa
          directory.

     -s MMDDhhmm
          Selects consolidated accounting data generated at or after the
          specified date, MMDDhhmm.

NOTES
     By default, csaperiod processes all the /var/adm/acct/sum/csa files.  The
     mail recipients (root and adm) can be changed by modifying the MAIL_LIST
     and WMAIL_LIST parameters in the /etc/csa.conf file.

     If the script /usr/lib/acct/csa.puser exists, csaperiod will execute it
     via the shell "." command.  A possible use of this user exit would be to
     generate any site specific report, which would be appended to the
     periodic report.  csaperiod will check the return status from
     "csa.puser".  If the return status is non-zero, execution of csaperiod
     will be aborted.

     For example, the script could contain:

          /usr/bin/local/siterpt > siterpt
          pr -h "${SITEHDR} ${SYSNAME} ${BTWMSG}" siterpt >> ${PDRPT}.${DTIME}


     You need to make sure that the csaperiod command can read the site-
     generated user exit script.  If csaperiod cannot read the script, it does
     not handle the error graciously as it does for other errors.  This means
     the error will not be logged in the SYSLOG file and the pdact file, and
     no notification email will be sent out.

FILES
     /etc/config/csa.conf                                   CSA configuration
                                                            file

     /var/adm/acct/fiscal/csa/cms.MMDDhhmm                  Periodic command
                                                            usage data in cms
                                                            record format

     /var/adm/acct/fiscal/csa/updacct.MMDDhhmm              Periodic condensed
                                                            data files

     /var/adm/acct/fiscal/csa/rprt.MMDDhhmm                 Periodic report
                                                            files

     /var/adm/acct/nite/csa/pdact                           Log file

     /var/adm/acct/nite/csa/E*MMDDhhmm                      Error messages
                                                            files

     /var/adm/acct/sum/csa/caact.MMDDhhmm                   Daily condensed
                                                            data files

     /usr/lib/acct/csa.puser                                Site-generated
                                                            user exit script
                                                            for csaperiod.

SEE ALSO
     csacms(1M), cron(1M), csaaddc(1M), csacon(1M), csacrep(1M), csarun(1M).


                                                                        Page 2