csacom  -  searches  and  prints  the Comprehensive System
       Accounting (CSA) process accounting files


SYNOPSIS

       csacom [--aa] [--bb] [--cc] [--ff] [--hh] [--ii] [--kk] [--mm]  [--pp]  [--qq]
       [--rr]  [--tt]  [--vv]  [--AA]  [--GG] [--LL] [--JJ] [--MM] [--NN] [--PP] [--TT]
       [--UU]  [--VV]  [--WW]  [--XX]  [--YY]  [--ZZ]  [--ee time]   [--gg group]
       [--jj jid]   [--nn pattern]   [--oo ofile]  [--ss time]  [--uu user]
       [--CC sec]   [--EE time]   [--HH factor]   [--II chars]   [--OO sec]
       [--SS time] [files]


DESCRIPTION

       The ccssaaccoomm utility reads data files, in the format defined
       in the ccssaa..hh file and writes selected records to  standard
       output.   You can specify files to be read; otherwise, the
       standard input,  the  file  specified  by  the  PPAACCCCTT_FFIILLEE
       parameter    in    the    //eettcc//ccssaa..ccoonnff   file,   or   the
       //vvaarr//ccssaa//ddaayy//ppaacccctt file is read.  Each  record  represents
       the execution of one process.

       Memory  and  I/O  fields are printed as zero if memory and
       I/O record accounting are turned off.

       The ccssaaccoomm utility accepts three types of options:  output
       file options, selection options, and printing options.

   Output Options
       --oo ofile   Copies  selected  process  records in the input
                  data format to ofile, an output file you  spec­
                  ify.  Suppresses standard output printing.

   Selection Options
       --ee time    Selects  processes  existing at or before time,
                  given in the format  [DDdd:]hh[:mm[:ss]].   (See
                  EXAMPLES.)   The letter DD flags the presence of
                  the relative day offset parameter, which allows
                  ccssaaccoomm  to  select records from a previous day.
                  (To  determine  the  day  offset,  use  the  --WW
                  option.)

       --gg group   Selects only processes belonging to group.  You
                  can designate the group by either the group  ID
                  or group name.

       --jj jid     Selects  only processes that have a job ID that
                  matches the jid argument.  The jid argument  is
                  expected  in  hexadecimal.   The "0x" prefix or
                  the "0X" prefix are optional.

       --nn pattern Selects only commands matching pattern that may
                  be  a  regular  expression,  as  in regcmp(3G),
                  except that a ++ symbol indicates  one  or  more
                  occurrences.

                  given in the  format  [DDdd:]hh[:mm[:ss]].   See
                  the --ee option and EXAMPLES for more information
                  on this format.  Using the same time  for  both
                  --ss  and  --ee shows the processes that existed at
                  time.

       --uu user    Selects only processes  that  belong  to  user.
                  May  be  specified  by  a user ID, a login name
                  that is then converted to a user ID, a ## symbol
                  designating  only those processes executed with
                  superuser privileges, or a  question  mark  (??)
                  designating  only  those  processes  associated
                  with an unknown user ID.  To avoid  interpreta­
                  tion  by  the  shell, the question mark must be
                  escaped.

       --CC sec     Selects only  processes  with  total  CPU  time
                  (system  plus user time) exceeding sec seconds.

       --EE time    Selects processes ending  at  or  before  time,
                  given  in  the  format [DDdd:]hh[:mm[:ss]].  See
                  the --ee option and EXAMPLES for more information
                  on this format.

       --HH factor  Selects  only  processes  that  exceed  factor.
                  Factor is the "hog factor" (as explained in the
                  description of printing option --hh).

       --II chars   Selects only processes that transfer more char­
                  acters than the cutoff number given  by  chars.
                  Processes that do not have I/O information (I/O
                  record accounting turned off) are not selected.

       --OO sec     Selects  only  processes  with  CPU system time
                  exceeding sec seconds.

       --SS time    Selects processes that start at or after  time,
                  given  in  the  format  [DDdd:]hh].   See the --ee
                  option for more information on this format.

   Printing Options
       --aa     Shows some average statistics about  the  processes
              selected.   The  statistics  are  printed after the
              output records.

       --bb     Reads  backward,  showing  latest  commands  first.
              This  option  has no effect when the standard input
              is read.  The --bb and --WW options are mutually exclu­
              sive.

       --cc     Prints  the  number of read and write system calls,
              separately.

              followed  by  the exit status in decimal.  The pro­
              cess accounting flags are as follows:

              0011            Process  forked  but   no   exec   is
                            invoked.

              0022            Process used super-user privileges.

              0044            Process was checkpointed.

              0088            Process produced a core file.

              1100            Process killed by a signal.

              2200            More accounting records for this pro­
                            cess.

              --hh            Prints the fraction of  total  avail­
                            able CPU time consumed by the process
                            during its execution.  This is  known
                            as  the  "hog factor" and is computed
                            as follows:

                            (total CPU time)/(elapsed time)

              --ii     Prints the number  of  characters  read  and
                     written,  and  the number of blocks read and
                     written.  The read and  written  values  are
                     printed separately.

              --kk     Prints total kcore-minutes and kvirtual-min­
                     utes.  These are the average memory sizes of
                     the process if its execution time is normal­
                     ized to one minute.

              --mm     Prints mean core size and mean virtual  mem­
                     ory  size.   These  are  the  average memory
                     sizes of the process while executing.   This
                     is  the default print option.  If you do not
                     specify  any  other  print  options,  --mm  is
                     selected.   If  you  do  specify other print
                     options and you want mean  memory  sizes  to
                     print, you must specify --mm.

              --pp     Prints process ID and parent process ID.

              --qq     Prints  only  the average statistics as with
                     the --aa option.  Does not  print  any  output
                     records.

              --rr     Prints  the  CPU  factor  (user time/(system
                     time + user time)).


              --vv     Excludes column headings from the output.

              --AA     Prints the array session handle. (deferred)

              --GG     Prints the numeric group ID.

              --LL     Prints the accounting configuration  records
                     that  report events, such as when accounting
                     was started and stopped, and when accounting
                     files  were  switched.  If no other printing
                     option is selected with --LL, --mm is assumed.

              --JJ     Prints a column with job IDs.

              --MM     Prints the high-water core  memory,  virtual
                     memory  usage values, pages swapped, and the
                     number of minor and major page faults.

              --NN     Prints the nniiccee field value and   scheduling
                     policy.   The  nniiccee  value is the scheduling
                     priority for use of CPU time.  The range  of
                     values  typically  is  0  through 39, with 0
                     being super  user  and  higher  nniiccee  values
                     being  lower  priorities.  Scheduling policy
                     is the scheduling mode of a shared group.

              --PP     Prints the project ID. (deferred)

              --TT     Prints the start-of-job and end-of-job data.
                     Ignores  all other print options, except the
                     --bb, --vv, and --LL options.

              --UU     Shows all user IDs in numeric format.

              --VV     Combines the I/O and wait time values  time.
                     This option must be specified with the --cc or
                     --ii option.

              --WW     Prints the start and end dates and each date
                     change found in the file.  Ignores all other
                     print and selection options, except  the  --LL
                     option.   This option is useful if your data
                     spans more than 1 day (that is, not 00:00 to
                     00:00)  and  if  more  than 1 day of data is
                     present in the ppaacccctt file.  The  day  number
                     of  the  date  change  is printed and can be
                     used with the time  selects.   (See  Example
                     2.)   The  --bb  and  --WW  options are mutually
                     exclusive.

              --XX     Prints the process  start  date.   The  date
                     follows  the  last  data printed on the line

                     year (for example, SSaatt FFeebb 1122 22000000).

              --YY     Prints  the process end date.  The date fol­
                     lows the last data printed on the  line  and
                     will  be in the format:  day month date year
                     (for example, SSaatt FFeebb 1122 22000000).

              --ZZ     Skips (does not print)  first  seven  fields
                     (must  be  specified  with  one of the print
                     options (--ccffhhiikkmmpprrttwwAAGGJJMMNNPPXXYY)).

              files  Input file(s) you specify.  These are one or
                     more  of  the //vvaarr//ccssaa//ddaayy//ppaacccctt* files.  If
                     you do not specify files, and if  the  stan­
                     dard input is not associated with a terminal
                     or //ddeevv//nnuullll (as is the case when using & in
                     the  shell),  the  standard  input  is read.
                     Otherwise,  the  file   specified   by   the
                     PPAACCCCTT_FFIILLEE  parameter  in  the //eettcc//ccssaa..ccoonnff
                     file is read.  If that  parameter  does  not
                     exist,   then  //vvaarr//ccssaa//ddaayy//ppaacccctt  is  read.
                     Therefore, when executing ccssaaccoomm  using  the
                     workload  management product, you must spec­
                     ify files.

                       Any file arguments specified are  read  in
                       their respective order.  Each file is usu­
                       ally read forward; that is, in chronologi­
                       cal order by process completion time.  The
                       //vvaarr//ccssaa//aacccctt//ddaayy//ppaacccctt file is  the  cur­
                       rent file to be examined.

              The output fields are as follows:
              --------------------------------------------------------------------
              Field Name              Option  Definition
              --------------------------------------------------------------------

              COMMAND NAME            ! Z     ASCII command name OR #command name if
                                              executed with super-user privileges
              USER                    ! Z     ASCII user name
                                      ! Z     Numeric user ID
                                      && -U
              START TIME              ! Z     Start time of process in clock format
                                              (that is, 10:01:25)
              END TIME                ! Z     End time of process in clock format (that
                                              is, 10:10:15)
              REAL (SECS)             ! Z     Elapsed time of process in seconds
              CPU (SECS)       ! Z && !-t     CPU time used by the process in seconds
                                              OR
              SYSTEM (SECS)           -t      System time used by the process in
                                              seconds
              USER (SECS)             -t      User time used by the process in seconds

              CHARS WRITTEN           -i      Number of characters written
              CPU FACTOR              -r      User time divided by the CPU time
              HOG FACTOR              -h      CPU time divided by the elapsed time
              BLOCKS READ             -i      Number of blocks read
              BLOCKS WRITTEN          -i      Number of blocks written
              CHARS TRNSFD            -iV     Number of characters transferred
              BLOCKS TRNSFD           -iV     Number of blocks transferred

              MEAN CORE SIZE (KB)     -m      Average amount of core memory used by the
                                              process in kilobytes
              MEAN VIRT SIZE (KB)     -m      Average amount of virtual memory used by the
                                              process in kilobytes
              KCORE MIN (KB)          -k      Amount of core memory used by the process
                                              in kilobytes * minutes
              KVIRTUAL MIN (KB)       -k      Amount of virtual memory used by the process
                                              in kilobytes * minutes
              F STAT                  -f      F is the process accounting flags in hexadecimal.
                                              STAT is the exit condition in decimal (value
                                              from exit() system call).  Signal number: 0
                                              means manual exit; 08 means core dump.

              JOB ID                  -J      Job identifier
              ARRAY SESSION HANDLE    -A      Array session identifier
              PROJECT ID              -P      Project identifier
              GROUP ID                -G      Group identifier
              LOGICAL READS           -c      Number of read system calls
              LOGICAL WRITES          -c      Number of write system calls
              LOGICAL REQS            -cV     Number of logical I/O requests
                                              (combined read/write system calls)

              PID                     -p      Process identifier
              PPID                    -p      Parent process identifier

              HIMEM (KBYTES) CORE     -M      High-water core memory usage value in
                                              kilobytes
              HIMEM (KBYTES) VIRTUAL  -M      High-water virtual memory usage value in
                                              kilobytes

              PAGES SWAPPED           -M      Number of pages swapped
              MINOR FAULTS            -M      Number of minor faults
              MAJOR FAULTS            -M      Number of major faults
              NICE                    -N      Nice value of the process
              SCHED DISC              -N      Scheduling policy

              TIME                    -T      Time of the event in clock format
                                              (that is, 10:01:25)
              EVENT                   -T      Event that caused the accounting record
                                              to be written (start-of-job or end-of-job)
              CORE_HIMEM              -T      Job high-water core memory usage value
                                              in kilobytes
              VIRT_HIMEM              -T      Job high-water virtual memory usage value

              PROCESS START DATE      -X     Date that the process started in ctime

              PROCESS END DATE        -Y     Date that the process ended in ctime
                                             format


