Solaris 10 Performance Monitoring with SAR


SAR ( System Activity Reporter )

Modify the perf startup script to initialize the performance counters then run the init script.
# vi /etc/init.d/perf
if [ -z "$_INIT_RUN_LEVEL" ]; then
set -- `/usr/bin/who -r`
_INIT_RUN_LEVEL="$7"
_INIT_RUN_NPREV="$8"
_INIT_PREV_LEVEL="$9"
fi
if [ $_INIT_RUN_LEVEL -ge 2 -a $_INIT_RUN_LEVEL -le 4 -a \
$_INIT_RUN_NPREV -eq 0 -a \( $_INIT_PREV_LEVEL = 1 -o \
$_INIT_PREV_LEVEL = S \) ]; then
/usr/bin/su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa`date +%d`"
fi

Utilize the crontab command to modify the crontab configuration file for the sys user.
# vi /var/spool/cron/crontabs/sys
0,10,20,30,40,50 * * * * /usr/lib/sa/sa1
0 * * * * /usr/lib/sa/sa2 –A

Note :
- every 10 minutes will collect the performance data in a binary log file
- every hour will generate text report from binary report created by first line command

View output graph with ksar (http://sourceforge.net/projects/ksar/). Output files that can be viewed are sar* located at /var/adm/sa/ directory.

I hope Oki, Julio, and Dimas helped with this article.

Popular posts from this blog

Howto configure boot device order on ILOM

SAN Switch Config Command

Howto cstm on HP-UX