Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ runacct(1m) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                              runacct(1m)



        _________________________________________________________________
        runacct
        run daily accounting
        _________________________________________________________________


        SYNTAX

        /usr/lib/acct/runacct [mmdd [state]]


        DESCRIPTION

        Runacct is the main daily accounting shell procedure.  It is
        normally initiated via cron(1M).  Runacct processes connect, fee,
        disk, and process accounting files.  It also prepares summary
        files for prdaily or billing purposes.

        Runacct takes care not to damage active accounting files or
        summary files in the event of errors.  It records its progress by
        writing descriptive diagnostic messages into active.  When an
        error is detected, a message is written to /dev/console, mail
        (see mail(1)) is sent to root and adm, and runacct terminates.
        Runacct uses a series of lock files to protect against re-
        invocation.  The files lock and lock1 are used to prevent
        simultaneous invocation, and lastdate is used to prevent more
        than one invocation per day.

        Runacct breaks its processing into separate, restartable states
        using statefile to remember the last state completed.  It
        accomplishes this by writing the state name into statefile.
        Runacct then looks in statefile to see what it has done and to
        determine what to process next.  States are executed in the
        following order:

             SETUP       Move active accounting files into working files.

             WTMPFIX     Verify integrity of wtmp file, correcting date
                         changes if necessary.

             CONNECT1    Produce connect session records in ctmp.h
                         format.

             CONNECT2    Convert ctmp.h records into tacct.h format.

             PROCESS     Convert process accounting records into tacct.h
                         format.

             MERGE       Merge the connect and process accounting
                         records.




        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                              runacct(1m)



             FEES        Convert output of chargefee into tacct.h format
                         and merge with connect and process accounting
                         records.

             DISK        Merge disk accounting records with connect,
                         process, and fee accounting records.

             MERGETACCT  Merge the daily total accounting records in
                         daytacct with the summary total accounting
                         records in /usr/adm/acct/sum/tacct.

             CMS         Produce command summaries.

             USEREXIT    Any installation-dependent accounting programs
                         can be included here.

             CLEANUP     Cleanup temporary files and exit.

        To restart runacct after a failure, first check the active file
        for diagnostics, then fix up any corrupted data files such as
        pacct or wtmp.  The lock files and lastdate file must be removed
        before runacct can be restarted.  The argument mmdd is necessary
        if runacct is being restarted, and specifies the month and day
        for which runacct will rerun the accounting.  Entry point for
        processing is based on the contents of statefile; to override
        this, include the desired state on the command line to designate
        where processing should begin.


        EXAMPLES

        To start runacct.
             nohup runacct 2> /usr/adm/acct/nite/fd2log &

        To restart runacct.
             nohup runacct 0601 2>> /usr/adm/acct/nite/fd2log &

        To restart runacct at a specific state.
             nohup runacct 0601 MERGE 2>> /usr/adm/acct/nite/fd2log &


        FILES

        /etc/wtmp
        /usr/adm/pacct*
        /usr/src/cmd/acct/tacct.h
        /usr/src/cmd/acct/ctmp.h
        /usr/adm/acct/nite/active
        /usr/adm/acct/nite/daytacct
        /usr/adm/acct/nite/lock
        /usr/adm/acct/nite/lock1



        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)





                                                              runacct(1m)



        /usr/adm/acct/nite/lastdate
        /usr/adm/acct/nite/statefile
        /usr/adm/acct/nite/ptacct*.mmdd


        SEE ALSO

        acct(1M), acctcms(1M), acctcom(1), acctcon(1M), acctmerg(1M),
        acctprc(1M), acctsh(1M), cron(1M), fwtmp(1M), mail(1), acct(2),
        acct(4), utmp(4), sysadm(1m).
        Installing and Managing the DG/UX System.


        BUGS

        Normally it is not a good idea to restart runacct in the SETUP
        state.  Run SETUP manually and restart via:

             runacct mmdd WTMPFIX

        If runacct failed in the PROCESS state, remove the last ptacct
        file because it will not be complete.
































        DG/UX 4.00                                                 Page 3
               Licensed material--property of copyright holder(s)



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