SFP Diagnostic (DDM/DOM)

As “ethtool -m” is not working to read out the diagnostic data from an SFP, I have searched for another solution.

I finally made a small (quick and dirty) python script that reads the eeproms via i2c (bus 5 / addresses 0x50 & 0x51) and parses the data with help of the files sff8472.py and sffbase.py from here: https://github.com/Azure/sonic-utilities/tree/master/dist-packages

If someone wants to try it:

Working perfectly. Thank you

The github link is dead. The files can be found here now: https://github.com/Azure/sonic-utilities/tree/master/sonic_sfp

Have been using the script from SFP Diagnostic (DDM/DOM) for a long time, but it doesn’t work in TurrisOS 6.0, so I quickly hacked it to work with Python 3.

I’ve posted it here in case it’s useful to someone else: https://github.com/fnordpojk/sfpdom