System Administration Guide: Advanced Administration
Previous Next

System Accounting Files

The /var/adm directory contains the active data collection files. The following table describes the accounting files in this directory.

Table 10-7 Files in the /var/adm Directory

File

Description

dtmp

Output from the acctdusg program

fee

Output from the chargefee program, which are the ASCII tacct records

pacct

Active process accounting file

pacctn

Process accounting files that are switched by running the turnacct script

Spacctn.MMDD

Process accounting files for MMDD during execution of the runacct script

The /var/adm/acct directory contains the nite, sum, and fiscal directories. These directories contain the actual data collection files. For example, the nite directory contains files that are reused daily by the runacct script. A brief summary of the files in the /var/adm/acct/nite directory follows.

Table 10-8 Files in the /var/adm/acct/nite Directory

File

Description

active

Used by the runacct script to record progress and print warning and error messages

active.MMDD

Same as the active file after the runacct script detects an error

cms

ASCII total command summary used by the prdaily script

ctacct.MMDD

Connect accounting records in tacct.h format

ctmp

Output of acctcon1 program, which consists of connect session records in ctmp.h format (acctcon1 and acctcon2 are provided for compatibility purposes)

daycms

ASCII daily command summary used by the prdaily script

daytacct

Total accounting records for one day in tacct.h format

disktacct

Disk accounting records in tacct.h format, created by the dodisk script

fd2log

Diagnostic output during execution of the runacct script

lastdate

Last day the runacct script executed (in date +%m%d format)

lineuse

tty line usage report used by the prdaily script

lock

Used to control serial use of the runacct script

log

Diagnostic output from the acctcon program

log.MMDD

Same as the log file after the runacct script detects an error

owtmpx

Previous day's wtmpx file

reboots

Beginning and ending dates from the wtmpx file, and a listing of reboots

statefile

Used to record current state during execution of the runacct script

tmpwtmp

wtmpx file corrected by the wtmpfix program

wtmperror

Contains wtmpfix error messages

wtmperror MMDD

Same as the wtmperror file after the runacct script detects an error

wtmpMMDD

The runacct script's copy of the wtmpx file

The sum directory contains the cumulative summary files updated by the runacct script and used by the monacct script. The following table summarizes the files in the /var/adm/acct/sum directory.

Table 10-9 Files in the /var/adm/acct/sum Directory

File

Description

cms

Total command summary file for current fiscal period in binary format

cmsprev

Command summary file without latest update

daycms

Command summary file for the day's usage in internal summary format

loginlog

Record of last date each user logged in; created by the lastlogin script and used in the prdaily script

rprt.MMDD

Saved output of prdaily script

tacct

Cumulative total accounting file for current fiscal period

tacctprev

Same as the tacct file without latest update

tacct.MMDD

Total accounting file for MMDD

The fiscal directory contains periodic summary files that are created by the monacct script. The following table summarizes the files in the /var/adm/acct/fiscal directory.

Table 10-10 Files in the /var/adm/acct/fiscal Directory

File

Description

cmsn

Total command summary file for fiscal period n in internal summary format

fiscrptn

Report similar to rprtn for fiscal period n

tacctn

Total accounting file for fiscal period n

Files Produced by the runacct Script

The following table summarizes the most useful files produced by the runacct script. These files are found in the /var/adm/acct directory.

Table 10-11 Files Created by the runacct Script

File

Description

nite/daytacct

The total accounting file for the day in tacct.h format.

nite/lineuse

The runacct script calls the acctcon program to gather data on terminal line usage from the /var/adm/acct/nite/tmpwtmp file and writes the data to the /var/adm/acct/nite/lineuse file. The prdaily script uses this data to report line usage. This report is especially useful for detecting bad lines. If the ratio between the number of logouts to logins is greater than three to one, the line is very likely failing.

sum/cms

This file is the accumulation of each day's command summaries. The accumulation restarts when the monacct script is executed. The ASCII version is the nite/cms file.

sum/daycms

The runacct script calls the acctcms program to process the commands used during the day to create the Daily Command Summary report and stores the data in the /var/adm/acct/sum/daycms file. The ASCII version is the /var/adm/acct/nite/daycms file.

sum/loginlog

The runacct script calls the lastlogin script to update the last date logged in for the logins in the /var/adm/acct/sum/loginlog file. The lastlogin command also removes from this file any logins that are no longer valid.

sum/rprt.MMDD

Each execution of the runacct script saves a copy of the daily report that was printed by the prdaily script.

sum/tacct

Contains the accumulation of each day's nite/daytacct data and is used for billing purposes. The monacct script restarts accumulating this data each month or fiscal period.

Previous Next