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 bottleneck occurs if :
1. run queue (r) > 2 x number of CPU
2. idle time (id) <> 1.25 x user/application time (us)
2. idle time (id) <15.> 200 scans/second
• A critical Memory bottleneck threshold occurs if :
1. free page scan rate (sr) > 300 scans/second
2. swap space available, you should cross-check with result from "swap -s", if there is small swap available you should perform add swap space or RAM upgrade.
• A significant Disk bottleneck threshold occurs if :
1. processes blocked for resources (b) approaches run queue (r)
• A critical Disk bottleneck threshold occurs if :
1. processes blocked for resources (b) >= run queue (r)
I hope Oki, Julio, and Dimas helped with this article.