Определение и получение данных о SFP/SFP+ модулях с помощью командной строки (cli) гипервизоров (ALL Hyper-V Versions, ALL ESXI Versions, ALL AHV Versions)
AHVethtool -m <interfaceX>Example usage and output from an Arista Twinax (1 x 40g -> 4 x 10g) breakout copper SFP+:
(where "ethX" is the specific NIC you want to poll, such as "eth2")
[root@AHV ~]# ethtool -m ethX
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x21 (Copper pigtail)
Transceiver codes : 0x01 0x00 0x00 0x00 0x00 0x04 0x80 0x00
Transceiver type : Infiniband: 1X Copper Passive
Transceiver type : Passive Cable
Transceiver type : FC: Twin Axial Pair (TW)
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 0km
Length (SMF) : 0m
Length (50um) : 0m
Length (62.5um) : 0m
Length (Copper) : 5m
Length (OM3) : 0m
Passive Cu cmplnce. : 0x00 (unspecified) [SFF-8472 rev10.4 only]
Vendor name : Arista Networks
Vendor OUI : 00:1c:73
Vendor PN : CAB-Q-S-5M
Vendor rev : 20
Option values : 0x00 0x00
BR margin, max : 0%
BR margin, min : 0%
Vendor SN : xxxxxxxxxx
Date code : 180907
Vmware ESXi
Unfortunately, there does not appear a way to poll the SFP transceiver module from an ESXi host.
Whilst "ethtool" exists, it is limited and does not allow the "-m" switch to poll the SFP 'module eeprom'.
Many similar functions exist in "esxcli", such as "esxcli hardware pci list" and "esxcli network nic get -n vmnicX", however, relevant to the SFP they only provide Layer 1 speed and connectivity status but no transceiver-specific data.
XenServer
[root@XenServer ~]# ethtool -m ethXExample usage and output from an Arista Twinax (1 x 40g -> 4 x 10g) breakout copper SFP+:
(where "ethX" is the specific NIC you want to poll, such as "eth2")
[root@XenServer ~]# ethtool -m ethX
Identifier : 0x03 (SFP)
Extended identifier : 0x04 (GBIC/SFP defined by 2-wire interface ID)
Connector : 0x21 (Copper pigtail)
Transceiver codes : 0x01 0x00 0x00 0x00 0x00 0x04 0x80 0x00
Transceiver type : Infiniband: 1X Copper Passive
Transceiver type : FC: Copper Passive
Transceiver type : FC: Twin Axial Pair (TW)
Encoding : 0x06 (64B/66B)
BR, Nominal : 10300MBd
Rate identifier : 0x00 (unspecified)
Length (SMF,km) : 0km
Length (SMF) : 0m
Length (50um) : 0m
Length (62.5um) : 0m
Length (Copper) : 1m
Length (OM3) : 0m
Passive Cu cmplnce. : 0x00 (unspecified) [SFF-8472 rev10.4 only]
Vendor name : Arista Networks
Vendor OUI : 00:1c:73
Vendor PN : CAB-Q-S-1M
Vendor rev : 20
Hyper-V
Unfortunately, there does not appear to be a Powershell or cmd utility available to poll and expose SFP+ vendor make/model/serial details. In certain circumstances, some SFP+ manufacturers may offer a 3rd party utility to install on the host and run to gather this info. Please reach out to the SFP+ manufacturer for further guidance if required.
Note that for ESXi and Hyper-V, if using 'Twinax' SFP+ modules, then consider polling for the transceiver details from the network switch instead. Twinax cables are typically hard-wired with the same transceiver at each end by the manufacturer, so the network switch transceiver may shed light by assumption on the host-side module also. Consider using host NIC MAC addresses against the switch MACC address table to confirm which switch port to interrogate.
Even for fiber optic connections, the switch-side SFP module metrics may also provide certain useful signal health and connection speed/status/type information, stopping short though of confirming the vendor/model module at the remote host-end.