Bookmark this page:
Yahoo!
Windows Live
del.icio.us
digg
Netscape
|
|
|||||||||||||
|
Posted by MAG on December 22, 2004, 12:51 pm
Please log in for more thread options In dealing with Comcast during periodic cable problems, I'd like to be able to present them with a log of the received signal strength and upstream power level, collected over large periods of time, that would demonstrate the specific events that result in poor performance. In the past when I tell them what my signal levels used to be, and what they are now, they don't believe me. I've got two splitters between the cable drop and my modem, so when I tell them my normal signal level is around -4 dbmv, they say: "no way, that's too high, your current -17 is typical." So, is there an application that can be set to query the modem periodically, once or maybe several times an hour, and log that info so that it could be imported into Excel or whatever for graphing? This would let me hand such a graph to the service tech and say "Signal was great until 6:30 am January 13th, then it suddenly dropped by 10 dbmv, at the same time as I started getting periodic disconnects and fuzzy TV signal. Find the problem in your system and fix it." The information is available from my RCA DCM235 at this address: http://192.168.100.1/moreInfo.html But I would need to extract just the bits that I'm interested in to yield flat numeric values. I could write this in VB, but maybe there is a better way to get the information? Is there an app out there that already does this? Or a specific query protocol I can use to get just the numeric value back? Any thoughts appreciated. Marc | |||||||||||||
|
Posted by $Bill on December 22, 2004, 1:17 pm
Please log in for more thread options In addition to Bit Twister's wget, you can just do it all in Perl and format it into a DB or whatever you like (maybe just append a line to a file every so many minutes). Email me if you like and I'll send you a Perl script that does the scraping and you can send back the output and I'll modify it to get what you want off the page. Activestate.com has a Perl that you can D/L and install easily for most platforms. One page of code would get most of it done and it works on Win32. Here's the output - I just wrote it to grab my RF page on my Terayon : Cable Modem Information Center Cable Modem Information Center Main Troubleshoot Connection Advanced Links Event Log Status DS Freq Configuration Logout RF Parameters Parameter Value Units Tx Power 51.7 dBmV Rx Power -5.4 dBmV Downstream SNR 32.4 dB Tx Frequency 33000000 Hz Rx Frequency 705000000 Hz Then it's just a matter of parsing the numbers out. | |||||||||||||
|
Posted by Bit Twister on December 22, 2004, 11:32 pm
Please log in for more thread options On Wed, 22 Dec 2004 10:17:39 -0800, $Bill wrote:
>
> In addition to Bit Twister's wget, you can just do it all in Perl and > format it into a DB or whatever you like (maybe just append a line to > a file every so many minutes). > What are the Peral lines to open/read/close the web page and libary include line if needed? | |||||||||||||
|
Posted by $Bill on December 22, 2004, 4:32 pm
Please log in for more thread options Bit Twister wrote:
> On Wed, 22 Dec 2004 10:17:39 -0800, $Bill wrote:
> >>In addition to Bit Twister's wget, you can just do it all in Perl and
>>format it into a DB or whatever you like (maybe just append a line to >>a file every so many minutes). >> >
> > What are the Peral lines to open/read/close the web page and > libary include line if needed? Might as well post the whole script. The next step is to extract the values you want from the content and log to a file. I brute forced the HTML tag removal with REs, but you can use HTML::Parser or similar to do it properly. #!perl -w -- use strict; use LWP::UserAgent; use LWP::Debug qw(level); use Data::Dumper; $Data::Dumper::Indent=1; our %A; # get commandline switches into %A for (my $ii = 0; $ii < @ARGV; ) { last if $ARGV[$ii] =~ /^--$/; if ($ARGV[$ii] !~ /^-(.*)$/) { $ii++; next; } my $arg = $1; splice @ARGV, $ii, 1; if ($arg =~ /^([w]+)=(.*)$/) { $A = $2; } else { $A++; } } $| = 1; binmode STDOUT; select ((select (STDERR), $| = 1)[0]); binmode STDERR; my $debug = $A || 0; my $file = $A || ''; my $strip = $A || 0; my $url = $ARGV[0] || 'http://192.168.100.1/modemRfPage'; (my $prog = $0) =~ s/^.*[\/]//; my $usage = <<EOD; Usage: $prog [-d] [-o=<file>] [-s] [<url>]
-d debug
-o=<file> file to dump contents into (def: STDOUT)
-s strip
<url> URL to retrieve (def: $url)
EOD die $usage if $A or $A; LWP::Debug::level('+') if $debug; my $ua = LWP::UserAgent->new(timeout => 30);
my $req = HTTP::Request->new(GET => $url); my $res = $ua->request($req); print Data::Dumper->Dump([$res], [qw($res)]) if $debug; if ($res->is_error()) {
printf "Error: %sn", $res->status_line;
} else { my $ct = $res->content();
my $content = $ct;
if ($strip) { # strip the HTML (you could use HTML::Parser) $content =~ s/[t ]*<[^>]+>[t ]*/ /gs; # rem tags
$content =~ s/ / /gs; # -> ' '
$content =~ s/t+/ /gs; # de-tab
$content =~ s/[t ]/ /gs; # mult WS to ' ' $content =~ s/^s+//s; # rem 1st leading WS $content =~ s/n */n/gs; # rem leading WS $content =~ s/n/n/gs; # rem blank lines } if ($file) { open OUT, ">$file" or die "open: $!";
binmode OUT;
if ($A) { print OUT $content; } else { print OUT $ct; } close OUT; print "File $file savedn"; } else { if ($strip) { print $content; } else { print $ct; } } } __END__ > perl getmodem.pl
Cable Modem Information Center Cable Modem Information Center Main Troubleshoot Connection Advanced Links Event Log Status DS Freq Configuration Logout RF Parameters Parameter Value Units Tx Power 51.7 dBmV Rx Power -5.7 dBmV Downstream SNR 32.2 dB Tx Frequency 33000000 Hz Rx Frequency 705000000 Hz | |||||||||||||
|
Posted by $Bill on December 22, 2004, 4:45 pm
Please log in for more thread options $Bill wrote:
> Bit Twister wrote:
> > >>On Wed, 22 Dec 2004 10:17:39 -0800, $Bill wrote:
>> >> >>>In addition to Bit Twister's wget, you can just do it all in Perl and
>>>format it into a DB or whatever you like (maybe just append a line to >>>a file every so many minutes). >>> >>
>> >>What are the Peral lines to open/read/close the web page and >>libary include line if needed? >
> > Might as well post the whole script. The next step is to extract > the values you want from the content and log to a file. I brute > forced the HTML tag removal with REs, but you can use HTML::Parser > or similar to do it properly. > > #!perl -w -- > > use strict; > use LWP::UserAgent; > use LWP::Debug qw(level); > use Data::Dumper; $Data::Dumper::Indent=1; > > our %A; # get commandline switches into %A > for (my $ii = 0; $ii < @ARGV; ) { > last if $ARGV[$ii] =~ /^--$/; > if ($ARGV[$ii] !~ /^-(.*)$/) { $ii++; next; } > my $arg = $1; splice @ARGV, $ii, 1; > if ($arg =~ /^([w]+)=(.*)$/) { $A = $2; } else { $A++; } > } > > $| = 1; binmode STDOUT; select ((select (STDERR), $| = 1)[0]); binmode STDERR; > > my $debug = $A || 0; > my $file = $A || ''; > my $strip = $A || 0; > my $url = $ARGV[0] || 'http://192.168.100.1/modemRfPage'; > > (my $prog = $0) =~ s/^.*[\/]//; > my $usage = <<EOD; > > Usage: $prog [-d] [-o=<file>] [-s] [<url>] > -d debug > -o=<file> file to dump contents into (def: STDOUT) > -s strip > <url> URL to retrieve (def: $url) > > EOD > die $usage if $A or $A; > > LWP::Debug::level('+') if $debug; > my $ua = LWP::UserAgent->new(timeout => 30); > my $req = HTTP::Request->new(GET => $url); > my $res = $ua->request($req); > print Data::Dumper->Dump([$res], [qw($res)]) if $debug; > > if ($res->is_error()) { > > printf "Error: %sn", $res->status_line; > > } else { > > my $ct = $res->content(); > my $content = $ct; > > if ($strip) { # strip the HTML (you could use HTML::Parser) > > $content =~ s/[t ]*<[^>]+>[t ]*/ /gs; # rem tags
> $content =~ s/ / /gs; # -> ' '
> $content =~ s/t+/ /gs; # de-tab > $content =~ s/[t ]/ /gs; # mult WS to ' ' > $content =~ s/^s+//s; # rem 1st leading WS > $content =~ s/n */n/gs; # rem leading WS > $content =~ s/n/n/gs; # rem blank lines And I can then extract the fields I want to print (or write/append to the file). # Fields I want: # Tx Power 51.5 dBmV # Rx Power -5.5 dBmV # Downstream SNR 32.2 dB # Tx Frequency 33000000 Hz # Rx Frequency 705000000 Hz my ($TxP, $RxP, $SNR, $TxF, $RxF); my @var = qw(TxP RxP SNR TxF RxF); my @pat = ('Tx Power ([^ ]+)', 'Rx Power ([^ ]+)', 'SNR ([^ ]+)', 'Tx Frequency ([^ ]+)', 'Rx Frequency ([^ ]+)'); my @res = (); for (my $ii = 0; $ii < @var; $ii++) { $content =~ /$pat[$ii]/; $res[$ii] = $1; } print "Tx Pwr=$res[0] "; print "Rx Pwr=$res[1] "; print "SNR=$res[2] "; print "Tx Freq=$res[3] "; print "Rx Freq=$res[4]n"; > }
> > if ($file) { > > open OUT, ">$file" or die "open: $!"; > binmode OUT; > if ($A) { > print OUT $content; > } else { > print OUT $ct; > } > close OUT; > print "File $file savedn"; > > } else { > > if ($strip) { > print $content; > } else { > print $ct; > } > } > } > > __END__ > > >>perl getmodem.pl
>
> > Cable Modem Information Center > Cable Modem Information Center > Main Troubleshoot Connection > Advanced Links > Event Log Status DS Freq Configuration > Logout > RF Parameters > Parameter Value Units > Tx Power 51.7 dBmV > Rx Power -5.7 dBmV > Downstream SNR 32.2 dB > Tx Frequency 33000000 Hz > Rx Frequency 705000000 Hz | |||||||||||||

