Performance Analysis and Tuning Simplified
Sample Reports Video Platforms Customer Reviews About Contact Home

How to Set Up sar

The following instructions are designed to help you set up sar for data collection using the traditional data collection intervals. If you run a 24x7 shop or have other reasons for changing the sampling times and intervals, please understand that this is only meant to be a starting point. These instructions assume that you have a reasonable amount of knowledge about system administration.

HP-UX 11.x * Solaris 2.5+ * AIX 4.2+


HP-UX 11.x:

First, make sure the /var/adm/sa directory exists, and make it if it doesn’t.

Here are some recommended cron entries. These entries will capture data once an hour at non-peak times and every 20 minutes during the system’s busiest times. Feel free to modify these entries to best capture statistics from your system’s busiest times. We recommend capturing sar data every 10 to 60 minutes. Add these to your /usr/spool/cron/crontabs/root file using SAM or crontab -e, and if you're using crontab, type them exactly as seen:

#collect sar data
0 * * * * /usr/lbin/sa/sa1
20,40 8-17 * * 1-5 /usr/lbin/sa/sa1
#reduce the sar data
5 18 * * * /usr/lbin/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

NOTE: We believe we've found a bug in the HP-UX 11.00 implementation of sar that prevents the -s switch from working. If the above crontab entries do not produce /var/adm/sa/sar* files or you get mail messgaes with the strange error message "sar: Starting time must be more than ending time", try changing crontab entry for running sa2 to the following:

#reduce the sar data
5 18 * * * /usr/lbin/sa/sa2 -A

If you have any questions or problems, contact us!

Solaris 2.5 and up:

First, make sure the /var/adm/sa directory exists, and make it if it doesn’t.

Next, make sure the SUNWaccu and SUNWaccr packages are installed.

Finally, su as sys, and use crontab -e to uncomment the 3 lines in crontab which run the /usr/lib/sa/sa1 and /usr/lib/sa/sa2 scripts. If those lines aren’t there, add these 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

If you have any questions or problems, contact us!

AIX 4.2 and up:

Make sure that sar has been installed by looking for the file /usr/lib/sa/sa1 and install the fileset bos.acct if sar was not installed. Some scripts that harden the operating system will remove some sar components. We are unaware of any security problems related to sar, but check with IBM if you think that sar components disappeared as a result of hardening. The following instructions assume that sar is present on your system.

First, make sure the /var/adm/sa directory exists, and make it if it doesn’t.

Uncomment the entries in adm's crontabs file which run the sa1 and sa2 scripts. These can be found in the file /var/spool/cron/crontabs/adm and as a rule, that file should be edited with smit or crontab -e when possible.

Here are some recommended cron entries. These entries will capture data once an hour at non-peak times and every 20 minutes during the system's busiest times. Feel free to modify these entries to best capture statistics from your system's busiest times. We recommend capturing sar data every 10 to 60 minutes.

The entries you'll uncomment should look something like this:

#0 8-17 * * 1-5 /usr/lib/sa/sa1 1200 3 &
#0 * * * 0,6 /usr/lib/sa/sa1 &

#0 18-7 * * 1-5 /usr/lib/sa/sa1 &
#5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -ubcwyaqvm &

For best results, change the line that runs the sa2 script to look like this:

5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 3600 -A &

The -A switch will cause all of the data collected by sar to be reported. The -ubcwyaqvm switch prevents some data from being reported.

On the obsolete AIX versions 4.2 throught 5.1, you should also make sure that the schedtune and vmtune utilities can be found in /usr/samples/kernel . If they're not there, install bos.adt.samples. These utilites are used to report on the tunable parameters for the VMM and the scheduler, and SarCheck is much more useful if it can analyze the values of these parameters. On newer versions of AIX, this is not necessary because we look at ioo, schedo, vmo, and vmstat -v for the data we need.

In some cases, it may be necessary to reboot the system for the changes to take effect.

Go to the SarCheck home page

 


Sample ReportsVideoPlatformsCustomer ReviewsAboutContact
Home

Copyright © 1996-2014 Aptitune Corporation, All rights reserved. Information in this document is subject to change without notice.
Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.

SarCheck Home