you can use the following script to display the number of fibre ports on your system that you have and also the status of each one, you can use it as a healthy check script :
#!/usr/bin/ksh echo "Total Number of Fibresports = `lsdev |grep -i fcs | wc -l | sed 's/ //g'`" echo "The Following is the Status of each Fibre" for i in `lsdev |grep -i fcs|awk '{ print $1 }' | sed 's/ //g'` do fcstat $i > /dev/null 2>&1 if [ $? -eq 0 ] ;then echo " The Fibre Channel \t $i is Connected" else echo " The Fibre Channel \t $i is Not Connected" fi done
Leave a Reply