Emulex HBA Management information available through sysfs

Emulex HBA Management information available through sysfs

The Emulex Linux lpfc driver provides a rich set of information about the SCSI and Fibre Channel environment, including information about SCSI hosts, SCSI devices, Fibre Channel N_Portsand the Fibre Channel transport. This is all accomplished using the Linux sysfs interface, which enables logging of FC events (in the Emulex implementation, sysfs logging can be turned on or modified at run time without reboot or driver relead). The interface is scriptable like the /proc/scsi interface, but contains much more information as compared to /proc/scsi interface. The following are examples of the information presented using /sysfs/.

SCSI host information
/sys/class/scsi_host/host3/board_mode ==> online
/sys/class/scsi_host/host3/board_online ==> 1
/sys/class/scsi_host/host3/cmd_per_lun ==> 3
/sys/class/scsi_host/host3/ctlreg ==> (Sysfs file used for reading HBA Config registers.)
/sys/class/scsi_host/host3/fwrev ==> 1.91A5 (H2F1.91A5)
/sys/class/scsi_host/host3/hdw ==> 2003806d
/sys/class/scsi_host/host3/host_busy ==> 0
/sys/class/scsi_host/host3/info ==> Emulex LP9802 2Gb PCI-X Fibre Channel Adapter on PCI bus 02 device 28 irq 201
/sys/class/scsi_host/host3/issue_reset ==> (File used for reseting HBA)
/sys/class/scsi_host/host3/lpfc_ack0 ==> 0
/sys/class/scsi_host/host3/lpfc_cr_count ==> 1
/sys/class/scsi_host/host3/lpfc_cr_delay ==> 0
/sys/class/scsi_host/host3/lpfc_drvr_version ==> Emulex LightPulse Fibre Channel SCSI driver 8.1.6.5
/sys/class/scsi_host/host3/lpfc_fcp_class ==> 3
/sys/class/scsi_host/host3/lpfc_fdmi_on ==> 0
/sys/class/scsi_host/host3/lpfc_hba_queue_depth ==> 1024
/sys/class/scsi_host/host3/lpfc_link_speed ==> 0
/sys/class/scsi_host/host3/lpfc_log_verbose ==> 0x0
/sys/class/scsi_host/host3/lpfc_lun_queue_depth ==> 30
/sys/class/scsi_host/host3/lpfc_max_luns ==> 255
/sys/class/scsi_host/host3/lpfc_multi_ring_support ==> 1
/sys/class/scsi_host/host3/lpfc_nodev_tmo ==> 30
/sys/class/scsi_host/host3/lpfc_poll ==> 0x0
/sys/class/scsi_host/host3/lpfc_poll_tmo ==> 10
/sys/class/scsi_host/host3/lpfc_scan_down ==> 1
/sys/class/scsi_host/host3/lpfc_topology ==> 0
/sys/class/scsi_host/host3/lpfc_use_adisc ==> 0
/sys/class/scsi_host/host3/management_version ==> 0.0.0
/sys/class/scsi_host/host3/mbox ==> (File used for sending HBA management mailbox commands)
/sys/class/scsi_host/host3/modeldesc ==> Emulex LP9802 2Gb PCI-X Fibre Channel Adapter
/sys/class/scsi_host/host3/modelname ==> LP9802
/sys/class/scsi_host/host3/nport_evt_cnt ==> 5
/sys/class/scsi_host/host3/num_discovered_ports ==> 3
/sys/class/scsi_host/host3/scan ==> (File used for scanning new storage)
/sys/class/scsi_host/host3/serialnum ==> MM41937498
/sys/class/scsi_host/host3/sg_tablesize ==> 64
/sys/class/scsi_host/host3/state ==> Link Up - Ready: Fabric
/sys/class/scsi_host/host3/unchecked_isa_dma ==> 0
/sys/class/scsi_host/host3/unique_id ==> 1
/sys/class/fc_host/host3/active_fc4s ==> 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
/sys/class/fc_host/host3/fabric_name ==> 0x1000006069519369
/sys/class/fc_host/host3/issue_lip ==> (File used for resetting link)
/sys/class/fc_host/host3/maxframe_size ==> 2048 bytes
/sys/class/fc_host/host3/node_name ==> 0x20000000c93dc171
/sys/class/fc_host/host3/port_id ==> 0x010400
/sys/class/fc_host/host3/port_name ==> 0x10000000c93dc171
/sys/class/fc_host/host3/port_state ==> Online
/sys/class/fc_host/host3/port_type ==> NPort (fabric via point-to-point)
/sys/class/fc_host/host3/speed ==> 2 Gbit
/sys/class/fc_host/host3/supported_classes ==> Class 3
/sys/class/fc_host/host3/supported_fc4s ==> 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
/sys/class/fc_host/host3/supported_speeds ==> 1 Gbit, 2 Gbit
/sys/class/fc_host/host3/symbolic_name ==> Emulex LP9802 FV1.91A5 DV8.1.6.5
/sys/class/fc_host/host3/tgtid_bind_type ==> wwpn (World Wide Port Name)


