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:
- get the two mentioned files above
- my script from here: http://pastebin.com/TPyDs5MP
- install package python-smbus
- run my script