NOTES

       The  ccssaaccoomm  command  does not print the daemon accounting
       records in the data files.

       The ccssaaccoomm command reports only  on  processes  that  have
       terminated;  use  the  ps(1)  command  to view active pro­
       cesses.

       If time exceeds the present time, time is  interpreted  as
       occurring on the previous day.


EXAMPLES

       Example 1:  The following example generates a list of com­
       mands executed by user ssaammuueell  by  examining  all  current
       process  accounting files.  The output includes system and
       user CPU times.  In this example, if the ppaacccctt  files  are
       not  specified in the order shown, the commands may not be
       reported in ascending time order.

       ccssaaccoomm     --uu     ssaammuueell      --tt      //vvaarr//ccssaa//ddaayy//ppaacccctt??**
       //vvaarr//ccssaa//ddaayy//ppaacccctt

       Example  2:   The  following  example shows how, using the
       printing option --WW, the day number of the date  change  is
       printed.

            ccssaaccoomm --WW

            DDaayy  00::  MMoonn AApprr  33 1100::2200::1111 22000000 -- ffiirrsstt rreeccoorrdd..
            DDaayy  11::  TTuuee AApprr  44 0000::0000::0000 22000000 -- ddaattee cchhaannggee..
            DDaayy  44::  FFrrii AApprr  77 1100::2200::0000 22000000 -- ddaattee cchhaannggee..
            DDaayy  44::  FFrrii AApprr  77 1144::4433::1100 22000000 -- llaasstt rreeccoorrdd..

       Example  3:   The  following  example  shows how you would
       select and print data from day 4, 10:20 A.M.   in  Example
       2;  you  would  use  the  same format to specify dates and
       times when using selection options --ee, --EE, --ss, --SS.

            ccssaaccoomm --ss  DD44::1100::2200

       Example 4:  The following  example  shows  how  you  would
       select  and print data from the ppaacccctt file for an interval
       on day 4 between 8:00 A.M.  and 4:00 P.M.

            ccssaaccoomm --SS DD44::0088::0000::0000 --EE DD44::1166::0000::0000


FILES

       //eettcc//ccssaa..ccoonnff                Accounting configuration file

                                    user names and user IDs

       //eettcc//ggrroouupp                   Group  file   that   contains
                                    group names and group IDs

       //vvaarr//ccssaa//ddaayy//ppaacccctt           Process  accounting file that
                                    contains    resource    usage
                                    information   for   processes
                                    running on the system


SEE ALSO

       csaaddc(8), csacms(8), csacon(8), csarun(8), csaswitch(8),
       nice(1), ps(1), su(1), acctctl(3c).


Man(1) output converted with man2html