Posts

Showing posts from June, 2008

Solaris Performance Monitoring with netstat

Show routing table, check if any un-needed route. # netstat -nr Show state of all TCP socket, check if any CLOSE_WAIT state, it may indicate unresponsive port. Check also if any FIN_WAIT state tcp/ip parameters have to be tuned because the connections are not being closed and they gets accumulating. # netstat –aP tcp Show state of all interfaces. Check if any collision and error receiving or sending packets. If collisions percentage greater than 5%, it indicate bottleneck network. # netstat -i I hope Oki, Julio, and Dimas helped with this article.

Solaris Performance Monitoring with vmstat

Create vmstat monitor script. # vi /tmp/vmstat_script.sh #!/bin/ksh echo "$(date '+%nDATE : %m-%d-%y%nTIME : %H-%M-%S')" >> /tmp/vmstat_result .log vmstat 5 60 >> /tmp/iostat_result.log Change mode permission of script file so it can be executed. # chmod 755 /tmp/vmstat_script.sh Running script for monitoring memory statistics regarding kernel thread, virtual memory, disk, trap, and CPU activity. # /tmp/vmstat_scrip.sh View memory statistics regarding kernel thread, virtual memory, disk, trap, and CPU activity report. # more /tmp/vmstat_result.log DATE : 06-19-08 TIME : 18-01-48 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr sd sd -- -- in sy cs us sy id 0 0 0 14279864 15165272 0 2 0 0 0 0 0 0 0 0 0 366 308 858 0 0 100 Show number of CPU WITH # uname -X | grep NumCPU Analyze the report : • A significant CPU bottlen...

Solaris Performance Monitoring with iostat

Create iostat monitor script. # vi /tmp/iostat_script.sh #!/bin/ksh echo "$(date '+%nDATE : %m-%d-%y%nTIME : %H-%M-%S')" >> /tmp/iostat_result .log iostat -xtc 5 60 >> /tmp/iostat_result.log Change mode permission of script file so it can be executed. # chmod 755 /tmp/iostat_script.sh Running script for monitoring terminal and disk I/O activity and CPU utilization. # /tmp/iostat_scrip.sh View terminal and disk I/O activity and CPU utilization report. # more /tmp/iostat_result.log DATE : 06-19-08 TIME : 18-01-48 extended device statistics tty cpu device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id ssd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 1073 0 0 0 100 ssd1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 nfs1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 Analyze the report : • The significant Disk bottleneck threshold if : 1. time disk ...

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 view...