Visualizando WWPN s no Linux

Para visualizar as WWPNs no Linux, fica fácil com o seguinte script:

#!/bin/sh

FC_PATH="/sys/class/fc_host"
 
for fc_adapter in `ls ${FC_PATH}`
do  
    echo "${FC_PATH}/${fc_adapter}:"
    NAME=$(awk '{print $1}' ${FC_PATH}/${fc_adapter}/symbolic_name )
    echo "  $NAME `cat ${FC_PATH}/${fc_adapter}/port_name`"
done

A Saída é consolidada da seguinte forma:


print_wwpns
/sys/class/fc_host/host5: QLE2562 0x21000024ff45afc2 
/sys/class/fc_host/host6: QLE2562 0x21000024ff45afc3

Procurando um pouquinho na net encontrei o estiloso comando que também pode ser usado para recuperar informações do SYSFS.

systool -c fc_host -v
Class = "fc_host"

  Class Device = "host5"
  Class Device path = "/sys/class/fc_host/host5"
    fabric_name         = "0x200a547fee9e5e01"
    issue_lip           = 
    node_name           = "0x20000024ff45afc2"
    port_id             = "0x0a00c0"
    port_name           = "0x21000024ff45afc2"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "QLE2562 FW:v5.06.03 DVR:v8.03.07.09.05.08-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = 

  Class Device = "host6"
  Class Device path = "/sys/class/fc_host/host6"
    fabric_name         = "0x2014547feeba9381"
    issue_lip           = 
    node_name           = "0x20000024ff45afc3"
    port_id             = "0x9700a0"
    port_name           = "0x21000024ff45afc3"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "QLE2562 FW:v5.06.03 DVR:v8.03.07.09.05.08-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = 


Comentários

Postagens mais visitadas