PDA

View Full Version : Is there a script or a way to export all cable modem statistics/datas to a text file?



Ant
10-06-08, 06:28 PM
Hi!

Via SSH (text mode only), I cannot use Lynx and Elinks to access the
cable modem's Web pages with statistics like my previous modems due to
missing parts and datas.

Does anyone have a script to get from Web pages (after logging in) and
output the results every seconds or more? I'd like to have logs into a
file from the cable modem's statistics and logs. A Perl scripter
couldn't get the login.html part to work due to 401 error.

Thank you in advance. :)
--
"May 10,000 ants never invade your underwear drawer." --unknown
/\___/\
/ /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )

VAXman- @SendSpamHere.ORG
10-06-08, 07:38 PM
In article <bo-dnfq4g_-CAnfVnZ2dnUVZ_tHinZ2d@earthlink.com>, ANTant@zimage.com (Ant) writes:
>Hi!
>
>Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>cable modem's Web pages with statistics like my previous modems due to
>missing parts and datas.
>
>Does anyone have a script to get from Web pages (after logging in) and
>output the results every seconds or more? I'd like to have logs into a
>file from the cable modem's statistics and logs. A Perl scripter
>couldn't get the login.html part to work due to 401 error.
>
>Thank you in advance. :)

Which model? Perhaps it has SNMP capability? Can't tell, however,
without model info.

--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)COM

.... pejorative statements of opinion are entitled to constitutional protection
no matter how extreme, vituperous, or vigorously expressed they may be. (NJSC)

Copr. 2008 Brian Schenkenberger. Publication of _this_ usenet article outside
of usenet _must_ include its contents in its entirety including this copyright
notice, disclaimer and quotations.

1PW
10-06-08, 09:31 PM
On 10/06/2008 05:38 PM, VAXman- @SendSpamHere.ORG sent:
> In article <bo-dnfq4g_-CAnfVnZ2dnUVZ_tHinZ2d@earthlink.com>, ANTant@zimage.com (Ant) writes:
>> Hi!
>>
>> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>> cable modem's Web pages with statistics like my previous modems due to
>> missing parts and datas.
>>
>> Does anyone have a script to get from Web pages (after logging in) and
>> output the results every seconds or more? I'd like to have logs into a
>> file from the cable modem's statistics and logs. A Perl scripter
>> couldn't get the login.html part to work due to 401 error.
>>
>> Thank you in advance. :)
>
> Which model? Perhaps it has SNMP capability? Can't tell, however,
> without model info.
>

The old cable modem was a Terayon TJ715x.

I believe the replacement is an Ambit U10C018 Data Cable Modem.

<http://www.ambitbroadband.com/files/main/downloads/U10C018_DatasheetPDF7.pdf>

--
1PW

@?6A62?FEH9:DE=6o2@=]4@> [r4o7t]

Ant
10-07-08, 12:31 AM
On 10/6/2008 5:38 PM PT, VAXman- @SendSpamHere.ORG typed:

>> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>> cable modem's Web pages with statistics like my previous modems due to
>> missing parts and datas.
>>
>> Does anyone have a script to get from Web pages (after logging in) and
>> output the results every seconds or more? I'd like to have logs into a
>> file from the cable modem's statistics and logs. A Perl scripter
>> couldn't get the login.html part to work due to 401 error.
>
> Which model? Perhaps it has SNMP capability? Can't tell, however,
> without model info.

Oh, I am an idiot! I'm sorry not to provide that information: Ambit
U10C018 cable modem. I also e-mailed Ambit to see if they had anything
to help as well.
--
"Ants live safely till they have gotten wings." --unknown
/\___/\
/ /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
( ) or ANTant@zimage.com
Ant is currently not listening to any songs on his home computer.

Ant
10-07-08, 12:32 AM
On 10/6/2008 7:31 PM PT, 1PW typed:

>>> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>>> cable modem's Web pages with statistics like my previous modems due to
>>> missing parts and datas.
>>>
>>> Does anyone have a script to get from Web pages (after logging in) and
>>> output the results every seconds or more? I'd like to have logs into a
>>> file from the cable modem's statistics and logs. A Perl scripter
>>> couldn't get the login.html part to work due to 401 error.
>>>
>>> Thank you in advance. :)
>> Which model? Perhaps it has SNMP capability? Can't tell, however,
>> without model info.
>
> The old cable modem was a Terayon TJ715x.
>
> I believe the replacement is an Ambit U10C018 Data Cable Modem.
>
> <http://www.ambitbroadband.com/files/main/downloads/U10C018_DatasheetPDF7.pdf>

