You are here

cheet sheet

How to get ALL then FC info you need (and more!)

Here's the cheet sheet to using native FC tools and drivers (tested on rhel5):

pWWN = cat /sys/class/fc_host/host[0-9]/port_name
WWN = cat /sys/class/fc_host/host[0-9]/node_name
online? = cat /sys/class/fc_host/host[0-9]/port_state
Speed = cat /sys/class/fc_host/host[0-9]/speed
HBA overview = cat /sys/class/fc_host/host[0-9]/symbolic_name
/sys/class/fc_host/host[0-9]/device/scsi_host\:host[0-9] is same as /sys/class/scsi_host/host[0-9]
HBA make = cat /sys/class/scsi_host/host[0-9]/model_desc
HBA model = cat /sys/class/scsi_host/host[0-9]/model_name
Firmware rev = cat /sys/class/scsi_host/host[0-9]/fw_version
Driver version = cat /sys/class/scsi_host/host[0-9]/driver_version
rescan scsi bus (use VERY wisely) = echo "- - -" > /sys/class/scsi_host/host[0-9]/scan
issue lip (use even MORE wisely) = echo 1 > /sys/class/fc_host/host[0-9]/issue_lip

It's a good cheet sheet, but you'll need more understanding to make this useful for your troubleshooting. Read on.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer