I change the script
My method is
vmstat 1 1 => vmstat 3 3
It let the second from 1 sec to 3 sec and three times.
Because the data line changed from 5 to 7, "PARSE_0" have to correct the right line , NR==5 => NR ==7. It will get the right line.
if [ $SOLARIS_8 -o $SOLARIS_9 ] ; then
CMD='eval /usr/sbin/prtconf 2>/dev/null | grep Memory ; /usr/sbin/swap -s ; vmstat 3 3 ; vmstat -s ; prstat -n 1 1 1; `dirname $0`/hardware.sh; sar -gp 1 2; '
else
CMD='eval /usr/sbin/prtconf 2>/dev/null | grep Memory ; /usr/sbin/swap -s ; vmstat -q 3 3 ; vmstat -s ; prstat -n 1 1 1; `dirname $0`/hardware.sh; sar -gp 1 2'
fi
PARSE_0='/^Memory size:/ {memTotalMB=$3} (NR==7) {memFreeMB=$5 / 1024}'
... View more