====== AIX fiber channel SCSI / NVMe ======
http://gibsonnet.net/blog/cgaix/html/vfcstat_blog.html
List disks paths
root@nimprod /etc/objrepos# lspath -F"name:connection:parent:path_status:status" | sort
hdisk0:500507777087cca4,0:fscsi0:Available:Enabled
hdisk0:500507777087cca4,0:fscsi2:Available:Enabled
hdisk0:500507777087ccad,0:fscsi0:Available:Enabled
hdisk0:500507777087ccad,0:fscsi2:Available:Enabled
hdisk0:500507777088cca4,0:fscsi1:Available:Enabled
hdisk0:500507777088cca4,0:fscsi3:Available:Enabled
hdisk0:500507777088ccad,0:fscsi1:Available:Enabled
hdisk0:500507777088ccad,0:fscsi3:Available:Enabled
hdisk1:500507777087cd5d,3000000000000:fscsi0:Available:Enabled
hdisk1:500507777087cd5d,3000000000000:fscsi2:Available:Enabled
hdisk1:500507777087cd5f,3000000000000:fscsi0:Available:Enabled
===== Enhancements to fcstat =====
Enhancements on AIX 7.3
Statistics
# fcstat -t 1 -p scsi fcs0
FIBRE CHANNEL STATISTICS REPORT: fcs0
Device Type: Virtual Fibre Channel Client Adapter (adapter/vdevice/IBM,vfc-client)
TP Read Reqs(K) Write Reqs(K) Read (GB) Write (GB)
===== ================= ================= =========== ===========
SCSI 9 2314 0 203
SCSI 9 2315 0 203
SCSI 9 2316 0 203
SCSI 9 2317 0 203
Statistics on SFP modules
# fcstat -e fcs0
FIBRE CHANNEL STATISTICS REPORT: fcs0
Device Type: PCIe3 2-Port 32Gb FC Adapter (df1000e314101506) (adapter/pciex/df1000e31410150)
...etc...
FC SFP Information
Vendor Name: AVAGO
Vendor OUI: 0000176a
Vendor PN: AFBR-57G5MZ-ELX
Temperature: 42.371 C [Range -128 C - +128 C]
Voltage: 3.331 V [Range 0 V - +6.55 V]
TX Bias: 5.466 mA [Range 0 mA - 131 mA]
TX Power: -1.4837 dBm [Range -40 dBm - +8.2 dBm]
0.7106 mW [Range 0 mW - 6.5535 mW]
RX Power: -3.6866 dBm [Range -40 dBm - +8.2 dBm]
0.4279 mW [Range 0 mW - 6.5535 mW ]
Opens the device in diagnostic mode by using the -d flag
# fcstat -d fcs0
FIBRE CHANNEL STATISTICS REPORT: fcs0
Device Type: 8Gb PCI Express Dual Port FC Adapter (df1000f114108a03) (adapter/pciex/df1000f114108a0)
Serial Number: 1A202029F7
Option ROM Version: 0278213D
ZA: U2D2.10X13
World Wide Node Name: 0x20000000C9D55D1E
World Wide Port Name: 0x10000000C9D55D1E
FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 8 GBIT
Port Speed (running): 0 GBIT
Port FC ID: 0x000000
Port Type: UNKNOWN
Attention Type: Link Down
Topology: UNKNOWN
Seconds Since Last Reset: 0
Transmit Statistics Receive Statistics
------------------- ------------------
Frames: 0 0
Words: 0 0
LIP Count: 0
NOS Count: 0
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 4
Loss of Sync Count: 4
Loss of Signal: 5
===== vfcstat command =====
AIX 7.3
List all the VFC adapters on your AIX system.
# vfcstat -l
List all the functions available for the given VFC adapter:
# vfcstat -d fcs0
To display error counts for a given VFC adapter.
# vfcstat -d fcs0 -e
Use the -s flag to display various statistics for a given VFC adapter. This is same as reading the proc file /proc/sys/adapter/fc/fcs0/stats. We’ve included the –F option as it displays formatted statistic output (which is easier to read!).
# vfcstat -d fcs0 -s -F
To display tunables of a given VFC adapter, use the -d and -f tunables options. This is same as reading proc file /proc/sys/adapter/fc/fcs0/tunables.
# vfcstat -d fcs0 -f tunables
To display VIOS host information of a given VFC adapter, use the -f hostinfo option. This is same as reading the proc file /proc/sys/adapter/fc/fcs0/hostinfo.
# vfcstat -d fcs0 -f hostinfo
To display WWPN information of a given VFC adapter, use the -f wwpn option. This is same as reading the proc file /proc/sys/adapter/fc/fcs0/wwpn.
# vfcstat -d fcs0 -f wwpn
0xc852100000000011
To reset all fields in the stats function for a given VFC adapter.
# vfcstat -d fcs0 -s –z
To reset all error counts for a given VFC adapter.
# vfcstat -d fcs0 -e –z