admaccounting(1M) DG/UX R4.11 admaccounting(1M)
NAME
admaccounting - manage accounting system
SYNOPSIS
admaccounting -o start|stop|check
admaccounting -o start|stop|check [ -D all ] (Cluster)
admaccounting -o list -r { cmd | user } [ -l line-limit ]
[ -d mmdd | -m mm ] [ -qv ]
admaccounting -o merge -r { cmd | user }
DESCRIPTION
The admaccounting command is used to manage system accounting,
including starting and stopping system accounting and producing any
of several accounting reports.
More information about the accounting system can be obtained from
acct(1M) and related manual entries.
Operations
start Enable system accounting, if not already enabled.
stop Disable system accounting, if enabled.
check Determine whether or not system accounting is enabled. The
exit code is 0 if the accounting system is enabled and 1 if
the accounting system is not enabled.
list Display an accounting report.
merge Merge one or more accounting reports. This operation reads
from standard input and expects, as input, reports
generated using the list operation. All reports used in a
merge operation must be of the same type.
Options
The following option is allowed for the start, stop and check
operations.
-D all This option is operational only after loading and setting
up the Cluster package. Using this option will cause the
specified operation to be performed on all nodes in the
cluster. This option is ignored on a host which does not
have the Cluster package loaded and set up, with the
operation being performed only on the current host.
The following options are allowed for the list operation.
-d mmdd Display the report for a specific date mmdd where mm is the
month number and dd is the day number in the month.
Default is to display the cumulative report for the current
period.
-l line-limit
Display up to line-limit lines of the report. This limit
does not include the headers which may precede the report
or the totals which follow the report.
-m mm Display the report for a specific month where mm is the
month number. Default is to display the cumulative report
for the current period.
-q Use quiet mode. Headers are not displayed for the list
operation.
-r report-type
An identification of the type of accounting report.
If the report-type is cmd, a command usage report is
displayed. If the report-type is user, a report of user
logins is displayed.
-v Use verbose mode. Headers are displayed for the list
operation. This mode is enabled by default.
The following option is allowed for the merge operation.
-r report-type
An identification of the type of accounting reports to be
merged.
If the report-type is cmd, the merge operation expects
command usage reports as input and will merge these reports
on command name. Note that the Hog factor columns will be
averaged, not added, when the reports are merged. If the
report-type is user, the merge operation expects user login
reports as input and will merge these reports on user id.
EXAMPLES
To start system accounting, use
admaccounting -o start
To get a report of the 30 most time-consuming commands run on the
system, use
admaccounting -o list -r cmd -l 30 -v
To merge two daily command reports, use
admaccounting -o list -r cmd -d 0410 > cmd0410
admaccounting -o list -r cmd -d 0411 > cmd0411
cat cmd0410 cmd0411 | admaccounting -o merge -r cmd
FILES
/etc/log/account.rclock
Lock file that indicates whether system
accounting is enabled.
DIAGNOSTICS
Warnings
A warning message is printed on an attempt to start the accounting
system if it is already started, or to stop it if it is not running.
Errors
The accounting system may produce error indications. See the
accounting system documentation for descriptions of error conditions.
Exit Codes
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
SEE ALSO
acct(1M), acctcms(1M), acctsh(1M), prtacct(1M), sysadm(1M),
appropriateprivilege(5), capdefaults(5).
NOTES
You must have appropriate privilege to start or stop the accounting
system. On a generic DG/UX system, appropriate privilege is granted
by having an effective UID of 0 (root). See the
appropriateprivilege(5) man page for more information.
On a system with DG/UX information security, appropriate privilege is
granted by having one or more specific capabilities enabled in the
effective capability set of the user. See the capdefaults(5) man
page for the default capabilities for this command.
The behavior of the start, stop, and check operations is unreliable
if you start or stop accounting by using startup(1M) or turnacct(1M)
directly.
If the -d and -m options are both used, -d supersedes -m. If more
than one date (or month) is specified with the -d (or -m option), the
last specification will be the one used.
To avoid unsightly formatting in the "command usage" and "user
logins" reports, large values which exceed their column widths are
automatically displayed in exponential form. If there is a need to
view these values displayed in exponential form more precisely, use
acctcms or prtacct to display the accounting data files directly.
The merge operation will use the title and date from the first report
in its input as the title and date of the merged report.
Licensed material--property of copyright holder(s)