Fibre channel statistics
/sys/class/fc_host/host3/statistics/dumped_frames ==> 0xffffffffffffffff
/sys/class/fc_host/host3/statistics/error_frames ==> 0x0
/sys/class/fc_host/host3/statistics/fcp_control_requests ==> 0x0
/sys/class/fc_host/host3/statistics/fcp_input_megabytes ==> 0x0
/sys/class/fc_host/host3/statistics/fcp_input_requests ==> 0x0
/sys/class/fc_host/host3/statistics/fcp_output_megabytes ==> 0x0
/sys/class/fc_host/host3/statistics/fcp_output_requests ==> 0x0
/sys/class/fc_host/host3/statistics/invalid_crc_count ==> 0x0
/sys/class/fc_host/host3/statistics/invalid_tx_word_count ==> 0xc
/sys/class/fc_host/host3/statistics/link_failure_count ==> 0x0
/sys/class/fc_host/host3/statistics/lip_count ==> 0x0
/sys/class/fc_host/host3/statistics/loss_of_signal_count ==> 0x0
/sys/class/fc_host/host3/statistics/loss_of_sync_count ==> 0x7
/sys/class/fc_host/host3/statistics/nos_count ==> 0x0
/sys/class/fc_host/host3/statistics/prim_seq_protocol_err_count ==> 0x0
/sys/class/fc_host/host3/statistics/reset_statistics ==>
/sys/class/fc_host/host3/statistics/rx_frames ==> 0x191
/sys/class/fc_host/host3/statistics/rx_words ==> 0x22900
/sys/class/fc_host/host3/statistics/seconds_since_last_reset ==> 0x73d
/sys/class/fc_host/host3/statistics/tx_frames ==> 0x4bf
/sys/class/fc_host/host3/statistics/tx_words ==> 0x4f00


Information about all Fibe Channel NPorts (initiator + target) visible to the HBA
/sys/class/fc_remote_ports/rport-3:0-0/dev_loss_tmo ==> 35
/sys/class/fc_remote_ports/rport-3:0-0/maxframe_size ==> 2112 bytes
/sys/class/fc_remote_ports/rport-3:0-0/node_name ==> 0x1000006069519369
/sys/class/fc_remote_ports/rport-3:0-0/port_id ==> 0xfffffe
/sys/class/fc_remote_ports/rport-3:0-0/port_name ==> 0x2004006069519369
/sys/class/fc_remote_ports/rport-3:0-0/port_state ==> Online
/sys/class/fc_remote_ports/rport-3:0-0/roles ==> Fabric Port
/sys/class/fc_remote_ports/rport-3:0-0/scsi_target_id ==> -1
/sys/class/fc_remote_ports/rport-3:0-0/supported_classes ==> Class 2, Class 3
/sys/class/fc_remote_ports/rport-3:0-1/dev_loss_tmo ==> 35
/sys/class/fc_remote_ports/rport-3:0-1/maxframe_size ==> 2048 bytes
/sys/class/fc_remote_ports/rport-3:0-1/node_name ==> 0x1000006069519369
/sys/class/fc_remote_ports/rport-3:0-1/port_id ==> 0xfffffc
/sys/class/fc_remote_ports/rport-3:0-1/port_name ==> 0x20fc006069519369
/sys/class/fc_remote_ports/rport-3:0-1/port_state ==> Online
/sys/class/fc_remote_ports/rport-3:0-1/roles ==> Directory Server
/sys/class/fc_remote_ports/rport-3:0-1/scsi_target_id ==> -1
/sys/class/fc_remote_ports/rport-3:0-1/supported_classes ==> Class 2, Class 3
/sys/class/fc_remote_ports/rport-3:0-2/dev_loss_tmo ==> 35
/sys/class/fc_remote_ports/rport-3:0-2/maxframe_size ==> 2048 bytes
/sys/class/fc_remote_ports/rport-3:0-2/node_name ==> 0x2000000c5005dfae
/sys/class/fc_remote_ports/rport-3:0-2/port_id ==> 0x010ee1
/sys/class/fc_remote_ports/rport-3:0-2/port_name ==> 0x2100000c5005dfae
/sys/class/fc_remote_ports/rport-3:0-2/port_state ==> Online
/sys/class/fc_remote_ports/rport-3:0-2/roles ==> FCP Target
/sys/class/fc_remote_ports/rport-3:0-2/scsi_target_id ==> 0
/sys/class/fc_remote_ports/rport-3:0-2/supported_classes ==> Class 3

Information about targets visible to the HBA
/sys/class/fc_transport/target3:0:0/node_name ==> 0x2000000c5005dfae
/sys/class/fc_transport/target3:0:0/port_id ==> 0x010ee1
/sys/class/fc_transport/target3:0:0/port_name ==> 0x2100000c5005dfae

Information about SCSI devices visible to the HBA
/sys/class/scsi_device/3:0:0:0/device/delete ==> (File used for deleteing a lun from SCSI database.)
/sys/class/scsi_device/3:0:0:0/device/device_blocked ==> 0
/sys/class/scsi_device/3:0:0:0/device/iocounterbits ==> 32
/sys/class/scsi_device/3:0:0:0/device/iodone_cnt ==> 0x4a
/sys/class/scsi_device/3:0:0:0/device/ioerr_cnt ==> 0x1
/sys/class/scsi_device/3:0:0:0/device/iorequest_cnt ==> 0x4a
/sys/class/scsi_device/3:0:0:0/device/model ==> ST318453FC
/sys/class/scsi_device/3:0:0:0/device/queue_depth ==> 30
/sys/class/scsi_device/3:0:0:0/device/queue_type ==> simple
/sys/class/scsi_device/3:0:0:0/device/rescan ==> (File used for rescanning the storage)
/sys/class/scsi_device/3:0:0:0/device/rev ==> 0005
/sys/class/scsi_device/3:0:0:0/device/scsi_level ==> 4
/sys/class/scsi_device/3:0:0:0/device/state ==> running
/sys/class/scsi_device/3:0:0:0/device/timeout ==> 60
/sys/class/scsi_device/3:0:0:0/device/type ==> 0
/sys/class/scsi_device/3:0:0:0/device/vendor ==> SEAGATE
/sys/class/scsi_device/3:0:0:0/device/block:sdc/dev ==> 8:32
/sys/class/scsi_device/3:0:0:0/device/block:sdc/range ==> 16
/sys/class/scsi_device/3:0:0:0/device/block:sdc/removable ==> 0
/sys/class/scsi_device/3:0:0:0/device/block:sdc/size ==> 35843686
/sys/class/scsi_device/3:0:0:0/device/block:sdc/stat ==> 54 446 1004 136 0 0 0 0 0 104 136
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/max_hw_sectors_kb ==> 32767
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/max_sectors_kb ==> 512
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/nr_requests ==> 128
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/read_ahead_kb ==> 512
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/scheduler ==> noop anticipatory deadline [cfq]
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/back_seek_max ==> 16384
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/back_seek_penalty ==> 2
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/fifo_expire_async ==> 248
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/fifo_expire_sync ==> 124
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/quantum ==> 4
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/queued ==> 8
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/slice_async ==> 40
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/slice_async_rq ==> 2
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/slice_idle ==> 8
/sys/class/scsi_device/3:0:0:0/device/block:sdc/queue/iosched/slice_sync ==> 100
/sys/class/scsi_device/3:0:0:0/device/generic/dev ==> 21:3
/sys/class/scsi_device/3:0:0:0/device/scsi_generic:sg3 -> ../../../../../../../../class/scsi_generic/sg3

 

For more information download the complete Emulex whitepaper here