|
|
||||
|
What is CSA? What is CSA? CSA is a set of C programs and shell scripts that provide methods for collecting per-process resource usage data, monitoring disk usage, and charging fees to specific login accounts. CSA takes this per-process accounting information and combines it by job identifier (jid) within system boot uptime periods. How is CSA different from other Linux accounting packages? Linux has a form of process accounting which is similar to SysV/BSD basic process accounting. The set of Linux accounting commands provide similar functionality but have different names and options. The Linux kernel itself monitors the size of the accounting records file (pacct). CSA monitoring of file size takes place outside of the kernel.
Currently, Linux has process accounting which provides the
following per process resource usage information. However, the
characters read/written and blocks read/written are hardcoded to
zero.
CSA adds the following additional per process resource usage kernel
counters:
CSA provides the following features which are not available with
other Linux accounting packages: What is a job? A job is a grouping of processes that the system treats as a single entity and is identified by a unique job identifier (job ID). CSA organizes accounting data by jobs and boot times outside of the kernel. For non-workload management jobs, a job consists of all accounting data for a given job ID during a single boot period (i.e. accounting data for all processes within a login session). For a workload management job, a job consists of the accounting data for all job IDs associated with the workload management identifier. For example, the job output may be returned by workload management daemons with separate job IDs. CSA uses the workload management identifier to combine the accounting records from those daemons with the accounting records of the actual executing job.
How do I write a daily or periodic report user exit?
The csarun and csaperiod scripts have some comments about this. The
shell variables used in these two scripts are available for use within
a user exit script. For example, the sorted pacct file is deleted after
a successful daily accounting run. If I want to save that file, I
could use any of the user exits that are executed after the sorted
pacct file is created (see csarun). Here is a simple user exit script
to do that: How do I change the daily or periodic report content? The /etc/csa.conf file has configuration variables for the commands used to create the report sections within the daily and periodic reports. The options for the csabuild, csacrep, csadrep and csarecy commands can be changed in /etc/csa.conf. These changes are picked up by csarun and csaperiod. Changing the csacrep command options affects the information that is reported in the "CONSOLIDATED INFORMATION REPORT" of the daily report and the first section in the periodic report. Changing the csadrep command options affects the information that is reported in the "DAEMON USAGE REPORT" of the daily report. If you want to keep the default report formats but want additional reports, user exits can be used to generate the additional reports.
How do I try out the different report formats?
The input data needed varies by command. The man pages describe the
input and output data files. Typically, a sorted pacct file is
needed, followed by binary data generated from that sorted
pacct file. For example, if I want another report format for the
consolidated information, here's what I could do: Once a saved sorted pacct file is available, other CSA commands with varying options, such as the csajrep command, can be used to find the mix of report information that meets your needs. | ||||
|
Contact Us | Trademarks | Privacy | Using this site means you accept its Terms of Use © 2009 - 2012 Silicon Graphics International Corp. All Rights Reserved. |
||||