Setup of System Accounting in AIX 4.x


Contents

About This Document
    Related Documentation
What to Install to Get Accounting Working on a System
Steps for Modifying the Root User Profile
Steps for Setting Up System Accounting
Fields of the Daily Usage Report
Fixes and Problems
Diagnosing Problems

About This Document

This document describes the accounting setup procedures for AIX Versions 4.1, 4.2, and 4.3. Documentation requires the setup person to be the root user. In this document, the root user will be used for setting up system accounting and the user adm for running the reports.

Modify the root user .profile to provide access to the required executables. Modifying the root profile is optional, but will help with administration.

Related Documentation

The AIX and RS/6000 product documentation library is also available:

http://www.rs6000.ibm.com/resource/


What to Install to Get Accounting Working on a System

Make sure the bos.acct fileset is installed. Enter:

    lslpp -l bos.acct

This command should report the state as COMMITTED or APPLIED if the fileset is installed. To get the latest level software for the bos.acct fileset, refer to the section Fixes and Problems in this document.


Steps for Modifying the Root User Profile

  1. Log in as root.
  2. Edit the .profile file with a favorite text editor.
  3. Locate the PATH statement in the .profile file. It must include the /usr/sbin/acct and /var/adm/acct directories, as shown in the following example:
        PATH= /usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:
            /usr/sbin/acct:/var/adm/acct ; export PATH
    
  4. Locate the export statement in the .profile file. If the PATH statement given above was not used, the PATH variable must be included.

Steps for Setting Up System Accounting

  1. Log in to the system as the root user. As described previously, root is the accounting administrator.

  2. Enter:
       su - adm -c /usr/lib/acct/nulladm  /var/adm/wtmp  /var/adm/pacct
    

    This command ensures correct permissions and provides access to the wtmp and pacct files.

  3. Update the /etc/acct/holidays file for the current year using a favorite text editor. The following notes will help clarify the format of this file.

Fields of the Daily Usage Report

The meaning of the fields in the accounting Daily Usage Report are as follows:

UID
User ID number
LOGIN NAME
Login name of user
CPU PRIME
Cumulative CPU minutes during prime hours
CPU NPRIME
During non-prime hours
KCORE PRIME
Cumulative minutes spent in the kernel during prime hours
KCORE NPRIME
During non-prime hours
BLKIO PRIME
Cumulative blocks transferred during prime hours
BLKIO NPRIME
During non-prime hours
RW/WR PRIME
Cumulative blocks read/written during prime hours
RW/WR NPRIME
During non-prime hours
CONNECT PRIME
Cumulative connect time (minutes) during prime hours
CONNECT NPRIME
During non-prime hours
DISK BLOCKS
Cumulative disk usage
PRINT
Queuing system charges (pages)
FEES
Fee for special services
# OF PROCS
Count of processes
# OF SESS
Count of login sessions
# OF SAMPLES
Count of disk samples

Fixes and Problems

Fixes for AIX Versions 4.1, 4.2, or 4.3 can be downloaded via the Internet with the FixDist service.

On very large systems, if there are over 1000 users in the /etc/passwd file, the /usr/sbin/acct/dodisk script must be changed. At line 136 in dodisk, the diskusg command must be changed to read as follows:
    diskusg -Unnnnn $args > dtmp

nnnnn is the new maximum number of users for which disk accounting should be done. (When the maximum number is too small, the dodisk script displays a message to use -Uxxxx.)


Diagnosing Problems

General Information Needed

When Accounting Fails

  1. Check to see what state accounting is in. Look at the /usr/adm/acct/nite/active file. States are as follows:
         setup
         wtmpfix
         connect1
         connect2
         process
         merge
         fees
         disk
         queueacct
         mergetacct
         cms
         userexit
         cleanup
    
  2. Check accterr for additional messages.

Other Items to Check


Setup of System Accounting in AIX 4.x: acct.setup.4x.cmd ITEM: FAX
Dated: 99/05/07~00:00 Category: cmd
This HTML file was generated 99/06/24~12:42:08
Comments or suggestions? Contact us