|
Table 20-6 acctcom Options
Option | Description |
-a | Shows average statistics about the
processes selected. The statistics are printed after the output is recorded. |
-b | Reads the files backward, showing latest
commands first. This option has no effect if reading standard input. |
-f | Prints the fork/exec
flag and system exit status columns. The output is an octal number. |
-h | Instead of mean memory size, shows
the hog factor, which is the fraction of total available CPU time consumed
by the process during its execution. Hog factor = total_CPU_time/elapsed_time. |
-i | Prints columns containing the I/O counts
in the output. |
-k | Shows total kcore minutes instead of memory size. |
-m | Shows mean core size. This is the default. |
-q | Prints average statistics, not output
records. |
-r | Shows CPU factor: user_time/(system_time + user_time). |
-t | Shows separate system and user CPU
times. |
-v | Excludes column headings from the output. |
-C sec | Shows
only processes with total CPU time (system plus user) exceeding sec seconds. |
-e time | Shows
processes existing at or before time, given in
the format hr[:min[:sec]]. |
-E time | Shows
processes starting at or before time, given in
the format hr[:min[:sec]]. Using the same time for both -S and -E, shows processes that existed at the time. |
-g group | Shows only processes that belong to group. |
-H factor | Shows only processes that exceed factor, where factor is the "hog factor" (see the -h
option). |
-I chars | Shows only processes that transferred more characters than the cutoff number
specified by chars. |
-l line | Show
only processes belonging to the terminal /dev/line. |
-n pattern | Shows only commands matching pattern (a regular
expression except that "+" means one or more
occurrences). |
-o ofile | Instead of printing the records, copies them in acct.h
format to ofile. |
-O sec | Shows
only processes with CPU system time exceeding sec
seconds. |
-s time | Show
processes existing at or after time, given in the
format hr[:min[:sec]]. |
-S time | Show
processes starting at or after time, given in the
format hr[:min[:sec]]. |
-u user | Shows
only processes that belong to user. |
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. |
|