Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
20.  System Accounting (Reference) Daily Accounting Reports Looking at the pacct File With acctcom   Previous   Contents   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 20-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 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, which 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 20-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 prdaily

ctacct.MMDD

Connect accounting records in tacct.h format

ctmp

Output of acctcon1 program, 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)

lock

Used to control serial use of the runacct script

lineuse

tty line usage report used by the prdaily 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

wtmp.MMDD

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 20-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 on; 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 tacct without latest update

tacct.MMDD

Total accounting file for MMDD

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

Table 20-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 most useful files produced by the runacct script found in the /var/adm/acct directory.

Table 20-11 Files Produced by runacct

File

Description

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 about three to one, the line is very likely failing.

nite/daytacct

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

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.

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/cms

This file is the accumulation of each day's command summaries. It is restarted by the execution of the monacct script. The ASCII version is the nite/cms file.

sum/loginlog

The runacct script calls 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.

 
 
 
  Previous   Contents   Next