Thanks 1PW. You rock. :)
--
"Be thine enemy an ant, see in him an elephant." --Turkish Proverb
/\___/\
/ /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
( ) or ANTant@zimage.com
Ant is currently not listening to any songs on his home computer.

1PW
10-07-08, 02:34 AM
On 10/06/2008 10:32 PM, Ant sent:
> On 10/6/2008 7:31 PM PT, 1PW typed:
>
>>>> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>>>> cable modem's Web pages with statistics like my previous modems due to
>>>> missing parts and datas.
>>>>
>>>> Does anyone have a script to get from Web pages (after logging in) and
>>>> output the results every seconds or more? I'd like to have logs into a
>>>> file from the cable modem's statistics and logs. A Perl scripter
>>>> couldn't get the login.html part to work due to 401 error.
>>>> Thank you in advance. :)
>>> Which model? Perhaps it has SNMP capability? Can't tell, however,
>>> without model info.
>>
>> The old cable modem was a Terayon TJ715x.
>>
>> I believe the replacement is an Ambit U10C018 Data Cable Modem.
>>
>> <http://www.ambitbroadband.com/files/main/downloads/U10C018_DatasheetPDF7.pdf>
>>
>
> Thanks 1PW. You rock. :)

You are a thoughtful and polite poster. You deserve no less. ...and it
doesn't hurt that you live in the right time zone. :-)

Can you tell us exactly what happens when you try connecting to the
replacement cable modem through your browser? What are the next events
that happen after trying: <http://192.168.100.1/> ?

--
1PW

@?6A62?FEH9:DE=6o2@=]4@> [r4o7t]

Ant
10-07-08, 10:04 AM
On 10/7/2008 12:34 AM PT, 1PW typed:

>>>>> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
>>>>> cable modem's Web pages with statistics like my previous modems due to
>>>>> missing parts and datas.
>>>>>
>>>>> Does anyone have a script to get from Web pages (after logging in) and
>>>>> output the results every seconds or more? I'd like to have logs into a
>>>>> file from the cable modem's statistics and logs. A Perl scripter
>>>>> couldn't get the login.html part to work due to 401 error.
>>>>> Thank you in advance. :)
>>>> Which model? Perhaps it has SNMP capability? Can't tell, however,
>>>> without model info.
>>> The old cable modem was a Terayon TJ715x.
>>>
>>> I believe the replacement is an Ambit U10C018 Data Cable Modem.
>>>
>>> <http://www.ambitbroadband.com/files/main/downloads/U10C018_DatasheetPDF7.pdf>
>>>
>> Thanks 1PW. You rock. :)
>
> You are a thoughtful and polite poster. You deserve no less. ...and it
> doesn't hurt that you live in the right time zone. :-)
>
> Can you tell us exactly what happens when you try connecting to the
> replacement cable modem through your browser? What are the next events
> that happen after trying: <http://192.168.100.1/> ?

See that PDF manual. It starts on page 33 with screen shots.
--
"They are like the ant... They start one way and turn around and go the
other way... They look all the time at the ground and never see the
sky." --Davi Kopenawa Yanomami, Amazonian Indian (Newsweek 117(17):5, 1991)
/\___/\
/ /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
( ) or ANTant@zimage.com
Ant is currently not listening to any songs on his home computer.

1PW
10-07-08, 12:35 PM
On 10/07/2008 08:04 AM, Ant sent:

Snip, snip...

>>
>> Can you tell us exactly what happens when you try connecting to the
>> replacement cable modem through your browser? What are the next events
>> that happen after trying: <http://192.168.100.1/> ?
>
> See that PDF manual. It starts on page 33 with screen shots.

Hi Phil:

If you are getting to the login page, what happens if you try to login:

User name: user
Password: user


If you are not getting to this point, what does happen?


Eerily, that page 33 has a login screen that has an /evil/ Windows look
to it... Be afraid Phil! Be very afraid! :-O

Pete

--
1PW

