21.02.2013 Views

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.5.1 Setting up an accounting system<br />

The following is an overview of the steps you must take to set up an accounting<br />

system. Refer to the commands and files noted in these steps for more specific<br />

information.<br />

1. Use the nulladm command to ensure that each file has the correct access<br />

permission: read (r) and write (w) permission for the file owner and group, and<br />

read(r) permission for others by typing:<br />

# /usr/sbin/acct/nulladm wtmp pacct<br />

This provides access to the pacct and wtmp files.<br />

2. Update the /etc/acct/holidays file to include the hours you designate as prime<br />

time and to reflect your holiday schedule for the year.<br />

3. Turn on process accounting by adding the following line to the /etc/rc file or by<br />

deleting the comment symbol (#) in front of the line if it exists:<br />

/usr/bin/su - adm -c /usr/sbin/acct/startup<br />

The startup procedure records the time that accounting was turned on and<br />

cleans up the previous day’s accounting files.<br />

4. Identify each file system you want included in disk accounting by adding the<br />

following line to the stanza for the file system in the /etc/filesystems file:<br />

account = true<br />

5. Specify the data file to use for printer data by adding the following line to the<br />

queue stanza in the /etc/qconfig file:<br />

acctfile = /var/adm/qacct<br />

6. As the adm user, create a /var/adm/acct/nite, a /var/adm/acct/fiscal, and a<br />

/var/adm/acct/sum directory to collect daily and fiscal period records:<br />

# su - adm<br />

# cd /var/adm/acct<br />

# mkdir nite fiscal sum<br />

# exit<br />

7. Set daily accounting procedures to run automatically by editing the<br />

/var/spool/cron/crontabs/root file to include the dodisk, ckpacct, and runacct<br />

commands.<br />

8. Set the monthly accounting summary to run automatically by including the<br />

monacct command in the /var/spool/cron/crontabs/root file. For example, type:<br />

15 5 1 * * /usr/sbin/acct/monacct<br />

Be sure to schedule this procedure early enough to finish the report. This<br />

example starts the procedure at 5:15 a.m. on the first day of every month.<br />

128 <strong>IBM</strong> ^ Certification Study Guide - <strong>AIX</strong> <strong>5L</strong> <strong>Problem</strong> <strong>Determination</strong> Tools and Techniques

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!