SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

CABLE MODEM STATUS

Modem.pl is a small script that scrapes the web interface of a Motorola SURFboard cable modem for various status conditions like signal strength and signal to noise. The results are sent to STDOUT where they can be easily piped into a log file. The modem values are also checked for reasonable operating ranges. If the modem values are outside of reasonable operating ranges, results are also sent to STDERR. When run from a cron job, modem.pl can be used to monitor the condition of the cable service and notify someone before conditions cause service interruptions.

FEATURES

  1. Captures operating conditions of a Motorola SURFboard cable modem.
  2. Runs interactively or from a scheduled job (cron)
  3. Output is formatted with a standard log time stamp when scheduled.
  4. Checks modem values for reasonable operating ranges.
  5. Errors and warnings are duplicated to STDERR.

REQUIREMENTS

Perl 5.005 or above

Time::Local
LWP::Simple

INSTALL MODEM

The latest released or current version is available at http://www.littlefish.ca/projects/modem

  1. copy the modem-X.XX.tgz file to a local directory and unpack the archive.

for example:

download to ~/modem-X.XX.tgz

cd ~/
tar -zxvpf modem-X.XX.tgz

2. copy modem.pl to /usr/local/sbin.

cp ~/modem.pl /usr/local/sbin/modem.pl

3. That's it! You're done!

There are no command options. Simply run modem.pl to get the current status of your Motorola SURFboard cable modem.

SETUP CRON TO CHECK THE MODEM AT REGULAR INTERVALS

Modem.pl can be setup in crond to create regular status log entries. This can be very helpful troubleshooting intermittent cable problems. The sample.cron file will run modem.pl every 5 minutes, sending the results to /var/log/modem.log.

  1. copy the sample.cron to /etc/cron.d

cp ~/sample.cron /etc/cron.d/modem

2. restart the crond service (this step may be optional)

On most (all?) systems the /etc/cron.d directory is not normally checked for changes by the crond service. If this applies to your system then you will have to restart the crond service.

On RedHat systems you would use the service command:

service crond restart

CABLE MODEMS

This script was developed and tested on a Motorla SURFboard cable modem. (Model: SB5101).

It may work on other Motorla modems, but likely will not. If you have a different cable modem that works, or you would like to have work, please let me know.

02/17/2007

projects.AT.littlefish.ca


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.