/go-ethtool

Wrapper for Kernel's ethtool ioctls written in #GoLang. Implements SFF8472, SFF8436 and SFF8636 for parsing SFP(+), QSFP, QSFP28, etc. transceiver's EEPROM data.

Primary LanguageGoGNU General Public License v3.0GPL-3.0

golang-ethtool

Provides packages for interacting with the Linux kernel's ethtool ioctls. Supports parsing transceiver's EEPROM data according to the standards:

Overview

  • eeprom/eeprom.go provides a unified interface for different EEPROM types.
  • eeprom/sff8472/eeprom.go provides the SFF-8472 implementation
  • eeprom/sff8636/eeprom.go provides the SFF-8636 implementation, which is also used for decoding SFF8463 eeproms.

Usage

Included basic example

A minimal example is included:

go get ./...
cd example
go build

It allows for parsing the EEPROM contents of a given and dumps them to STDOUT: ./example --interface swp42

Transceiver exporter

Prometheus exporter based on this package.

Authors

  • @fluepke
  • @vidister