System Administration Guide, Volume 2

How to Set Up Automatic Data Collection

  1. Become superuser.

  2. Edit the /etc/init.d/perf file and uncomment all lines:

    This version of the sadc command writes a special record that marks the time when the counters are reset to zero (boot time). The sadc output is put into the file sadd (where dd is the current date), which acts as the daily system activity record.

  3. Edit the /var/spool/cron/crontabs/sys file (the system crontab file) and uncomment the following lines:


    # 0 * * * 0-6 /usr/lib/sa/sa1
    # 20,40 8-17 * * 1-5 /usr/lib/sa/sa1
    # 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

    The first entry writes a record to /var/adm/sa/sadd on the hour, every hour, seven days a week.

    The second entry writes a record to /var/adm/sa/sadd twice each hour during peak working hours: at 20 minutes and 40 minutes past the hour, from 8 a.m. to 5 p.m., Monday through Friday.

    Thus, these two crontab entries cause a record to be written to /var/adm/sa/sadd every 20 minutes from 8 a.m. to 5 p.m., Monday through Friday, and every hour on the hour otherwise. You can change these defaults to meet your needs.