Redhat

如何查看目前隊列深度值?

  • February 13, 2014

我有一個通過光纖連接到 NetApp SAN 的 OEL 伺服器。如何查看作業系統看到的隊列深度?

輸出 lspci

05:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
05:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
08:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
08:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

輸出lsmod

qla2xxx              1262209  352
scsi_transport_fc      83145  1 qla2xxx
scsi_mod              199641  15 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2,scsi_transport_iscsi2,scsi_dh,sr_mod,sg,qla2xxx,scsi_transport_fc,libata,cciss,sd_mod

ls /sys/class/fc_host/host*

/sys/class/fc_host/host3:
device       issue_lip  port_id    port_state  speed       subsystem          supported_speeds  system_hostname  uevent
fabric_name  node_name  port_name  port_type   statistics  supported_classes  symbolic_name     tgtid_bind_type

/sys/class/fc_host/host4:
device       issue_lip  port_id    port_state  speed       subsystem          supported_speeds  system_hostname  uevent
fabric_name  node_name  port_name  port_type   statistics  supported_classes  symbolic_name     tgtid_bind_type

/sys/class/fc_host/host5:
device       issue_lip  port_id    port_state  speed       subsystem          supported_speeds  system_hostname  uevent
fabric_name  node_name  port_name  port_type   statistics  supported_classes  symbolic_name     tgtid_bind_type

/sys/class/fc_host/host6:
device       issue_lip  port_id    port_state  speed       subsystem          supported_speeds  system_hostname  uevent
fabric_name  node_name  port_name  port_type   statistics  supported_classes  symbolic_name     tgtid_bind_type

在我的 NETAPP 上:

ls /proc/scsi/qla2xxx
1
ls /proc/scsi/qla2xxx/1 | grep -i -A1 -B1 "queue depth"
Total number of interrupts = 30686605
   Device queue depth = 0x20
Number of free request entries = 1842

所以 x20 是十進制的 32,這就是你要找的 #。您可以在此處閱讀有關 NETAPP 的計算:

https://library.netapp.com/ecmdocs/ECMP1196793/html/GUID-A055B184-0876-4376-9C75-35FE8C9BE832.html

編輯:其他一些查看方法: cat /sys/module/qla2xxx/parameters/ql2xmaxqdepth

最簡單的方法是

cat /sys/block/<sdX>/device/queue_depth

引用自:https://serverfault.com/questions/575438