#script for monitoring page file usage in %. written by latheefp@gmail.com
while true
do
used=`swap -s|awk {'print $9'}|cut -dk -f1`
#echo "Used is :`expr $used / 1024`MB"
avail=`swap -s|awk {'print $11'}|cut -dk -f1`
#echo "Available is :`expr $avail / 1024`MB"
total=`expr $used + $avail`
#echo "Total is :`expr $total / 1024`MB"
percused=`expr $used \* 100`
percent=`expr $percused / $total`
#echo "Percentage of page file usage is :$percent% "
clear
echo "Used Available Total %Used"
echo "`expr $used / 1024`MB `expr $avail / 1024`MB `expr $total / 1024`MB $percent%"
sleep 5
done
No comments:
Post a Comment