Linux - How to find fiber channel information on linux server, How to find fiber card links are up or down

How to find fiber channel information on linux server

systool is linux command which is used to view system device information by bus, class, and topology.

Get simple information about the Fibre Channel HBAs in a machine:
 # systool -c fc_host -v

Get verbose information regarding the SCSI adapters present on a system:
 # systool -c scsi_host -v
See what Fibre Channel devices are connected to the Fibre Channel HBA cards:
 # systool -c fc_remote_ports -v -d

Fibre Channel transport information:
 # systool -c fc_transport -v

Get information on SCSI disks connected to a system:
 # systool -c scsi_disk -v

For more disk information including which hosts are connected to which disks:
 # systool -b scsi -v

To view more information about the SCSI map:
 # sg_map -x

To obtain driver information, including version numbers and active parameters:

For emulex server
 # systool -m lpfc -v  

For qlogic server
 # systool -m qla2xxx -v
Sample output:
 # systool -m qla2xxx -v

   Module = \"qla2xxx\"

  Attributes:
    initstate           = \"live\"
    refcnt              = \"6\"
    srcversion          = \"version\"
    version             = \"8.xxxxxxx2\"

  Parameters:
    ql2xallocfwdump     = \"1\"
    ql2xasynclogin      = \"1\"
    ql2xasynctmfenable  = \"0\"
    ql2xdbwr            = \"1\"
    ql2xdontresethba    = \"0\"
    ql2xenabledif       = \"2\"
    ql2xenablehba_err_chk= \"2\"
    ql2xetsenable       = \"0\"
    ql2xextended_error_logging= \"0\"
    ql2xfdmienable      = \"1\"
    ql2xfwloadbin       = \"0\"
    ql2xgffidenable     = \"0\"
    ql2xiidmaenable     = \"1\"
    ql2xloginretrycount = \"0\"
    ql2xlogintimeout    = \"20\"
    ql2xmaxlun          = \"65535\"
    ql2xmaxqdepth       = \"32\"
    ql2xmaxqueues       = \"1\"
    ql2xmdcapmask       = \"31\"
    ql2xmdenable        = \"1\"
    ql2xmultique_tag    = \"0\"
    ql2xplogiabsentdevice= \"0\"
    ql2xqfullrampup     = \"120\"
    ql2xqfulltracking   = \"1\"
    ql2xshiftctondsd    = \"6\"
    ql2xtargetreset     = \"1\"
    qlport_down_retry   = \"0\"

  Sections:
    .altinstr_replacement= \"123456\"
    .altinstructions    = \"123456\"
    .bss                = \"123456\"
    .data               = \"123456\"
    .devinit.text       = \"123456\"
    .exit.text          = \"123456\"
    .gnu.linkonce.this_module= \"123456\"
    .init.text          = \"123456\"
    .note.gnu.build-id  = \"123456\"
    .parainstructions   = \"123456\"
    .rheldata           = \"123456\"

 # lspci | grep -i fibre

Find Port name of fiber channel on linux server
 # cat /sys/class/fc_host/host?/port_name
   
   0x123457891124
   0acv2324544545
   01245369835445
   01254656565665

Find fiber channel state from linux command prompt
 # cat /sys/class/fc_host/host?/port_state

   Online
   Online
   Online
   online

These above commands will be very handy, when you want your server to be attached with storage device or to fectch fiber channel or card information.

The topic on Linux - How to find fiber channel information on linux server is posted by - Guru

Hope you have enjoyed, Linux - How to find fiber channel information on linux serverThanks for your time

Tech Bluff