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.
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.
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. |
spsitenv acct_master=2 spacct_enable=true spacct_excluse_enable=true
Accounting information on the smit enter_data panel includes:
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.
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.
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.
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.
Use SMIT or the spacctnd command to further define SP accounting at the node level.
Accounting information on this panel includes:
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.
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.
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.
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.
spacctnd -e true -j 60.0 -x true 1 1 16
Depending on your environment, you may also wish to perform these tasks:
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:
|/usr/sbin/acct/nulladm /var/adm/wtmp |/usr/sbin/acct/nulladm /var/adm/pacct
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.