I’ve been having problems with a flaky DSL connection from CenturyLink. My modem would frequently ‘retrain,’ that is, disconnect and reconnect the DSL session. This is rather annoying, and since I use VoIP for most phone calls when I’m at home, very irritating.
I wanted a method to log the modem’s statistics and see if I could find any correlation with the drops. One of the unfortunate realities with consumer level equipment is the lack of standard monitoring capabilities. Most enterprise level equipment support SNMP, which allows various software programs to request information.
Find it on github. A couple notes, this is written for my modem, a Zyxel Q100. Additionally, it was written for the currently installed version of the firmware, QZQ002-4.2.001.1-Q100. If you have a different modem, or different firmware version, feel free to modify it. I’d be happy if you submitted pull requests with scripts for the different modems as well.
You can use this script as a data input method for Cacti and get pretty graphs like this: