intelsdi-x / snap-plugin-collector-ethtool

Collects ethtool interface stats & registry dump
http://snap-telemetry.io/
Apache License 2.0
0 stars 13 forks source link

Capture EEPROM from plugable modules #5

Closed dorkmatt closed 8 years ago

dorkmatt commented 8 years ago

Ethtool can expose pluggable optics (SFP & QSFP) information that has useful metrics, such as receive signal strength. A few drivers such as IXGPE support this, the ioctl call is ETHTOOL_GMODULEINFO or ETHTOOL_GMODULEEEPROM.

% sudo ethtool -m eth1 
    Identifier                                : 0x03 (SFP)
    Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
    Connector                                 : 0x07 (LC)
    Transceiver codes                         : 0x20 0x30 0x00 0x00 0x12 0x00 0x01 0xc0
    Transceiver type                          : 10G Ethernet: 10G Base-LR
    Transceiver type                          : SONET: OC-192, short reach
    Transceiver type                          : SONET: SONET reach specifier bit 1
    Transceiver type                          : FC: long distance (L)
    Transceiver type                          : FC: Longwave laser (LC)
    Transceiver type                          : FC: Single Mode (SM)
    Transceiver type                          : FC: 1200 MBytes/sec
    Transceiver type                          : FC: 800 MBytes/sec
    Encoding                                  : 0x06 (64B/66B)
    BR, Nominal                               : 10300MBd
    Rate identifier                           : 0x00 (unspecified)
    Length (SMF,km)                           : 10km
    Length (SMF)                              : 10000m
    Length (50um)                             : 0m
    Length (62.5um)                           : 0m
    Length (Copper)                           : 0m
    Length (OM3)                              : 0m
    Laser wavelength                          : 1310nm
    Vendor name                               : FINISAR CORP.   
    Vendor OUI                                : 00:90:65
    Vendor PN                                 : FTLX1472M3BCL   
    Vendor rev                                : A   
    Optical diagnostics support               : Yes
    Laser bias current                        : 17.460 mA
    Laser output power                        : 0.5044 mW / -2.97 dBm
    Receiver signal average optical power     : 0.4909 mW / -3.09 dBm
    Module temperature                        : 34.10 degrees C / 93.38 degrees F
    Module voltage                            : 3.2877 V
    Alarm/warning flags implemented           : Yes
    Laser bias current high alarm             : Off
    Laser bias current low alarm              : Off
    Laser bias current high warning           : Off
    Laser bias current low warning            : Off
    Laser output power high alarm             : Off
    Laser output power low alarm              : Off
    Laser output power high warning           : Off
    Laser output power low warning            : Off
    Module temperature high alarm             : Off
    Module temperature low alarm              : Off
    Module temperature high warning           : Off
    Module temperature low warning            : Off
    Module voltage high alarm                 : Off
    Module voltage low alarm                  : Off
    Module voltage high warning               : Off
    Module voltage low warning                : Off
    Laser rx power high alarm                 : Off
    Laser rx power low alarm                  : Off
    Laser rx power high warning               : Off
    Laser rx power low warning                : Off
    Laser bias current high alarm threshold   : 100.000 mA
    Laser bias current low alarm threshold    : 1.000 mA
    Laser bias current high warning threshold : 80.000 mA
    Laser bias current low warning threshold  : 10.000 mA
    Laser output power high alarm threshold   : 1.4125 mW / 1.50 dBm
    Laser output power low alarm threshold    : 0.1585 mW / -8.00 dBm
    Laser output power high warning threshold : 1.2589 mW / 1.00 dBm
    Laser output power low warning threshold  : 0.1995 mW / -7.00 dBm
    Module temperature high alarm threshold   : 80.00 degrees C / 176.00 degrees F
    Module temperature low alarm threshold    : -10.00 degrees C / 14.00 degrees F
    Module temperature high warning threshold : 75.00 degrees C / 167.00 degrees F
    Module temperature low warning threshold  : -5.00 degrees C / 23.00 degrees F
    Module voltage high alarm threshold       : 3.6000 V
    Module voltage low alarm threshold        : 3.1000 V
    Module voltage high warning threshold     : 3.4650 V
    Module voltage low warning threshold      : 3.1350 V
    Laser rx power high alarm threshold       : 1.9953 mW / 3.00 dBm
    Laser rx power low alarm threshold        : 0.0200 mW / -16.99 dBm
    Laser rx power high warning threshold     : 1.1220 mW / 0.50 dBm
    Laser rx power low warning threshold      : 0.0363 mW / -14.40 dBm
IzabellaRaulin commented 8 years ago

Thank You for that suggestion. I fully agree that such information as receive signal strength should be exposed. We will keep this on the track.

andrzej-k commented 8 years ago

Hi, thanks @dorkmatt for reporting this and @IzabellaRaulin for delivering solution (#6). Closing this issue now.