@?6A62?FEH9:DE=6o2@=]4@> [r4o7t]

Ant
10-07-08, 01:43 PM
1PW <barcrnahgjuvfgyr@nby.pbz> wrote:
> On 10/07/2008 08:04 AM, Ant sent:

> Snip, snip...

> >>
> >> Can you tell us exactly what happens when you try connecting to the
> >> replacement cable modem through your browser? What are the next events
> >> that happen after trying: <http://192.168.100.1/> ?
> >
> > See that PDF manual. It starts on page 33 with screen shots.

> Hi Phil:

> If you are getting to the login page, what happens if you try to login:

> User name: user
> Password: user


> If you are not getting to this point, what does happen?


> Eerily, that page 33 has a login screen that has an /evil/ Windows look
> to it... Be afraid Phil! Be very afraid! :-O

http://img505.imageshack.us/img505/4499/lynxandelinksef3.gif for screen
captures of what I saw in my text Web browsers via SSH after logging
into the cable modem successfully.

Yes, Windows stuff. It uses HTML, ASP, and JS from what I saw via
Wireshark's elements list. :( I tried that telnet 192.168.100.1 80 and
get command trick to see what the cable modem was running as a Web
server, but that disconnected me:

$ telnet 192.168.100.1 80
Trying 192.168.100.1...
Connected to 192.168.100.1.
Escape character is '^]'.
get
Connection closed by foreign host.

:(
--
"May 10,000 ants never invade your underwear drawer." --unknown
/\___/\
/ /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )

1PW
10-07-08, 02:18 PM
On 10/07/2008 11:43 AM, Ant sent:
> 1PW <barcrnahgjuvfgyr@nby.pbz> wrote:
>> On 10/07/2008 08:04 AM, Ant sent:
>
>> Snip, snip...
>
>>>> Can you tell us exactly what happens when you try connecting to the
>>>> replacement cable modem through your browser? What are the next events
>>>> that happen after trying: <http://192.168.100.1/> ?
>>> See that PDF manual. It starts on page 33 with screen shots.
>
>> Hi Phil:
>
>> If you are getting to the login page, what happens if you try to login:
>
>> User name: user
>> Password: user
>
>
>> If you are not getting to this point, what does happen?
>
>
>> Eerily, that page 33 has a login screen that has an /evil/ Windows look
>> to it... Be afraid Phil! Be very afraid! :-O
>
> http://img505.imageshack.us/img505/4499/lynxandelinksef3.gif for screen
> captures of what I saw in my text Web browsers via SSH after logging
> into the cable modem successfully.
>
> Yes, Windows stuff. It uses HTML, ASP, and JS from what I saw via
> Wireshark's elements list. :( I tried that telnet 192.168.100.1 80 and
> get command trick to see what the cable modem was running as a Web
> server, but that disconnected me:
>
> $ telnet 192.168.100.1 80
> Trying 192.168.100.1...
> Connected to 192.168.100.1.
> Escape character is '^]'.
> get
> Connection closed by foreign host.
>
> :(

Perhaps your Linux OS doesn't appear to be "Windows-ish" enough.

I take it then that you have yet to "see" your cable modem's Downstream
page. Much less know your Downstream Receive Power Level and your
Downstream SNR. Sigh!

So, you said in a previous post that "other house members" also use your
Internet access. I wonder if one of them runs a Windows system, and, if
you'd be able to try a modem login through their system(s).

Another alternative is to ask your service provider if they have any
other /non-Ambit/ modems available?

--
1PW

@?6A62?FEH9:DE=6o2@=]4@> [r4o7t]

