| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- shell procedures for accounting
/usr/lib/acct/chargefeelogin-namenumber
/usr/lib/acct/ckpacct [blocks]
/usr/lib/acct/dodisk [-o] [filename]...
/usr/lib/acct/lastlogin
/usr/lib/acct/monacctnumber
/usr/lib/acct/nulladmfilename...
/usr/lib/acct/prctmpfilename
/usr/lib/acct/prdaily [-c] [-l] [mmdd]
/usr/lib/acct/prtacctfilename [''heading '']
/usr/lib/acct/shutacct [''reason '']
/usr/lib/acct/startup
/usr/lib/acct/turnacct on | off | switch
chargefee can be invoked to charge anumber of units tologin-name.A record is written to/var/adm/fee, to be merged with other accountingrecords byrunacct(1M).
ckpacct should be initiated usingcron(1M) to periodically check the size of/var/adm/pacct. If the size exceedsblocks,500 by default,turnacct will beinvoked with argumentswitch. To avoid a conflict withturnacct switch execution inrunacct, do not runckpacct andrunacct simultaneously. If the number of freedisk blocks in the/var file system falls below500,ckpacctwill automatically turn off the collection of process accounting records via theoff argument toturnacct. When at least500 blocks are restored, the accounting will be activated again on the next invocation ofckpacct. This feature is sensitive to the frequency at whichckpacct isexecuted, usually by thecron(1M) command.
dodisk should be invoked bycron(1M) to perform the disk accounting functions.
lastlogin is invoked byrunacct(1M) to update/var/adm/acct/sum/loginlog, which shows the lastdate on which each person logged in.
monacct should be invoked once each month or each accounting period.numberindicates which month or period it is. Ifnumber is not given,it defaults to the current month (01-12). This default is useful ifmonacct is to executed usingcron(1M) on the first day of eachmonth.monacct creates summary files in/var/adm/acct/fiscal and restarts the summary files in/var/adm/acct/sum.
nulladm createsfilename with mode 664 and ensures that owner and groupareadm. It is called by various accounting shell procedures.
prctmp can be used to print the session record file (normally/var/adm/acct/nite/ctmpcreated byacctcon1 (seeacctcon(1M)).
prdaily is invoked byrunacct(1M) to format a report of the previousday's accounting data. The report resides in/var/adm/acct/sum/rprt/mmdd wheremmdd is themonth and day of the report. The current daily accounting reports maybe printed by typingprdaily. Previous days' accounting reports can be printedby using themmdd option and specifying the exact report date desired.
prtacct can be used to format and print any total accounting (tacct)file.
shutacct is invoked during a system shutdown to turn process accounting offand append areason record to/var/adm/wtmpx.
startup can be invoked when the system is brought to a multi-userstate to turn process accounting on.
turnacct is an interface toaccton (seeacct(1M)) to turn process accountingon oroff. Theswitch argument moves the current/var/adm/pacct to thenext free name in/var/adm/pacct.incr (whereincr is a number starting with0 and incrementing by one for each additionalpacct file), thenturns accounting back on again. This procedure is called byckpacct andthus can be taken care of by thecron(1M) command and usedto keep pacct to a reasonable size.shutacct usesturnacctto stop process accounting.startup usesturnacct to start processaccounting.
The following options are supported:
This option prints a report of exceptional resource usage by command, and may be used on current day's accounting data only.
This option prints a report of exceptional usage by login id for the specified date. Previous daily reports are cleaned up and therefore inaccessible after each invocation ofmonacct.
This option usesacctdusg (seeacct(1M)) to do a slower version of disk accounting by login directory.filenames specifies the one or more filesystem names where disk accounting will be done. Iffilenames are used, disk accounting will be done on these filesystems only. If the-o option is used,filenames should be mount points of mounted filesystems. If the-o option is omitted,filenames should be the special file names of mountable filesystems.
Configuration file for thelogadm(1M) command
Holds all accounting commands listed in section 1M of this manual
Contains the limits for exceptional usage by command name
Contains the limits for exceptional usage by login ID
Fiscal reports directory
Working directory
Summary directory that contains information formonacct
File updated by last login
Accumulator for fees
Current file for per-process accounting
Used ifpacct gets large and during execution of daily accounting procedure
History of user access and administration information
Seeattributes(5) for descriptions of the following attributes:
|
acctcom(1),acct(1M),acctcms(1M),acctcon(1M),acctmerg(1M),acctprc(1M),cron(1M),fwtmp(1M),logadm(1M),runacct(1M),acct(2),acct.h(3HEAD),utmpx(4),attributes(5)
Seerunacct(1M) for the main daily accounting shell script, which performs theaccumulation of connect, process, fee, and disk accounting on a daily basis.It also creates summaries of command usage.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |