How 2 Know
If you can't Google it, You Can Knowing it.

display number of fibre ports and status of each one

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from How 2 Know

Subscribe now to keep reading and get access to the full archive.

Continue reading