Ant
10-07-08, 02:51 PM
> >> Eerily, that page 33 has a login screen that has an /evil/ Windows look
> >> to it... Be afraid Phil! Be very afraid! :-O
> >
> > http://img505.imageshack.us/img505/4499/lynxandelinksef3.gif for screen
> > captures of what I saw in my text Web browsers via SSH after logging
> > into the cable modem successfully.
> >
> > Yes, Windows stuff. It uses HTML, ASP, and JS from what I saw via
> > Wireshark's elements list. :( I tried that telnet 192.168.100.1 80 and
> > get command trick to see what the cable modem was running as a Web
> > server, but that disconnected me:
> >
> > $ telnet 192.168.100.1 80
> > Trying 192.168.100.1...
> > Connected to 192.168.100.1.
> > Escape character is '^]'.
> > get
> > Connection closed by foreign host.
> >
> > :(

> Perhaps your Linux OS doesn't appear to be "Windows-ish" enough.

> I take it then that you have yet to "see" your cable modem's Downstream
> page. Much less know your Downstream Receive Power Level and your
> Downstream SNR. Sigh!

> So, you said in a previous post that "other house members" also use your
> Internet access. I wonder if one of them runs a Windows system, and, if
> you'd be able to try a modem login through their system(s).

Actually, I have no problem with GUI Web browsers from MS and non-MS
OS'. The problem is that I can't view cable modem's logged in Web pages
with text Web browsers if I am SSHing from outside of home. I also want
to be able to have a script to record to a text file as a log like with
the previous cable modem. So if my cable modem connection disconnect
again, at least I can have before and after the quick disconnections to
see what's going on. The Perl script developer, Bill, and I are having a
hard time to log in to get to that. Here is what Bill scripted:
http://pastie.org/287089 ...


> Another alternative is to ask your service provider if they have any
> other /non-Ambit/ modems available?

AFAIK, only Ambit at this time. I tried to ask for Motorola brand that
someone told me to get, but they didn't have it. Oh well, it's free
and I don't get charged for the exchange. :(

I also got an e-mail reply from Ambit, and said to ask my cable modem
provider. Pfffbt, that is not going to help since they won't know and
didn't make these Web pages. :P
--
"May 10,000 ants never invade your underwear drawer." --unknown
/\___/\
/ /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )

Ant
10-08-08, 04:52 PM
> >> Via SSH (text mode only), I cannot use Lynx and Elinks to access the
> >> cable modem's Web pages with statistics like my previous modems due to
> >> missing parts and datas.
> >>
> >> Does anyone have a script to get from Web pages (after logging in) and
> >> output the results every seconds or more? I'd like to have logs into a
> >> file from the cable modem's statistics and logs. A Perl scripter
> >> couldn't get the login.html part to work due to 401 error.
> >
> > Which model? Perhaps it has SNMP capability? Can't tell, however,
> > without model info.

> Oh, I am an idiot! I'm sorry not to provide that information: Ambit
> U10C018 cable modem. I also e-mailed Ambit to see if they had anything
> to help as well.

Does anyone know if there a way to remove the login page/prompt?
--
"May 10,000 ants never invade your underwear drawer." --unknown
/\___/\
/ /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )

Ant
10-09-08, 04:33 AM
I fiddled around with my text Web browsers:

I know I can access any of these after I log in successfully. I CAN see
the statistics. I just can't go from login.html Web page and go to
these. I have to manually go to these Web pages to log in and view
statistics correctly:
http://192.168.100.1/CmInfo.asp
http://192.168.100.1/CmStatus.asp
http://192.168.100.1/CmDnstream.asp
http://192.168.100.1/CmUpstream.asp
http://192.168.100.1/CmUpBurst.asp
http://192.168.100.1/CmOpConfig.asp
http://192.168.100.1/CmEventLog.asp

I am still struggling to get the login to work. Heh, I noticed these Web
pages were from FrontPage. YUCK.

Damn, I wished there was a way to memorize the logins in my text
browsers. Cable modem doesn't even have cookies. :(
--
* <-- Tribble ... *********************** <-- Tribbles imitating ants
(unknown author)
/\___/\
/ /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
( ) or ANTant@zimage.com
Ant is currently not listening to any songs on his home computer.

1PW
10-09-08, 12:05 PM
On 10/09/2008 02:33 AM, Ant sent:
> I fiddled around with my text Web browsers:
>
> I know I can access any of these after I log in successfully. I CAN see
> the statistics. I just can't go from login.html Web page and go to
> these. I have to manually go to these Web pages to log in and view
> statistics correctly:
> http://192.168.100.1/CmInfo.asp
> http://192.168.100.1/CmStatus.asp

The next one is an important one.

> http://192.168.100.1/CmDnstream.asp


> http://192.168.100.1/CmUpstream.asp
> http://192.168.100.1/CmUpBurst.asp
> http://192.168.100.1/CmOpConfig.asp

The next one is an important one too.

