Wednesday, December 17, 2014

AIX DAILY MONITORING , SCRIPT TO MONITOR AIX SERVERS

ALL DOCUMENT ARE PROPERTY OF SHIVAKANT , DO NOT COPY IBM , AIX , HACMP , ARE REGISTERED TRADE MARK OF IBM, NETAPP IS REGISTERED TRADEMARK OF NETAPP 
http://aix-administration.blogspot.com/p/index-of-posts-available-in-this-blog.html

HI Friends recently i created a script for a client of ours in a hurry and it seems to me that it is quite good i am providing it for you , paste it in a file , provide +x permission and run see what it does for you , it does not harms any thing in any way be assured .

 
clear
echo " "

echo " "
echo "                        TODAYS ERRPT OUTPUT                "
echo " "
echo " "
echo " "
errpt -s $(date +"%m%d0000%y")
           
echo "                         MEMORY STATUS                    "
 svmon -G|grep memory|read mem siz inu  fr pi vir mm
tot=$(( $siz * 4 /1024/1024 ))
used=$(( $inu * 4 /1024 ))
free=$(( $fr * 4 /1024 ))
echo " "
echo " "
echo "TOTAL                 USED                    FREE"
echo "$tot GB                $used MB                $free MB"

echo " "

echo " "   

echo "                        PAGING STATUS                     "

echo " "
lsps -a

echo " "

echo " "
lsps -a |grep -v Page|read Page Physical Volume Size Used Active Auto Type Chksum
if [ $Used -gt 5 ]
then
echo "            YOUR PAGING SPACE UTILIZATION IS ABOVE NORMAL"

echo "            YOUR PAGING SPACE UTILIZATION IS ABOVE NORMAL"

echo "            YOUR PAGING SPACE UTILIZATION IS ABOVE NORMAL"

echo "            YOUR PAGING SPACE UTILIZATION IS ABOVE NORMAL"
else
echo "            YOUR PAGING SPACE UTILIZATION IS $(lsps -s |grep -v Total|awk '{print $2}') % "
fi


echo " "
echo " "
echo " "
echo "                        FILE SYSTEM UTILIZATION                     "

echo " "

echo " "
echo "             BELOW ARE FILE SYSTEM THAT ARE UTILIZING MORE THAN 90%         "

 df -gt |grep -v Filesystem| awk '{ if ($5> 90) {print "FILE SYSTEM UTILIZATION OF" "  "$6" " "IS" "  "$5}}'

echo " "
echo " "
echo " "

echo "                        CPU UTILIZATION STATUS                     "

echo " "

echo " "

sar 2 5 |grep Average |read av u sy wi id ph en

val=$((  $u + $sy ))
if [ $val -gt 90 ]
then
echo "                YOUR CPU UTILIZATION IS ABOVE NORMAL"

echo "                YOUR CPU UTILIZATION IS ABOVE NORMAL"

echo "                YOUR CPU UTILIZATION IS ABOVE NORMAL"

echo "                YOUR CPU UTILIZATION IS ABOVE NORMAL"
else

echo "                YOUR CPU UTILIZATION IS  = $val % "


fi





Wednesday, August 6, 2014

SCRIPT TO GET ALL WWPN INFORMATION IN RHEL

ALL DOCUMENT ARE PROPERTY OF SHIVAKANT , DO NOT COPY IBM , AIX , HACMP , ARE REGISTERED TRADE MARK OF IBM, NETAPP IS REGISTERED TRADEMARK OF NETAPP
http://aix-administration.blogspot.com/p/index-of-posts-available-in-this-blog.html
 


 
for x in $(ls /sys/class/fc_host)
 do
 echo $x
 cat /sys/class/fc_host/$x/port_name
done

host5
0x100000053326b994
host6
0x100000053326b995