ja - starts and stops user job accounting information
SYNOPSIS
jjaa [--aa ash] [--cc] [--dd] [--DD level] [--ee] [--ff] [--gg gid] [--hh]
[--jj jid] [--JJ] [ll] [mm] [--MM marks] [--nn names] [--oo] [--pp pro
jid] [--rr] [--ss] [--tt] [--uu uid] [file]
DESCRIPTION
The jjaa command provides job-related accounting informa
tion. This information is taken from the job accounting
file to which the kernel writes, provided that job
accounting is enabled. The job accounting file can be
either the file you provide or the default, described in
the following. jjaa provides information only about termi
nated processes. The login shell and the current jjaa com
mand being executed are active processes and are not
reported by jjaa. See ps(1) for information about active
processes.
To enable job accounting, use the jjaa command. You may
specify only the mark option (--mm) and the optional file
name when enabling. If the job accounting file does not
exist, jjaa creates it. If the file does exist, accounting
information is appended to the existing file. If job
accounting is already enabled and the optional filename
specified is a file other than the currently active job
accounting file, the newly specified file becomes the job
accounting file.
If you do not specify the optional filename, the
AACCCCTT_TTMMPPDDIIRR environment variable must be set to a direc
tory. A default name of the following form is then used:
$$AACCCCTT_TTMMPPDDIIRR//..jjaacccctt<<jid>
The AACCCCTT_TTMMPPDDIIRR environment variable is not exported in
at(1) or crontab(1) jobs. You must specify the job
accounting filename in the at(1) or crontab(1) commands;
otherwise, jjaa will abort.
On normal termination of job accounting (--tt specified), jjaa
removes the default job accounting file and disables job
accounting. If you specify the optional filename when
enabling, specify the same name when terminating. The
optional job accounting file is not deleted by the jjaa com
mand.
The jjaa command lets you mark the positions of various com
mands (processes) by writing the position of the next
accounting record to be processed to standard output. You
can use these marks when generating reports to restrict
the information reported.
command:
Report selection options
--cc, --ff, --oo, --ss
Record selection options
--aa ash (deferred), --gg gid, --jj jid, --MM marks, --nn
names, --pp projid (deferred), and --uu uid
Report modifier options
--dd, --ee, --hh, --JJ, --ll
Special options (debug, mark, raw, and disable)
--DD, --mm, --rr, and --tt
Report Selection Options
The jjaa command can produce different types of reports by
using the --cc, --ff, --oo, and --ss options. The report-selec
tion options are first summarized and then described in
detail.
In summary, the report selection options are as follows:
--cc Produces the command report (--cc and --oo are mutually
exclusive).
--ff Produces the command flow report.
--oo Produces the other (alternative) command report (--oo
and --cc are mutually exclusive).
--ss Produces the summary report.
Described in detail, the report selection options are as
follows:
--cc Produces a command report. The following fields
are reported when you specify the --cc option with
the --ll option or with the --ll and --hh options. These
fields provide statistics about individual pro
cesses.
CCoommmmaanndd NNaammee First 15 characters of the
name of the command that
was executed.
SSttaarrtteedd AAtt Start time of the process.
EEllaappsseedd SSeeccoonnddss Elapsed time of the pro
cess.
UUsseerr CCPPUU SSeeccoonnddss Amount of CPU time the
process consumed while it
was executing in user
mode.
process consumed while it
was executing in system
mode.
BBllkk II//OO WWaaiitt SSeeccss Amount of time the process
waits for block I/O com
pletion.
RRaaww II//OO WWaaiitt SSeeccss Amount of time the process
waits for raw I/O comple
tion.
CCPPUU MMEEMM AAvvgg MMbbyytteess (--ll) Average amount of
memory that this process
used. This value is cal
culated by dividing the
memory integral by the
total CPU time (system +
user CPU time). For more
information on memory
integrals, see the Compre
hensive System Accounting
for Linux manual.
CChhaarraacctteerrss RReeaadd (--ll) Number of characters
in Mbytes read by the
rreeaadd, rreeaaddvv, and system
calls (see read(2),
readv(2), and pread(2)).
CChhaarraacctteerrss WWrriitttteenn (--ll) Number of characters
in Mbytes written by the
wwrriittee, wwrriitteevv, and ppwwrriittee
system calls (see
write(2), writev(2), and
pwrite(2)).
BBlloocckkss RReeaadd (--ll) Number of blocks read
by the rreeaadd, rreeaaddvv, and
pprreeaadd system calls (see
read(2), readv(2), and
pread(2)).
BBlloocckkss WWrriitttteenn (--ll) Number of blocks
written by the wwrriittee,
wwrriitteevv, and ppwwrriittee system
calls (see write(2),
writev(2), and pwrite(2)).
LLooggiiccaall II//OO RReeaadd (--ll) Number of logical I/O
read requests that the
process performed. A log
ical I/O request is
cess calls a rreeaadd, rreeaaddvv,
or pprreeaadd system call.
LLooggiiccaall II//OO WWrriittee (--ll) Number of logical I/O
write requests that the
process performed. A log
ical I/O write request is
performed each time a pro
cess calls a wwrriittee, or
wwrriitteevv, or ppwwrriittee system
call.
CCoorreeMMeemm HHiiVVaalluuee (--hh) (--ll) Maximum amount
of core memory the process
used at any one time. The
value is reported in
Kbytes.
VViirrttMMeemm HHiiVVaalluuee (--hh) (--ll) Maximum amount
of virtual memory the pro
cess used at any one time.
The value is reported in
Kbytes.
EExx SStt (--ll) Lower 8 bits from the
exit status of the pro
cess. See wait(2) for
more information.
NNii (--ll) The last nice value
of the process.
FFll (--ll) Accounting flag. The
following values are
available:
FF The process forked
but did not exe
cute.
SS The process used
superuser privi
leges.
The accounting flags are
defined in
//uussrr//iinncclluuddee//ccssaa..hh.
SSBBUUss System billing unit (SBU)
for the process. The sys
tem administrator config
ures SBU calculations.
For more information, see
Accounting for Linux man
ual.
--ff Produces a command flow report. This report pro
vides information on the parent/child relationships
of processes and, if you specify the --ll option, CPU
user and system time (in seconds).
--oo Produces an alternative (other) command report.
The --oo option report contains the following fields,
which show statistics about individual processes.
CCoommmmaanndd NNaammee First 15 characters of
the name of the command
that was executed.
SSttaarrtteedd AAtt Start time of the pro
cess.
EEllaappsseedd SSeeccoonnddss Elapsed time of the pro
cess.
PPrroocc IIDD Process ID of the current
process.
PPaarreenntt PPrrooccIIDD Process ID of the parent
process.
CCoorreeMMeemm HHiiWWaatteerr Maximum amount of core
memory the process used
at any one time. The
value is reported in
Kbytes.
VViirrttMMeemm HHiiWWaatteerr Maximum amount of virtual
memory the process used
at any one time. The
value is reported in
Kbytes.
--ss Produces a summary report. The --ss option report
contains the following fields, which provide accu
mulated usage statistics for the reporting period.
JJoobb AAccccoouunnttiinngg FFiilleennaammee Name of the file to
which the kernel
writes the jjaa
accounting records.
OOppeerraattiinngg SSyysstteemm Operating system
name, node name,
release, version, and
hardware type.
the real user.
GGrroouupp NNaammee ((IIDD)) Name and group ID of
the real group.
PPrroojjeecctt NNaammee ((IIDD)) Project name and pro
ject number that this
process uses
(deferred). Multiple
project ID usage is
listed, but not indi
vidual projects.
JJoobb IIDD Job ID associated
with these processes.
RReeppoorrtt SSttaarrttss Starting time of the
process that began
first during the
reporting period.
RReeppoorrtt EEnnddss Ending time of the
process that was the
last to complete dur
ing the reporting
period.
EEllaappsseedd TTiimmee Duration of the
reporting period in
seconds (the differ
ence between the
report ending and
starting times).
UUsseerr CCPPUU TTiimmee Total CPU time (in
seconds) used during
the reporting period
while the processes
were in user mode.
SSyysstteemm CCPPUU TTiimmee Total CPU time (in
seconds) used during
the reporting period
while the processes
were in system mode.
BBlloocckk II//OO WWaaiitt TTiimmee Total time in seconds
during the reporting
period while the pro
cesses were waiting
for block I/O comple
tion.
during the reporting
period while the pro
cesses were waiting
for raw I/O comple
tion.
CCPPUU TTiimmee CCoorree MMeemmoorryy IInntteeggrraall ((MMbbyyttee--sseeccoonnddss))
Sum of the core mem
ory integrals for all
processes. For more
information on memory
integrals, see the
Comprehensive System
Accounting for Linux
manual.
CCPPUU TTiimmee VViirrttuuaall MMeemmoorryy IInntteeggrraall ((MMbbyyttee--sseeccoonnddss))
Sum of the virtual
memory integrals for
all processes.
MMaaxxiimmuumm CCoorree MMeemmoorryy UUsseedd ((MMbbyytteess))
Maximum amount of
core memory used by
any process at one
time.
MMaaxxiimmuumm VViirrttuuaall MMeemmoorryy UUsseedd ((MMbbyytteess))
Maximum amount of
virtual memory used
by any process at one
time.
CChhaarraacctteerrss RReeaadd Total number of char
acters read by the
read(2), readv(2),
and pread(2) system
calls by all pro
cesses in the report
ing period.
CChhaarraacctteerrss WWrriitttteenn Total number of char
acters written by the
write(2), writev(2),
and pwrite(2) system
calls by all pro
cesses in the report
ing period.
BBlloocckkss RReeaadd Total number of
blocks read by the
read(2), readv(2),
and pread(2) system
cesses in the report
ing period.
BBlloocckkss WWrriitttteenn Total number of char
acters written by the
write(2), writev(2),
and pwrite(2) system
calls (deferred) by
all processes in the
reporting period.
LLooggiiccaall II//OO RReeaadd RReeqquueessttss Total number of
read(2), readv(2),
and pprreeaadd. system
calls executed by all
processes in the
reporting period.
LLooggiiccaall II//OO WWrriittee RReeqquueessttss Total number of
write(2) and
writev(2) system
calls executed by all
processes in the
reporting period.
NNuummbbeerr ooff CCoommmmaannddss Total number of com
mands that completed
during the reporting
period.
SSyysstteemm BBiilllliinngg UUnniittss Sum of the system
billing units (SBUs)
of all processes.
Mark and Disable Options
The mark and disable options are as follows:
--mm Writes the position of the next accounting record
to standard output. This can be used to mark vari
ous positions within the job accounting file for
later use with the --MM option. The position marked
is the byte offset of the current end-of-informa
tion of the job accounting file. (--mm cannot be
used with the report selection and modifier options
nor with the --tt disable option.)
--tt Disables (terminates) job accounting. (--mm and --tt
are mutually exclusive).
Record Selection Options
--aa ash Report is for this array session handle (ash)
only. (deferred)
group name only.
--jj jid Report is for this job identifier (jid) only.
--uu uid Report is for this user identifier (uid) or user
name only.
--nn names Shows only commands matching names patterns that
may be regular expressions, as in ed(1), except
that a + symbol indicates one or more occur
rences.
--pp projid Report is for this project identifier (projid)
or project name only. (deferred)
--MM marks Shows only commands within the marked range.
This can be a list of ranges with each list item
having the following form:
.. First command preceding cur
rent position
mm11 First command following mark
mm11:: All commands between the
mark and EOF
mm11::mm22 All commands between the two
marks
::mm11 All commands between BOF and
the mark
:: All commands between BOF and
EOF (default)
See the --mm option for information on how to
obtain marks.
Report Modifier Options
Report modifier options must be used with at least one
selection option. The report modifier options are as fol
lows:
--dd Reports on workload management and tape (tape is
deferred) usage.
--ee Generates an extended summary report; you must use
--ee with the --ss option. The following are descrip
tions of fields produced by specifying the --ee
option with the --ss option. These fields provide
additional accumulated statistics for the reporting
period:
Number of times the pages were
swapped out of memory.
NNuummbbeerr ooff MMiinnoorr PPaaggee FFaauullttss
Number of minor page faults.
NNuummbbeerr ooff MMaannoorr PPaaggee FFaauullttss
Number of major page faults.
--hh Provides the largest amount of core and virtual
memory the process used at one time in 1K units.
Used only with both the --cc and --ll options.
--ll Provides additional information when used with the
--cc or --ff options.
--rr Raw mode, no headers are printed.
--DD Enables debugging for the jjaa command. Valid values
are 1 through 4. Debugging is off by default. A
debug level greater than one provides program flow
information. A debug level greater than three pro
vides additional information about records which
are skipped over due to the requested jjaa record
selection options.
EXAMPLES
Examples 1 and 2 show the usage of the --mm and --MM options
with standard shell and Korn shell variables.
Example 1:
jjaa ##eennaabbllee jjoobb aaccccoouunnttiinngg
..
.. ((Miscellaneous commands))
..
mm11==``jjaa --mm`` ##mmaarrkk jjoobb aaccccoouunnttiinngg ffiillee''ss ccuurrrreenntt ppoossiittiioonn
..
.. ((Commands of special interest))
..
mm22==``jjaa --mm`` ##mmaarrkk jjoobb aaccccoouunnttiinngg ffiillee''ss ccuurrrreenntt ppoossiittiioonn
..
.. ((Miscellaneous commands))
..
jjaa --ccMM $$mm11::$$mm22 ##pprriinntt ccoommmmaanndd rreeppoorrtt ffrroomm mmaarrkk mm11 ttoo mmaarrkk mm22
jjaa --sstt ##pprriinntt ssuummmmaarryy rreeppoorrtt ffoorr eennttiirree sseessssiioonn aanndd ddiissaabbllee
jjoobb aaccccoouunnttiinngg
Example 2:
jjaa ##eennaabbllee jjoobb aaccccoouunnttiinngg
..
.. ((Miscellaneous commands))
mm11==``jjaa --mm`` ##mmaarrkk jjoobb aaccccoouunnttiinngg ffiillee''ss ccuurrrreenntt ppoossiittiioonn
..
.. ((Commands of special interest))
..
jjaa --ccMM $$mm11:: ##pprriinntt ccoommmmaanndd rreeppoorrtt ffrroomm mmaarrkk ttoo EEOOFF
..
.. ((Miscellaneous commands))
..
jjaa --sstt ##pprriinntt ssuummmmaarryy rreeppoorrtt ffoorr eennttiirree sseessssiioonn aanndd ddiissaabbllee
jjoobb aaccccoouunnttiinngg
Example 3:
This example shows example output when you use the --cc
option.
Job Accounting - Command Report
===============================
Command Started Elapsed User CPU Sys CPU Blk I/O Raw I/O
Name At Seconds Seconds Seconds Wait Secs Wait Secs SBU's
=============== ======== ========== ========== ========== ========== ========== =======
# CFG ON( 1) ( 6) 10:57:53 11/28/2000 System: Linux porsche07 2.4.0-test7.csa.1
#9 SMP Sun Nov 12 10:17:23 CST 2000 i686
ja 10:57:53 0.33 0.26 0.01 0.00 0.00 0.00
who 10:58:19 0.02 0.00 0.01 0.00 0.00 0.00
ja 10:58:32 0.26 0.25 0.00 0.00 0.00 0.00
csacom 10:58:51 0.01 0.01 0.00 0.00 0.00 0.00
ls 11:23:27 0.02 0.01 0.00 0.00 0.00 0.00
ls 11:24:40 0.01 0.01 0.00 0.00 0.00 0.00
ls 11:24:44 0.01 0.00 0.01 0.00 0.00 0.00
vi 11:24:50 151.95 0.00 0.02 0.00 0.00 0.00
The ## CCFFGG OONN output line is a configuration record written
when job accounting was enabled via the jjaa command. This
record contains the daemon accounting types enabled,
record accounting types enabled, last system boot-time,
and system identification information.
Example 4:
The following example shows the output of the --ss option:
Job CSA Accounting - Summary Report
====================================
Job Accounting File Name : /tmp/username.ja
Operating System : Linux porsche07 2.4.0-test7.csa.1 #9 SMP Sun
User Name (ID) : username (10320)
Group Name (ID) : resmgmt (16061)
Project Name (ID) : ? (0)
Job ID : 0xa0700000041fe
Report Starts : 12/13/00 10:19:50
Report Ends : 12/13/00 10:19:55
Elapsed Time : 5 Seconds
User CPU Time : 0.2900 Seconds
System CPU Time : 0.0350 Seconds
CPU Time Core Memory Integral : 0.0055 Mbyte-seconds
CPU Time Virtual Memory Integral : 0.0139 Mbyte-seconds
Maximum Core Memory Used : 1.1602 Mbytes
Maximum Virtual Memory Used : 2.0898 Mbytes
Characters Read : 0.1482 Mbytes
Characters Written : 0.0010 Mbytes
Blocks Read : 16
Blocks Written : 0
Logical I/O Read Requests : 61
Logical I/O Write Requests : 16
Number of Commands : 5
System Billing Units : 0.0000
SEE ALSO
at(1), crontab(1), csa(8), csacom(1), sh(1), pread(2),
pwrite(2), read(2), readv(2), wait(2), write(2),
writev(2),
Man(1) output converted with
man2html