- Use the nulladm command to ensure that each file has the
correct access permission: read (r) and write (w) permission for the
file owner and group and read (r) permission for others by typing:
/usr/sbin/acct/nulladm wtmp pacct
This provides access to the pacct and wtmp
files.
- Update the
/etc/acct/holidays file to include the hours you designate as prime
time and to reflect your holiday schedule for the year.
Note: Comment lines can appear anywhere in the file as long
as the first character in the line is an asterisk (*).
- To define prime time, fill in
the fields on the first data line (the first line that is not a comment),
using a 24-hour clock. This line consists of three 4-digit fields, in
the following order:
- Current year
- Beginning of prime time
(hhmm)
- End of prime time
(hhmm)
Leading blanks are ignored. You can enter midnight as either 0000
or 2400.
For example, to specify the year 2000,
with prime time beginning at 8:00 a.m. and ending at
5:00 p.m., enter:
2000 0800 1700
- To define the company holidays
for the year on the next data line. Each line contains four fields, in
the following order:
- Day of the year
- Month
- Day of the month
- Description of holiday
The day-of-the-year field contains the number of the day on which the
holiday falls and must be a number from 1 through 365 (366 on leap
year). For example, February 1st is day 32. The other three
fields are for information only and are treated as comments.
A two-line example follows:
1 Jan 1 New Year's Day
332 Nov 28 Thanksgiving Day
- Turn on process accounting by
adding the following line to the /etc/rc file or by deleting the
comment symbol (#) in front of the line if it exists:
/usr/bin/su - adm -c /usr/sbin/acct/startup
The startup procedure records the time that accounting was
turned on and cleans up the previous day's accounting files.
- Identify each file system you
want included in disk accounting by adding the following line to the stanza
for the file system in the /etc/filesystems file:
account = true
- Specify the data file to use
for printer data by adding the following line to the queue stanza in the
/etc/qconfig file:
acctfile = /var/adm/qacct
- As the adm user, create a
/var/adm/acct/nite, a /var/adm/acct/fiscal, a and
/var/adm/acct/sum directory to collect daily and fiscal period
records:
su - adm
cd /var/adm/acct
mkdir nite fiscal sum
exit
- Set daily accounting
procedures to run automatically by editing the
/var/spool/cron/crontabs/root file to include the dodisk, ckpacct,
and runacct commands. For
example:
0 2 * * 4 /usr/sbin/acct/dodisk
5 * * * * /usr/sbin/acct/ckpacct
0 4 * * 1-6 /usr/sbin/acct/runacct
2>/var/adm/acct/nite/accterr
The first line starts disk accounting at 2:00 a.m.
(0 2) each Thursday (4). The second line starts a check
of the integrity of the active data files at 5 minutes past each hour
(5 *) every day (*). The third line runs most
accounting procedures and processes active data files at 4:00
a.m. (0 4) every Monday through Saturday
(1-6). If these times do not fit the hours your system
operates, adjust your entries.
Note: You must have root user authority to edit the
/var/spool/cron/crontabs/root file.
- Set the monthly accounting
summary to run automatically by including the monacct command in the
/var/spool/cron/crontabs/root file. For example, type:
15 5 1 * * /usr/sbin/acct/monacct
Be sure to schedule this procedure early enough to finish the
report. This example starts the procedure at 5:15
a.m. on the first day of each month.
- To submit the edited cron file, type:
crontab /var/spool/cron/crontabs/root