| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- overview of accounting and miscellaneous accounting commands
/usr/lib/acct/acctdisk
/usr/lib/acct/acctdusg [-ufilename] [-pfilename]
/usr/lib/acct/accton [filename]
/usr/lib/acct/acctwtmpreasonfilename
/usr/lib/acct/closewtmp
/usr/lib/acct/utmp2wtmp
Accounting software is structured as a set of tools (consisting of bothC programs and shell procedures) that can be used to build accountingsystems.acctsh(1M) describes the set of shell procedures built on top ofthe C programs.
Connect time accounting is handled by various programs that write records into/var/adm/wtmpx, as described inutmpx(4). The programs described inacctcon(1M) convert this fileinto session and charging records, which are then summarized byacctmerg(1M).
Process accounting is performed by the system kernel. Upon termination of aprocess, one record per process is written to a file (normally/var/adm/pacct).The programs inacctprc(1M) summarize this data for charging purposes;acctcms(1M) isused to summarize command usage. Current process data may be examined usingacctcom(1).
Process accounting records and connect time accounting records (or any accounting recordsin thetacct format described inacct.h(3HEAD)) can be merged and summarized intototal accounting records byacctmerg (seetacct format inacct.h(3HEAD)).prtacct (seeacctsh(1M)) is used to format any or all accounting records.
acctdisk reads lines that contain user ID, login name, and number ofdisk blocks and converts them to total accounting records that can bemerged with other accounting records.acctdisk returns an error if the inputfile is corrupt or improperly formatted.
acctdusg reads its standard input (usually fromfind/-print) and computesdisk resource consumption (including indirect blocks) by login.
accton without arguments turns process accounting off. Iffilename is given, itmust be the name of an existing file, to which the kernelappends process accounting records (seeacct(2) andacct.h(3HEAD)).
acctwtmp writes autmpx(4) record tofilename. The record contains the currenttime and a string of characters that describe thereason. A record typeofACCOUNTING is assigned (seeutmpx(4))reason must be a string of11 or fewer characters, numbers,$, or spaces. For example, the followingare suggestions for use in reboot and shutdown procedures, respectively:
acctwtmp "acctg on" /var/adm/wtmpxacctwtmp "acctg off" /var/adm/wtmpx
For each user currently logged on,closewtmp puts a falseDEAD_PROCESS recordin the/var/adm/wtmpx file.runacct (seerunacct(1M)) uses this falseDEAD_PROCESS recordso that the connect accounting procedures can track the time used byusers logged on beforerunacct was invoked.
For each user currently logged on,runacct usesutmp2wtmp to create anentry in the file/var/adm/wtmpx, created byrunacct. Entries in/var/adm/wtmpx enablesubsequent invocations ofrunacct to account for connect times of users currentlylogged in.
The following options are supported:
Places infilename records consisting of those filenames for whichacctdusg charges no one (a potential source for finding users trying to avoid disk charges).
Specifies a password file,filename. This option is not needed if the password file is/etc/passwd.
If any of theLC_* variables (LC_TYPE,LC_MESSAGES,LC_TIME,LC_COLLATE,LC_NUMERIC, andLC_MONETARY) (seeenviron(5)) are not set in the environment, the operational behaviorofacct for each corresponding locale category is determined by the valueof theLANG environment variable. IfLC_ALL is set, its contents areused to override both theLANG and the otherLC_* variables. Ifnone of the above variables are set in the environment, the "C"(U.S. style) locale determines howacct behaves.
Determines howacct handles characters. WhenLC_CTYPE is set to a valid value,acct can display and handle text and filenames containing valid characters for that locale.acct can display and handle Extended Unix Code (EUC) characters where any character can be 1, 2, or 3 bytes wide.acct can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
Determines howacct handles date and time formats. In the "C" locale, date and time handling follows the U.S. rules.
Used for login name to user ID conversions.
Holds all accounting commands listed in sub-class 1M of this manual.
Current process accounting file.
History of user access and administration information..
Seeattributes(5) for descriptions of the following attributes:
|
acctcom(1),acctcms(1M),acctcon(1M),acctmerg(1M),acctprc(1M),acctsh(1M),fwtmp(1M),runacct(1M),acct(2),acct.h(3HEAD),passwd(4),utmpx(4),attributes(5),environ(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |