Displaying FCP channel and device information

For each online FCP device, there is a number of read-only attributes in sysfs that provide information about the corresponding FCP channel and FCP device.

Before you begin

The FCP device must be online for the FCP channel information to be valid.

About this task

The following tables summarize the relevant attributes.

Table 1. Attributes with FCP channel information
Attribute Explanation
card_version Version number that identifies a particular hardware feature.
hardware_version Number that identifies a hardware version for a particular feature. The initial hardware version of a feature is zero. This version indicator is increased only for hardware modifications of the same feature. Appending hardware_version to card_version results in a hierarchical version indication for a physical adapter.
lic_version Microcode level.
peer_wwnn WWNN of peer for a point-to-point connection.
peer_wwpn WWPN of peer for a point-to-point connection.
peer_d_id Destination ID of the peer for a point-to-point connection.
Table 2. Attributes with FCP device information
Attribute Explanation
in_recovery Shows if the FCP channel is in recovery (0 or 1).

For the attributes availability, cmb_enable, and cutype, see Device attributes. The status attribute is reserved.

Table 3. Relevant transport class attributes, fc_host attributes
Attribute Explanation
maxframe_size Maximum frame size of adapter.
node_name Worldwide node name (WWNN) of adapter.
permanent_port_name WWPN associated with the physical port of the FCP channel.
port_id A unique ID (N_Port_ID) assigned by the fabric. In an NPIV setup, each virtual port is assigned a different port_id.
port_name WWPN associated with the FCP device. If N_Port ID Virtualization is not available, the WWPN of the physical port (see permanent_port_name).
port_type The port type indicates the topology of the port.
serial_number The 32-byte serial number of the adapter hardware that provides the FCP channel.
speed Speed of FC link.
supported_classes Supported FC service class.
symbolic_name The symbolic port name that is registered with the FC name server.
supported_speeds Supported speeds.
tgid_bind_type Target binding type.
Table 4. Relevant transport class attributes, fc_host statistics
Attribute Explanation
reset_statistics Writeable attribute to reset statistic counters.
seconds_since_last_reset Seconds since last reset of statistic counters.
tx_frames Transmitted FC frames.
tx_words Transmitted FC words.
rx_frames Received FC frames.
rx_words Received FC words.
lip_count Number of LIP sequences.
nos_count Number of NOS sequences.
error_frames Number of frames that are received in error.
dumped_frames Number of frames that are lost because of lack of host resources.
link_failure_count Link failure count.
loss_of_sync_count Loss of synchronization count.
loss_of_signal_count Loss of signal count.
prim_seq_protocol_err_count Primitive sequence protocol error count.
invalid_tx_word_count Invalid transmission word count.
invalid_crc_count Invalid CRC count.
fcp_input_requests Number of FCP operations with data input.
fcp_output_requests Number of FCP operations with data output.
fcp_control_requests Number of FCP operations without data movement.
fcp_input_megabytes Megabytes of FCP data input.
fcp_output_megabytes Megabytes of FCP data output.

Procedure

Use the cat command to read an attribute.
  • Issue a command of this form to read an attribute:
    # cat /sys/bus/ccw/drivers/zfcp/<device_bus_id>/<attribute>
    where:
    <device_bus_id>
    specifies an FCP device that corresponds to the FCP channel.
    <attribute>
    is one of the attributes in Table 1 or Table 2.
  • To read attributes of the associated Fibre Channel host use:
    # cat /sys/class/fc_host/<host_name>/<attribute>
    where:
    <host_name>
    is the ID of the Fibre Channel host.
    <attribute>
    is one of the attributes in Table 3.
  • To read statistics attributes of the FCP channel associated with this Fibre Channel host, use:
    # cat /sys/class/fc_host/<host_name>/statistics/<attribute>
    where:
    <host_name>
    is the ID of the Fibre Channel host.
    <attribute>
    is one of the attributes in Table 4.

Examples

  • In this example, information is displayed about an FCP channel that corresponds to an FCP device with bus ID 0.0.3d0c:
    # cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/hardware_version
    0x00000000
    # cat /sys/bus/ccw/drivers/zfcp/0.0.3d0c/lic_version
    0x00009111
  • Alternatively you can use lszfcp to display attributes of an FCP channel:
    # lszfcp -b 0.0.3d0c -a
    0.0.3d0c host0
    Bus = "ccw"
        availability        = "good"
        card_version        = "0x0005"
        cmb_enable          = "0"
        cutype              = "1731/03"
        devtype             = "1732/03"
        failed              = "0"
        hardware_version    = "0x00000000"
        in_recovery         = "0"
        lic_version         = "0x00009111"
        modalias            = "ccw:t1731m03dt1732dm03"
        online              = "1"
        peer_d_id           = "0x000000"
        peer_wwnn           = "0x0000000000000000"
        peer_wwpn           = "0x0000000000000000"
        status              = "0x5400000a"
        uevent              = "DRIVER=zfcp"
    Class = "fc_host"
        active_fc4s = "0x00 0x00 ... 0x00"
        dev_loss_tmo = "60"    
    maxframe_size       = "2112 bytes"
        node_name           = "0x5005076400c89f25"
        permanent_port_name = "0xc05076ffe5005611"
        port_id             = "0x656e00"
        port_name           = "0xc05076ffe5005611"
        port_state          = "Online"
        port_type           = "NPort (fabric via point-to-point)"
        serial_number       = "IBM02000000089F25"
        speed               = "8 Gbit"
        supported_classes   = "Class 2, Class 3"
        supported_fc4s = "0x00 0x00 ... 0x00" 
        supported_speeds    = "1 Gbit, 4 Gbit"
        symbolic_name       = "IBM 2817 020000000EAA14 PCHID: 0391"
        tgtid_bind_type     = "wwpn (World Wide Port Name)"
    Class = "scsi_host"
        active_mode         = "Initiator"
        can_queue           = "4096"
        cmd_per_lun         = "1"
        host_busy           = "0"
        megabytes           = "28 0"
        proc_name           = "zfcp"
        prot_capabilities   = "0"
        prot_guard_type     = "0"
        queue_full          = "0 33333510"
        requests            = "184085 4 302"
        seconds_active      = "143"
        sg_tablesize        = "0"
        state               = "running"
        supported_mode      = "Initiator"
        unchecked_isa_dma   = "0"
        unique_id           = "5906"
        utilization         = "6 0 0"