<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Graphing Motorola Surfboard SB5101 Cable Modem Stats with Cacti</title>
	<atom:link href="http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/feed/" rel="self" type="application/rss+xml" />
	<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/</link>
	<description>My digital diary with topics about family, work, computers, technology, books and whatever else comes to mind</description>
	<pubDate>Thu, 16 Oct 2008 04:42:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: moto</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-377</link>
		<dc:creator>moto</dc:creator>
		<pubDate>Wed, 09 Apr 2008 12:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-377</guid>
		<description>Got motorola SB5101 Surfboard cable modem, it only works with windows. Not working with Macintosh OS. Can anyone help, the installation CD is not recognized by MAC. Please Help.</description>
		<content:encoded><![CDATA[<p>Got motorola SB5101 Surfboard cable modem, it only works with windows. Not working with Macintosh OS. Can anyone help, the installation CD is not recognized by MAC. Please Help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane Walker</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-376</link>
		<dc:creator>Duane Walker</dc:creator>
		<pubDate>Tue, 01 Apr 2008 20:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-376</guid>
		<description>I had to remove the spaces and "\s"s from the regexs to get it to work.  The global substitution removes the spaces from "Signal to Noise Ratio" as well.

I was trying to do something like this for my Sipura VOIP box as well and was going to use HTML::TableExtract but this is simpler and just as effective.


#!/usr/bin/perl
use warnings;
use strict;

use LWP::Simple;

my %data;
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);
my $content = LWP::Simple::get("http://192.168.100.1/signaldata.html") or die "Couldn’t get it!";
$content =~ s/\ &#124;\n//g;
#print $content;

# regex in html source order
if ($content =~ /Frequency(.+?)Hz/) {	$data{DownFreq} = $1; }
if ($content =~ /SignaltoNoiseRatio(.+?)dB/) { $data{DownSNR} = $1; }
if ($content =~ /PowerLevel(.+?)dBmV/) { $data{DownPower} = $1; }
if ($content =~ /Frequency(.+?)Hz/) { $data{UpFreq} = $1; }
if ($content =~ /PowerLevel(.+?)dBmV/) { $data{UpPower} = $1; }

for (@keys) {
print "$_:" . $data{$_} . " ";
}
print "\n";</description>
		<content:encoded><![CDATA[<p>I had to remove the spaces and &#8220;\s&#8221;s from the regexs to get it to work.  The global substitution removes the spaces from &#8220;Signal to Noise Ratio&#8221; as well.</p>
<p>I was trying to do something like this for my Sipura VOIP box as well and was going to use HTML::TableExtract but this is simpler and just as effective.</p>
<p>#!/usr/bin/perl<br />
use warnings;<br />
use strict;</p>
<p>use LWP::Simple;</p>
<p>my %data;<br />
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);<br />
my $content = LWP::Simple::get(&#8221;http://192.168.100.1/signaldata.html&#8221;) or die &#8220;Couldn’t get it!&#8221;;<br />
$content =~ s/\ |\n//g;<br />
#print $content;</p>
<p># regex in html source order<br />
if ($content =~ /Frequency(.+?)Hz/) {	$data{DownFreq} = $1; }<br />
if ($content =~ /SignaltoNoiseRatio(.+?)dB/) { $data{DownSNR} = $1; }<br />
if ($content =~ /PowerLevel(.+?)dBmV/) { $data{DownPower} = $1; }<br />
if ($content =~ /Frequency(.+?)Hz/) { $data{UpFreq} = $1; }<br />
if ($content =~ /PowerLevel(.+?)dBmV/) { $data{UpPower} = $1; }</p>
<p>for (@keys) {<br />
print &#8220;$_:&#8221; . $data{$_} . &#8221; &#8220;;<br />
}<br />
print &#8220;\n&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-379</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Thu, 13 Mar 2008 03:17:27 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-379</guid>
		<description>Another try.  Wordpress is stripping the regex's that contain html.

b#!/usr/bin/perl
#use warnings;
#use strict;

use LWP::Simple;

my %data;
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);
my $content = LWP::Simple::get("http://192.168.100.1/signaldata.html") or die "Couldn't get it!";
$content =~ s/\&#160;&#124;\n//g;
#print $content;

# regex in html source order
if ($content =~ /&#60;TD&#62;Frequency&#60;\/TD&#62;&#60;TD&#62;\s*(.+?) Hz/) { $data{DownFreq} = $1; }
if ($content =~ /&#60;TD&#62;Signal to Noise Ratio&#60;\/TD&#62;&#60;TD&#62;\s*(.+?) dB/) { $data{DownSNR} = $1; }
if ($content =~ /&#60;\/TR&#62;&#60;TD&#62;Power Level&#60;\/TD&#62;&#60;TD&#62;\s*(.+?) dBmV\s*&#60;TABLE/) { $data{DownPower} = $1; }
if ($content =~ /&#60;\/TD&#62;&#60;\/TR&#62;&#60;TR&#62;&#60;TD&#62;Frequency&#60;\/TD&#62;\s*?&#60;TD&#62;\s*(.+?) Hz \s*?/) { $data{UpFreq} = $1; }
if ($content =~ /&#60;TR&#62;&#60;TD&#62;Power Level&#60;\/TD&#62;&#60;TD&#62;(.+?) dBmV\s*/) { $data{UpPower} = $1; }

for (@keys) {
        print "$_:" . $data{$_} . " ";
}
print "\n";</description>
		<content:encoded><![CDATA[<p>Another try.  WordPress is stripping the regex&#8217;s that contain html.</p>
<p>b#!/usr/bin/perl<br />
#use warnings;<br />
#use strict;</p>
<p>use LWP::Simple;</p>
<p>my %data;<br />
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);<br />
my $content = LWP::Simple::get(&#8221;http://192.168.100.1/signaldata.html&#8221;) or die &#8220;Couldn&#8217;t get it!&#8221;;<br />
$content =~ s/\&nbsp;|\n//g;<br />
#print $content;</p>
<p># regex in html source order<br />
if ($content =~ /&lt;TD&gt;Frequency&lt;\/TD&gt;&lt;TD&gt;\s*(.+?) Hz/) { $data{DownFreq} = $1; }<br />
if ($content =~ /&lt;TD&gt;Signal to Noise Ratio&lt;\/TD&gt;&lt;TD&gt;\s*(.+?) dB/) { $data{DownSNR} = $1; }<br />
if ($content =~ /&lt;\/TR&gt;&lt;TD&gt;Power Level&lt;\/TD&gt;&lt;TD&gt;\s*(.+?) dBmV\s*&lt;TABLE/) { $data{DownPower} = $1; }<br />
if ($content =~ /&lt;\/TD&gt;&lt;\/TR&gt;&lt;TR&gt;&lt;TD&gt;Frequency&lt;\/TD&gt;\s*?&lt;TD&gt;\s*(.+?) Hz \s*?/) { $data{UpFreq} = $1; }<br />
if ($content =~ /&lt;TR&gt;&lt;TD&gt;Power Level&lt;\/TD&gt;&lt;TD&gt;(.+?) dBmV\s*/) { $data{UpPower} = $1; }</p>
<p>for (@keys) {<br />
        print &#8220;$_:&#8221; . $data{$_} . &#8221; &#8220;;<br />
}<br />
print &#8220;\n&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-378</link>
		<dc:creator>Rick</dc:creator>
		<pubDate>Thu, 13 Mar 2008 03:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-378</guid>
		<description>Thanks!  Here is the revised script for the 5100.

#!/usr/bin/perl
#use warnings;
#use strict;

use LWP::Simple;

my %data;
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);
my $content = LWP::Simple::get("http://192.168.100.1/signaldata.html") or die "Couldn't get it!";
$content =~ s/\&#160;&#124;\n//g;
#print $content;

# regex in html source order
if ($content =~ /Frequency\s*(.+?) Hz/) { $data{DownFreq} = $1; }
if ($content =~ /Signal to Noise Ratio\s*(.+?) dB/) { $data{DownSNR} = $1; }
if ($content =~ /Power Level\s*(.+?) dBmV\s*Frequency\s*?\s*(.+?) Hz \s*?/) { $data{UpFreq} = $1; }
if ($content =~ /Power Level(.+?) dBmV\s*/) { $data{UpPower} = $1; }

for (@keys) {
        print "$_:" . $data{$_} . " ";
}
print "\n";</description>
		<content:encoded><![CDATA[<p>Thanks!  Here is the revised script for the 5100.</p>
<p>#!/usr/bin/perl<br />
#use warnings;<br />
#use strict;</p>
<p>use LWP::Simple;</p>
<p>my %data;<br />
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);<br />
my $content = LWP::Simple::get(&#8221;http://192.168.100.1/signaldata.html&#8221;) or die &#8220;Couldn&#8217;t get it!&#8221;;<br />
$content =~ s/\&nbsp;|\n//g;<br />
#print $content;</p>
<p># regex in html source order<br />
if ($content =~ /Frequency\s*(.+?) Hz/) { $data{DownFreq} = $1; }<br />
if ($content =~ /Signal to Noise Ratio\s*(.+?) dB/) { $data{DownSNR} = $1; }<br />
if ($content =~ /Power Level\s*(.+?) dBmV\s*Frequency\s*?\s*(.+?) Hz \s*?/) { $data{UpFreq} = $1; }<br />
if ($content =~ /Power Level(.+?) dBmV\s*/) { $data{UpPower} = $1; }</p>
<p>for (@keys) {<br />
        print &#8220;$_:&#8221; . $data{$_} . &#8221; &#8220;;<br />
}<br />
print &#8220;\n&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rik</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-372</link>
		<dc:creator>Rik</dc:creator>
		<pubDate>Tue, 12 Dec 2006 05:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-372</guid>
		<description>i get this output and no graphs

Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.
DownFreq: DownSNR: DownPower: UpFreq: UpPower:

the modem is a 4200

i've changed the source webpage to point to the correct url:

192.168.0.1/signaldata.html

the html source looks like this:

Frequency
 330750000 Hz  Locked


Signal to Noise Ratio
37 dB


Power Level
-1 dBmV



etc etc

sorry but i don't know perl well enough to hack the code.

i think that the parsing of the data may be wrong causing the variable to not be written

please help

ta in advance</description>
		<content:encoded><![CDATA[<p>i get this output and no graphs</p>
<p>Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.<br />
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.<br />
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.<br />
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.<br />
Use of uninitialized value in concatenation (.) or string at Moto_SurfBoard_CM.pl line 32.<br />
DownFreq: DownSNR: DownPower: UpFreq: UpPower:</p>
<p>the modem is a 4200</p>
<p>i&#8217;ve changed the source webpage to point to the correct url:</p>
<p>192.168.0.1/signaldata.html</p>
<p>the html source looks like this:</p>
<p>Frequency<br />
 330750000 Hz  Locked</p>
<p>Signal to Noise Ratio<br />
37 dB</p>
<p>Power Level<br />
-1 dBmV</p>
<p>etc etc</p>
<p>sorry but i don&#8217;t know perl well enough to hack the code.</p>
<p>i think that the parsing of the data may be wrong causing the variable to not be written</p>
<p>please help</p>
<p>ta in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-374</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sun, 03 Dec 2006 16:14:55 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-374</guid>
		<description>Looks like WordPress polluted the output of the code above. Contact me at fhirsch@NOSPAM@darkhart.net if you need a valid copy.

Thanks again..</description>
		<content:encoded><![CDATA[<p>Looks like WordPress polluted the output of the code above. Contact me at fhirsch@NOSPAM@darkhart.net if you need a valid copy.</p>
<p>Thanks again..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-373</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Sun, 03 Dec 2006 16:12:34 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-373</guid>
		<description>There is a bit of a bug in the template that caused some problems for me.

1) The data template for the power level is missing the downstream SNR value. This needs to be added.
2) The graph template doesn't automatically pickup the SNR, this needs to be assigned manually to the graph instance.

I also had to modify the Moto script for use with my SB5100:

&lt;code&gt;
$content =~ s/\&#160;&#124;\n//g;

# regex in html source order
if ($content =~ /Frequency\s+(\d+?)\s+Hz\s+Locked/i) { $data{DownFreq} = $1; }
if ($content =~ /Signal To Noise Ratio(\d+?) dB/i) { $data{DownSNR} = $1; }
if ($content =~ /Power Level(.+?) dB/i) { $data{DownPower} = $1; }
if ($content =~ /Frequency\s+(\d+?) Hz\s+Ranged/i) { $data{UpFreq} = $1; }
if ($content =~ /Power Level(\d+?) dBmV/i) { $data{UpPower} = $1; }
&lt;/code&gt;

Hope this helps,
F</description>
		<content:encoded><![CDATA[<p>There is a bit of a bug in the template that caused some problems for me.</p>
<p>1) The data template for the power level is missing the downstream SNR value. This needs to be added.<br />
2) The graph template doesn&#8217;t automatically pickup the SNR, this needs to be assigned manually to the graph instance.</p>
<p>I also had to modify the Moto script for use with my SB5100:</p>
<p><code><br />
$content =~ s/\&nbsp;|\n//g;</p>
<p># regex in html source order<br />
if ($content =~ /Frequency\s+(\d+?)\s+Hz\s+Locked/i) { $data{DownFreq} = $1; }<br />
if ($content =~ /Signal To Noise Ratio(\d+?) dB/i) { $data{DownSNR} = $1; }<br />
if ($content =~ /Power Level(.+?) dB/i) { $data{DownPower} = $1; }<br />
if ($content =~ /Frequency\s+(\d+?) Hz\s+Ranged/i) { $data{UpFreq} = $1; }<br />
if ($content =~ /Power Level(\d+?) dBmV/i) { $data{UpPower} = $1; }<br />
</code></p>
<p>Hope this helps,<br />
F</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://nerhood.wordpress.com/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-375</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Thu, 21 Sep 2006 21:36:52 +0000</pubDate>
		<guid isPermaLink="false">http://nerhood.homeip.net/wordpress/archives/2006/06/28/graphing-motorola-surfboard-sb5101-cable-modem-stats-with-cacti/#comment-375</guid>
		<description>Hi,

The freqeuncy graph works great :)

But when I run the power level graphs I'm getting the following error:

ERROR: can't parse '#FFF200:SNR'

Any idea on how to look into this?

Thanks

Si</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The freqeuncy graph works great <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
But when I run the power level graphs I&#8217;m getting the following error:</p>
<p>ERROR: can&#8217;t parse &#8216;#FFF200:SNR&#8217;</p>
<p>Any idea on how to look into this?</p>
<p>Thanks</p>
<p>Si</p>
]]></content:encoded>
	</item>
</channel>
</rss>
