Disclaimer

Friday, 20 November 2020

Shell script for Memory Checking in AIX

 

$ cat chkfree.sh

sum=0
for i in `ps -Alo vsz`
do
        test=`echo "$i" | egrep "^[0-9]+$"`
        if [ "$test" ];  then
                sum=`expr $sum + $i`
        fi
done
# Multiply by 4K
sum=`expr $sum \* 4096`
sum=`expr $sum / 1024`
sum=`expr $sum / 1024`
avail=`vmstat | grep -i System | cut -f 3 -d '=' | cut -f 1 -d 'M'`
echo "Physical Memory Configured: $avail MB"
echo "Memory Used: $sum MB"

No comments:

Post a Comment

Understanding SQL Plan Baselines in Oracle Database

  Understanding SQL Plan Baselines in Oracle Database SQL Plan Baseline is the feature in Oracle started from Database 11g that helps to pre...