App to monitor and log cable modem signal level?
Yahoo!
Windows Live
del.icio.us
digg
Netscape 







>
> In dealing with Comcast during periodic cable problems, I'd like to be
> able to present them with a log of the received signal strength and
> upstream power level, collected over large periods of time, that would
> demonstrate the specific events that result in poor performance.
>
> In the past when I tell them what my signal levels used to be, and what
> they are now, they don't believe me. I've got two splitters between the
> cable drop and my modem, so when I tell them my normal signal level is
> around -4 dbmv, they say: "no way, that's too high, your current -17 is
> typical."
>
> So, is there an application that can be set to query the modem
> periodically, once or maybe several times an hour, and log that info so
> that it could be imported into Excel or whatever for graphing? This
> would let me hand such a graph to the service tech and say "Signal was
> great until 6:30 am January 13th, then it suddenly dropped by 10 dbmv,
> at the same time as I started getting periodic disconnects and fuzzy TV
> signal. Find the problem in your system and fix it."
>
>
> The information is available from my RCA DCM235 at this address:
> http://192.168.100.1/moreInfo.html
>
> But I would need to extract just the bits that I'm interested in to
> yield flat numeric values. I could write this in VB, but maybe there is
> a better way to get the information? Is there an app out there that
> already does this? Or a specific query protocol I can use to get just
> the numeric value back?