Solaris 10 comes with a new feature called SMF (Solaris Management Facility), and to
enable SAR, we need to update the SMF database with this information.
# svcadm enable svc:/system/sar:default
Now lets check if it is really enabled.
# svcs -x system/sar
svc:/system/sar:default (system activity reporting package)
State: online since Sun Nov 16 10:07:42 2008
See: sar(1M)
See: /var/svc/log/system-sar:default.log
Impact: None.
OK. Looks good, but this was only the first part. The second part is, to activate the
two shell scripts that comes with SAR:
/usr/lib/sa/sa1 = a shell script to collect and store data in the binary file /var/adm/sa/sadd, where dd is the current day
/usr/lib/sa/sa2 = a shell script that writes a daily report in the file /var/adm/sa/sardd
To run those scripts regurarly, we need to enable the three lines, in the crontab of the user sys:
# crontab -l sys
#ident "@(#)sys 1.5 92/07/14 SMI" /* SVr4.0 1.2 */
#
# The sys crontab should be used to do performance collection. See cron
# and performance manual pages for details on startup.
#
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
That’s it. Now the System Activity Reporter is running every 20 minutes,
and at 18:05 o’clock a daily report is created.
Recent Comments