IBM Books

Administration Guide


Setting up SP accounting

IBM General Concepts and Procedures for RS/6000, describes a procedure for setting up an accounting system that involves performing the following steps for each AIX system:

The accounting and system partitioning procedure tells you how you can tailor your accounting system. You can define accounting class identifiers and accounting enabled attributes on an SP system level or on an individual node basis. Accounting class identifiers need only be set when you want more than one accounting class. Otherwise you can let it default. You can also specify which nodes are to have accounting enabled. If all nodes are to be enabled, then only SP Accounting Enabled need be set to true and the acct_enable attribute can be left to default on each Node object in the SDR.

This procedure also shows you how to specify exclusive use accounting, how to specify an accounting master other than the default control workstation, and how to set an SP accounting active node threshold value other than the default value of 80.

You can define or change these values after installation by using SMIT or the spacctnd and spsitenv commands.

Accounting and system partitioning

If you do not partition your SP system or if you run with a single system partition, you can assign any node or the control workstation as the accounting master.

Step 1: Enter system accounting information

Use SMIT or the spacctnd and spsitenv commands to define how accounting is to be done on your SP System. This information is read by the installation scripts, which enter specific details about your site's configuration into the System Data Repository (SDR).

Note

As of PSSP 3.1, the Resource Manager function has been integrated into the IBM LoadLeveler product.

If you are setting up accounting and modifying Node objects in the SDR on an SP system that is already running LoadLeveler, you need to update the spacct_excluse_enable keyword on the relevant machine stanzas and reconfigure LoadLeveler.

If you are only changing the SP object in the SDR on an SP system that is already running Resource Manager (to enable exclusive use accounting, for example), then you must reconfigure the Resource Manager using the jm_config command.

Using SMIT

TYPE
smit enter_data

SELECT
Site Environment Information

TYPE
The data in the fields, as needed.

Using spsitenv

The following example enables accounting as the default for all nodes and specifies 2 as the accounting master. It also enables exclusive use accounting.
spsitenv acct_master=2 spacct_enable=true spacct_excluse_enable=true

Accounting information on the smit enter_data panel includes:

SP Accounting Enabled
Use this field to specify whether by default, accounting is enabled or disabled on all nodes that have an accounting enabled attribute of default. A value of true indicates that accounting is enabled on all nodes with an accounting enabled attribute of default. A value of false indicates that accounting is disabled on all nodes that have an accounting enabled attribute of default. The initial value for this attribute is false.

This sets the spacct_enable attribute in the SP object of the SDR. You can specify this attribute by using the spsitenv command instead of SMIT.

SP Accounting Active Node Threshold
Use this field to specify the minimum percentage of nodes for which accounting data must be present. At the time when the new crunacct script runs, data must be available from at least this percentage of nodes in order for processing to continue. The default value for this attribute is 80.

This sets the spacct_actnode_thresh attribute in the SP object of the SDR. You can specify this attribute when using the spsitenv command instead of SMIT.

SP Exclusive Use Accounting Enabled
Use this field to specify whether to activate start and end job records, and thus charge fee records for jobs requesting the exclusive use of a node. The default value for this attribute is false.

This field sets the spacct_excluse_enable attribute in the SP object of the SDR. You can specify this attribute when using the spsitenv command instead of SMIT.

A value of true specifies that exclusive use accounting is enabled on all nodes where the acct_excluse_enable attribute is set to true. You must check each node's acct_excluse_enable attribute for account processing. A value of false (the default) specifies that exclusive use accounting is disabled on the node.

Accounting Master
Use this field to specify which node is to act as the accounting master. This is the node that executes crunacct. The default value for this attribute is 0 (the control workstation) but you can specify any SP node.

This sets the acct_master attribute in the SP object of the SDR. You can specify this attribute when using the spsitenv command instead of SMIT.

Step 2: Enter node accounting information

Use SMIT or the spacctnd command to further define SP accounting at the node level.

Using SMIT

TYPE
smit node_data

SELECT
Accounting Information

TYPE
The data in the fields, as needed.

Accounting information on this panel includes:

Start Frame
Enter the frame number that corresponds to the nodes required for this operation. Specify a value between 1 and 128 inclusive.

Start Slot
Enter the slot number of first node to be used for this operation. Specify a value between 1 and 16 inclusive. Remember that a wide node counts as two slots.

Number of Nodes
Number of nodes to be used for this operation. The node information is added for successive nodes within a frame. If the count of nodes causes the nodes in a frame to be exhausted, the operation continues in the next sequential frame. Specify a value between |1 and 512 inclusive.

