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 it will help with administration.

Related documentation

The product documentation library is also available through the following link:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html


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. A previously described, 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




[ Doc Ref: 90605195214800     Publish Date: Jan. 17, 2001     4FAX Ref: 6832 ]