Originally posted by: tttttttttttt
Thanks for the reply. I have got the script done and also it seems working well.
memory.sh:
m=`svmon -G | awk '{ if ($1=="memory") my=$3; else {if ($1=="pg") my=my" "$4};
if($1=="pg") print my }'`
s=`ps -e|grep "java" |wc | awk '{print $1}'`
echo "$m $s" >> /tmp/memory.out
I use another shell to do timing execution using a infinite loop and sleep:
while true
do
/memory.sh
sleep 2
done
Feel free to give your advice if you do not think it is ok.
Also I had tried nmon. It is really a good way especially integrated with nmon analyzer. But my requirement is some what special( need the number of java process every 2 seconds). So just the script can do that.
#AIX-Forum