NAME csa - overview of Comprehensive System Accounting (CSA) DESCRIPTION CSA (Comprehensive System Accounting) is a set of C programs and shell scripts that, like other accounting packages, provide methods for collecting per-process resource usage data, monitoring disk usage, and charging fees to specific login accounts. CSA provides the following features which are not available with the other accounting packages: o Per-job accounting o Daemon accounting (tape, batch and workload management systems) o Flexible accounting periods (daily and periodic accounting reports can be generated as often as desired and not restricted to once per day or once per month) o Flexible system billing units (SBUs) o Offline archiving of accounting data o User exits for site specific customization of daily and periodic accounting o Configurable parameters o User job accounting (ja(1) command) CSA takes this per-process accounting information and combines it by job identifier (jid) within system boot uptime periods. CSA accounting for an interactive job consists of all accounting data for a given job identifier during a single system boot period. CSA accounting for a batch job includes the accounting data associated with the batch system identifier, which may consist of one or more job identifiers and may span multiple reboots. Daemon accounting records are written at the completion of daemon specific events. These records are combined with per-process accounting records associated with the same interactive or batch job. By default, CSA only reports accounting data for terminated jobs. Interactive jobs, cron jobs and at jobs terminate when the last process in the job exits, which is normally the login shell. A batch or workload management job is recognized as terminated by CSA based upon daemon accounting records and an end-of-job record for that job. Jobs which are still active are recycled into the next accounting period. This behavior can be changed through use of the csarun -A option. A system billing unit (SBU) is a unit of measure that reflects use of machine resources. SBUs are defined in the CSA configuration file and are set to 0.0 by default. The weighting factor associated with each field in the CSA accounting records can be altered to obtain an SBU value suitable for your site. The CSA accounting records are not written into the Linux BSD pacct file but are written into a separate CSA pacct file. The CSA commands can only be used with CSA generated accounting records. Similarly, the BSD accounting commands can only be used with BSD generated accounting records. There are four user exits available with the csarun daily accounting script. There is one user exit available with the csaperiod periodic accounting script. These user exits allow sites to tailor the daily and periodic run of accounting to their specific needs by creating user exit scripts to perform any additional processing and to allow archiving of accounting data. CSA provides two user accounting commands, csacom and ja. The csacom command reads the CSA pacct file and writes selected accounting records to standard output. The csacom command is very similar to the System V acctcom command. The ja command provides job accounting information for the current job of the caller. This information is obtained from a separate user job accounting file to which the kernel writes. The csaswitch command is used to dynamically configure on or off CSA record types, set memory and I/O threshold values to limit the number of accounting records written, switch the CSA pacct file, and provide status information.