Hi All,
There is a shell script that captures Memory status in AIX 6.1 64 bits!
I need it to be validated by shell script experts for the following:
Shell Script:
cat memusageAIX.sh
#!/usr/bin/ksh
#
# Memory usage under AIX
#
USED=`svmon -G | head -2 | tail -1 | awk '{ print $3 }'`
USED=`expr $USED / 256`
TOTAL=`lsattr -El sys0 -a realmem | awk '{ print $2 }'`
TOTAL=`expr $TOTAL / 1024`
FREE=`expr $TOTAL - $USED`
echo "\nMemory Information"
echo "=================="
echo "total memory = $TOTAL MB"
echo "free memory = $FREE MB"
echo "used memory = $USED MB"
exit 0
Question:
Why USED is divided by 256 in the above shell script :
USED=`expr $USED / 256`
How did we arrive at 256 figure?
What is the significance of it?
Thanks for your time!
Regards,