VMCD.ORG

Focus on database mail:ylouis83#gmail.com

svmon -S中inuse的求和脚本及其结果比svmon -G小的原因

Posted by admin on 2nd November 2011

很多客户可能认为svmon -S中inuse的求和结果和svmon -G中的inuse一样,但是实际是不一样的。下面的脚本可以用来统计svmon -S中的inuse的相加结果:

#!/usr/bin/ksh
svmon -S | cut -c54-62 | awk '/^[-sLm]/ {if ($1 ~ /L/)
{COUNT1 =($2*4096+COUNT1)}
else if ($1 ~ /m/)
{COUNT2 =($2*16+COUNT2)}
else {COUNT3 =$2+COUNT3}}
END {printf "The result is as following with 4k as unit size
\n16M page count=%d\n64k page count=%d\n4k page count=%d\nTatal page count=%d\n", COUNT1,COUNT2,COUNT3,'COUNT1+COUNT2+COUNT3'}'

那么,产生这种差别的原因是什么呢?解释如下:
svmon -S用来[......]

Read more

Tags:
Posted in Unix/Linux | No Comments »