Ce petit script permet sous RedHat d'afficher les informations concernant les cartes FC.
for port in /sys/class/fc_host/host*
do
NAME=`basename $port`
WWN=`cat $port/node_name|sed 's/0x//;s/../&:/g;s/:$//'`
WWN2=`cat $port/node_name|sed 's/0x//'`
STATE=`cat $port/port_state`
PORT_TYPE=`cat $port/port_type`
echo "$HOSTNAME;$NAME;$WWN2($WWN);$STATE;$PORT_TYPE"
done