IBM Books

Administration Guide


Accounting by node or by class

An accounting class is a group of nodes for which accounting data is merged together, providing a single report for the nodes in that class. Individual nodes within a class can be enabled or disabled for accounting.

You can define an arbitrary string value to set in the acct_class_id attribute of each node object in the System Data Repository. All the nodes with the same value in the acct_class_id attribute are grouped into one accounting class with merged accounting data.

Default values eliminate the necessity to set a value in the acct_class_id attribute for each node. The default value is the string default. Therefore, all nodes initially belong to one accounting class called default.

The initial value of the acct_enable attribute for each node is also the string default. All nodes with acct_enable=default are enabled or disabled for accounting based on the value you set in the system-wide accounting enabled (spacct_enable) site environment attribute. When you set the spacct_enable attribute to true, you enable accounting on all nodes for which the acct_enable attribute is set to default. Likewise, when you set the spacct_enable attribute to false, the initial value at installation, accounting is disabled on all nodes that have acct_enable=default. Thus, accounting can be enabled or disabled for the entire SP system and individual nodes can be treated as exceptions.

How SP accounting differs from standard AIX

Standard AIX accounting uses a script called runacct. This script is normally run every night by cron to provide daily usage reports. It also keeps a running total of usage over some fiscal period (usually a month). SP accounting splits the runacct function into two parts. The first part is a script that is run on each SP node every night, just as runacct does. This script is named nrunacct. The second part is a script that executes on an accounting_master node each night, after the nrunacct scripts are run. This script is named crunacct and it consolidates the nrunacct information from each node. The scripts cmonacct and cprdaily are SP versions of standard AIX programs, modified to handle accounting class and exclusive use accounting.

nrunacct

The nrunacct script provides the function that merges raw data from the process, login, print, fee and disk subsystems. It also provides support to account for the exclusive use of a node.

nrunacct also creates an SP version of the loginlog file using the var/adm/acct/sum/loginlog files for the specified accounting cycle. Only the most recent loginlogyyyymmdd file from each node is pertinent.

nrunacct provides a user exit for any site-specific accounting procedures in the /var/adm/nsiteacct file.

crunacct

The crunacct script provides the function that produces daily summary reports and accumulates data for the fiscal period, using the merged data from each node.

SP accounting merges total accounting data by user ID and login name, just as the standard AIX accounting does. This means that all SP nodes must have identical user IDs and login names. In other words, all SP nodes must be members of the same user name space, whether it is implemented through NIS, the SP User Management tools, or through other means.

cmonacct

An SP version of monacct, cmonacct creates summary files for monthly or fiscal reports.

cprdaily

An SP version of prdaily, cprdaily creates daily report files of accounting activity and cleans up files no longer needed.

Accounting for exclusive use of node jobs

While SP nodes are expected to execute exclusive parallel jobs, nonexclusive parallel jobs, and nonparallel jobs during a single accounting cycle, normal operation often results in the exclusive use of a node when executing a compute-intensive parallel job. A single job that makes such great demands on the compute resources of a node where no other jobs can share that node's resources is said to be an exclusive use of a node job. Such jobs can be handled separately for accounting purposes.

Standard AIX accounting produces a record for each process as the process completes. These records are later merged by user ID and login name. A user who executes one or more types of jobs on the same node has all process accounting records for that node merged together, resulting in the loss of those processes that had exclusive use of the node. It is important to track the exclusive use of a node by a user because the cost is likely to be different than the cost of shared use.

SP accounting addresses exclusive-use jobs as follows: Before starting a job that has exclusive use of a node, LoadLeveler executes a start job command under the real user ID of the job. When the job is finished LoadLeveler executes an end job command, again under the real user ID of the job. These commands consist solely of an exit() system call in their main() procedure. Their purpose is to generate process accounting records for the user ID of the job that can then be used to bracket all of the normal process accounting records of the job. In other words, all of the process accounting records generated by an exclusive job can be identified and excluded from the other process accounting records generated on the node. 3

The process accounting records for the start job and end job programs are used to calculate the time the job had exclusive use of the node. The time is then charged to the user ID of the job by converting it to charge fee units. Use of the charge fee mechanism eliminates the need to generate additional accounting reports.

Accounting records for the start job and end job programs are identified by the names of the commands as found in the records. These start and stop programs are given the nonstandard names of SJSJSJSJ and EJEJEJEJ to avoid conflict with any other standard job names.

An attribute of the SP object in the SDR, spacct_excluse_enable, determines whether the start job program and end job program are executed for exclusive-use jobs. A node-level SDR attribute, acct_excluse_enable, determines whether accounting is activated to process start and end job records, and to generate charge fee records for jobs making exclusive use of that node.


Footnotes:

3
The Resource Manager function has been integrated into the IBM LoadLeveler product.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]