csaswitch - checks the status of, enables or disables the
different types of Comprehensive System Accounting (CSA),
and switches accounting files for maintainability
SYNOPSIS
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc check --nn name
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc halt
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc off --nn namelist
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc on [--nn namelist] [--mm memthreshold] [--tt timethreshold] [--PP pathname]
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc status
//uussrr//ssbbiinn//ccssaasswwiittcchh [--DD level] --cc switch
DESCRIPTION
The ccssaasswwiittcchh command checks the current status of the
different types of Comprehensive System Accounting (CSA),
enables or disables them, and switches files for maintain
ability.
You can use ccssaasswwiittcchh to check the current status of an
accounting type or to report the status of all types.
These functions do not require any privileges.
Users must have the CCAAPP_SSYYSS_PPAACCCCTT capability to enable or
disable an accounting type, or to switch files for main
tainability. See the capability(4) and capabilities(4)
man pages for more information on the capability mechanism
that provides fine grained control over the privileges of
a process.
The ccssaasswwiittcchh command accepts the following options:
--DD level Sets the debug level. Level 1 is slightly
verbose; level 3 is the most verbose. Debug
output is written to standard error. By
default, debugging is turned off (level 0).
--cc command Specifies the accounting command.
Command Description
cchheecckk Reports the status for an
accounting type
hhaalltt Turns off all accounting
types
ooffff Disables one or more types of
accounting
oonn Enables one or more types of
accounting
ssttaattuuss Reports the status of all
sswwiittcchh Specifies that a new account
ing file should be created to
maintain manageable files.
Suppose the accounting file
name is //vvaarr//ccssaa//ddaayy//ppaacccctt.
ccssaasswwiittcchh moves the current
accounting file
//vvaarr//ccssaa//ddaayy//ppaacccctt to the
next available file
//vvaarr//ccssaa//ddaayy//ppaacccctt** and then
calls acctctl(3C) using the
file argument
/var/csa/day/pacct. In this
way, accounting data is not
lost, and //vvaarr//ccssaa//ddaayy//ppaacccctt
remains the current file.
--nn name Specifies the name of the accounting type for
which a request is being made. The namelist
argument for the ooffff and oonn commands can be a
single name or a comma-separated list of
names.
Valid process accounting names are:
Name Description
ccssaa CSA accounting
Valid daemon names are:
Name Description
wwkkmmgg Workload management daemon
accounting
ttaappee Tape daemon accounting
(deferred)
Valid record names (linked to the CSA base
record):
Name Description
iioo Input and output data record
mmeemm Memory data record
Valid threshold names are:
Name Description
ttiimmee CPU time threshold
--mm memthreshold
Specifies the virtual memory high-water mark
below which accounting records will not be
written. The threshold should be specified
in Kbytes and as an integer. The --mm option
must be specified when the memt operand is
specified with the --nn option.
--tt timethreshold
Specifies the number of CPU seconds below
which accounting records will not be written.
The threshold should be specified as an inte
ger. The --tt option must be specified when
the time operand is specified with the --nn
option.
--PP pathname Specifies the pathname of the file to which
accounting data is written. If the file
exists, accounting records are appended to
it. Otherwise, ccssaasswwiittcchh creates a new file;
and it sets the owner of the file to aaddmm, the
group to the value of the CCHHGGRRPP parameter in
the //eettcc//ccssaa..ccoonnff file, and the mode to 00666644.
If you specify the oonn command and do not specify the --nn
option, the ccssaasswwiittcchh command gets information about which
accounting types and thresholds to enable from the
//eettcc//ccssaa..ccoonnff file.
When you enable an accounting type, if no accounting type
is currently on, you need to specify the accounting path
name via the --PP option. If you do not specify the --PP
option, ccssaasswwiittcchh gets the pathname from the PPAACCCCTT_FFIILLEE
parameter in the //eettcc//ccssaa..ccoonnff file. If that parameter
does not exist, then ccssaasswwiittcchh uses //vvaarr//ccssaa//ddaayy//ppaacccctt.
When you turn on a linked record, ccssaasswwiittcchh turns on ccssaa
accounting (if it is not on already) since there can be no
linked records without the base record. The same happens
when you set a threshold since thresholds will not have
any effect if ccssaa is not running. Likewise, when you turn
off ccssaa accounting, ccssaasswwiittcchh turns off all the linked
records and thresholds.
When you switch the pacct file, if no accounting type is
currently on, ccssaasswwiittcchh turns on accounting. It gets
information about which accounting types and thresholds to
enable from the //eettcc//ccssaa..ccoonnff file. It also gets the
accounting pathname from the PPAACCCCTT_FFIILLEE parameter in the
//eettcc//ccssaa..ccoonnff file. If that parameter does not exist,
NOTES
The csackpacct(8) shell script invokes ccssaasswwiittcchh to main
tain accounting files of a reasonable size. You should
run csackpacct(8) periodically by using cron(8).
EXAMPLES
Example 1: The following command turns on ccssaa accounting
with the default ppaacccctt file:
//uussrr//ssbbiinn//ccssaasswwiittcchh --cc oonn --nn ccssaa
Example 2: The following command checks the status of mmeemm
accounting:
//uussrr//ssbbiinn//ccssaasswwiittcchh --cc cchheecckk --nn mmeemm
# Accounting status for Thu Feb 3 16:41:48 2000
# Name State Value
mem On
FILES
//eettcc//ccssaa..ccoonnff Accounting configu
ration file
//vvaarr//ccssaa//ddaayy//ppaacccctt Current accounting
file
//vvaarr//ccssaa//ddaayy//ppaacccctt** Switched accounting
files
SEE ALSO
cron(8), csa(8), csackpacct(8), capability(4).
Man(1) output converted with
man2html