> http://192.168.100.1/CmEventLog.asp
>
> I am still struggling to get the login to work. Heh, I noticed these Web
> pages were from FrontPage. YUCK.

I thought you were running Linux.

>
> Damn, I wished there was a way to memorize the logins in my text
> browsers. Cable modem doesn't even have cookies. :(

Mozilla's Firefox can store passwords.


--
1PW

@?6A62?FEH9:DE=6o2@=]4@> [r4o7t]

Ant
10-09-08, 03:31 PM
> > Damn, I wished there was a way to memorize the logins in my text
> > browsers. Cable modem doesn't even have cookies. :(

> Mozilla's Firefox can store passwords.

I am talking about text Web browsers. :) Remember, I SSH in terminals.
--
"May 10,000 ants never invade your underwear drawer." --unknown
/\___/\
/ /\ /\ \ Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Please remove ANT if replying by e-mail.
( )

Ant
10-11-08, 11:50 PM
On 10/9/2008 2:33 AM PT, Ant typed:

> I fiddled around with my text Web browsers:
>
> I know I can access any of these after I log in successfully. I CAN see
> the statistics. I just can't go from login.html Web page and go to
> these. I have to manually go to these Web pages to log in and view
> statistics correctly:
> http://192.168.100.1/CmInfo.asp
> http://192.168.100.1/CmStatus.asp
> http://192.168.100.1/CmDnstream.asp
> http://192.168.100.1/CmUpstream.asp
> http://192.168.100.1/CmUpBurst.asp
> http://192.168.100.1/CmOpConfig.asp
> http://192.168.100.1/CmEventLog.asp

OK, I got something out of a bash script after someone told me about
http://user:user@192.168.100.1/ trick. Lynx didn't work nicely so I had
to use eLinks:

$ more ambitloop
date
date >> /home/ant/download/cablemodemresults.txt
echo >> /home/ant/download/cablemodemresults.txt
ping -c 1 192.168.100.1 >> /home/ant/download/cablemodemresults.txt
echo >> /home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmInfo.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmStatus.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmDnstream.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmUpstream.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmUpBurst.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmOpConfig.asp >>
/home/ant/download/cablemodemresults.txt
elinks http://user:user@192.168.100.1/CmEventLog.asp >>
/home/ant/download/cablemodemresults.txt
echo >> /home/ant/download/cablemodemresults.txt
echo -- >> /home/ant/download/cablemodemresults.txt
echo >> /home/ant/download/cablemodemresults.txt
sleep 60
/home/ant/bin/ambitloop


At first, I ran it without sleep command and cable modem stopped
responding to my http requests after about 30 minutes. I tried every 60
seconds/one minute, and that lasted longer (about seven hours). This is
similiar to my old Terayon TJ715X modem. Why do cable modems block that?
Ugh.

I also noticed I have extra processes from my script:
$ ps aux |grep ambitloop
ant 12415 0.0 0.0 4104 976 pts/7 S+ 21:47 0:00 screen
ambitloop
ant 12416 0.0 0.1 4236 1088 ? Ss 21:47 0:00 SCREEN
ambitloop
ant 12417 0.0 0.1 4368 1432 pts/2 Ss+ 21:47 0:00 /bin/sh
/home/ant/bin/ambitloop
ant 12472 0.0 0.0 4372 992 pts/2 S+ 21:48 0:00 /bin/sh
/home/ant/bin/ambitloop
ant 12568 0.0 0.0 4372 908 pts/2 S+ 21:49 0:00 /bin/sh
/home/ant/bin/ambitloop
ant 12600 0.0 0.0 3116 736 pts/1 S+ 21:49 0:00 grep
--color ambitloop

I am not a programmer/developer so I might be doing this wrong. :( Does
anyone know how I can not keep getting extra processes?
--
"Ants. There's a size for every picnic, a colour for every occasion, and
a bite to let you know that they are there. Apart from the bite, that
could describe a Basenji pretty well." --Len Reddie
/\___/\
/ /\ /\ \ Phil/Ant @ http://antfarm.home.dhs.org (Personal Web Site)
| |o o| | Ant's Quality Foraged Links (AQFL): http://aqfl.net
\ _ / Remove ANT from e-mail address: philpi@earthlink.netANT
( ) or ANTant@zimage.com
Ant is currently not listening to any songs on his home computer.