Accounting Class Identifier
Use this field to change the accounting class. All nodes with the same string value constitute a class for purposes of grouping and merging accounting data. All nodes will have an initial accounting class identifier of default.

This sets the acct_class_id attribute in the Node object of the SDR. You can specify this attribute when using the spacctnd command instead of SMIT.

You only need to specify a value for this field when you want to change the accounting class.

Accounting Enabled
Use this field to indicate whether accounting is enabled or disabled for a node. A value of true indicates that accounting is enabled for the node. A value of false indicates that accounting is disabled for the node. All nodes have an initial value of default assigned to this attribute. A value of default indicates that the node is enabled for accounting based on your entry in the SP Accounting Enabled field in the SMIT Site Environment panel in Step 1.

This sets the acct_enable attribute in the Node object of the SDR. You can specify this attribute when using the spacctnd command instead of SMIT.

Exclusive Use Accounting Enabled
Use this type field to indicate whether accounting start and end job records, and charge fee records, are processed for jobs having exclusive use of the node. A value of true indicates that exclusive use accounting is enabled and start and end job records will be generated. A value of false indicates that exclusive use accounting is not enabled and start and end job records will not be generated. All nodes have an initial value of false assigned to this attribute.

This sets the acct_excluse_enable attribute in the Node object of the SDR. You can specify this attribute when using the spacctnd command instead of SMIT.

Accounting Job Charge Value
This value is used to determine the number of charge fee units to charge a user for exclusive use of the node and its value is in units of seconds per charge fee unit. All nodes have an initial value of 1.0 assigned to this attribute.

This sets the acct_job_charge attribute in the Node object of the SDR. You can specify this attribute when using the spacctnd command instead of SMIT.

Using spacctnd

The following example adds accounting information for a system with one frame and 16 nodes. Accounting and exclusive use accounting is to be enabled for each node and 60 seconds of exclusive use by a user is to constitute one charge fee unit.
spacctnd -e true -j 60.0 -x true 1 1 16

Additional accounting setup tasks

Depending on your environment, you may also wish to perform these tasks:

Accounting installation

The accounting installation phase is performed automatically when you select the Accounting Support option in ssp.sysman during the installp process. (Refer to the PSSP: Installation and Migration Guide .) This accounting installation process is also performed when you update accounting using spsitenv.

The accounting installation process:

  1. Creates all necessary directories and files on the nodes for which accounting is enabled and on the acct_master node.
  2. Adds the startup command to the /etc/rc file on the nodes for which accounting is enabled.
  3. Creates the /var/adm/acct/nite/jobcharge file on each node for which accounting is enabled. This file contains the job charge value previously defined for the node.
  4. The holidays file (/etc/acct/holidays) is placed in the user.admin file collection and is available on all nodes. Its source is the control workstation. If you do not use file collections, propagate this file, using whatever means is available in your environment, to all nodes in the SP System.
    Note:
    You may have to update the holidays file to reflect the correct information for the current year.
  5. Update the crontabs file to schedule the accounting processes. See Accounting template for crontabs.
  6. Initialize the login and process account data files. Enter:
    |/usr/sbin/acct/nulladm /var/adm/wtmp 
    |/usr/sbin/acct/nulladm /var/adm/pacct
    
    

Accounting template for crontabs

A default crontab template file, describing when each accounting command should be run, is shipped as /usr/lpp/ssp/config/cron_template

and distributed via a file collection. If you wish to run your accounting system on a different schedule, make the appropriate changes to this template. When booting, each node for which accounting is enabled, ensures that its crontab file is updated using this template. If the template does not exist, it is assumed that you use file collections to distribute crontab and nothing is done.

The crontab template file, shown below, contains a partial crontab entry. Each line begins with a keyword specifying a command used by the accounting process.

Figure 8. Accounting template for crontabs

# This is the crontab template file. It is read by acct_config
# to update the root crontab file with accounting-related entries.
 
DODISK   0 1 * * 4
CHKPACCT 5 * * * *
NRUNACCT 0 2 * * 1-6
CRUNACCT 0 4 * * 1-6
CMONACCT 15 5 1 * *

DODISK and CHKPACCT are standard crontab keywords. NRUNACCT, CRUNACCT, and CMONACCT are variations of standard AIX accounting commands discussed earlier in this section. Refer to Chapter 13, Maintaining the crontabs file for more information on crontabs.


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