Telnet Commands

Discussions for BiPAC 8800 series: 8800NL, 8800NLR2, 8800AXL, 8800AXLR2
Post Reply
Martin Goose
Posts: 15
Joined: Fri Oct 10, 2014 3:22 pm

Telnet Commands

Post by Martin Goose »

The WAN Connection Time is given on the main page of the status pages for the router.

Can this value be accessed through the telnet interface of the router? Is there a document which documents all the telnet commands?
billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: Telnet Commands

Post by billion_fan »

Martin Goose wrote:The WAN Connection Time is given on the main page of the status pages for the router.

Can this value be accessed through the telnet interface of the router? Is there a document which documents all the telnet commands?
I don't think you can, Billion do not provide us (Billion UK) with the telnet command list either (as telnet/SH commands are used for engineering proposes only, everything you need to do, should be available through the web gui)
Pete-B
Posts: 39
Joined: Mon Aug 01, 2011 4:03 pm

Re: Telnet Commands

Post by Pete-B »

If you run "adsl info --stats" then towards the bottom there is a line which reads, in my case, "Since Link time = 28 days 11 hours 10 min 49 sec".
This might be the information you need.
billion_fan
Posts: 5374
Joined: Tue Jul 19, 2011 4:30 pm

Re: Telnet Commands

Post by billion_fan »

Pete-B wrote:If you run "adsl info --stats" then towards the bottom there is a line which reads, in my case, "Since Link time = 28 days 11 hours 10 min 49 sec".
This might be the information you need.
Nice find :D (mine is a about 30 seconds off) but I guess that's the only option
Martin Goose
Posts: 15
Joined: Fri Oct 10, 2014 3:22 pm

Re: Telnet Commands

Post by Martin Goose »

I had already spotted that in the output but this is a different time.

Using telnet I get:

Total time = 108 days 19 hours 33 min 58 sec
Since Link time = 49 days 17 hours 2 min 47 sec

In the web interface I get:

Connection Time 1 Day(s) 19:23:41

It is this connection time I need.
Martin Goose
Posts: 15
Joined: Fri Oct 10, 2014 3:22 pm

Re: Telnet Commands

Post by Martin Goose »

As a workaround I am scraping the router web page with a script as follows:

Code: Select all

#!/bin/bash

# script to scrape connection time from router status page
# and save in a log file

# get date and time for log filename and entry in log

LOGFILE=~/"CT"$(date +%F)".log"
STRINGTIME=$(date +%T)

RESULT=$(wget -qO-  --user=admin --password=<password> http://192.168.0.1/info.html | grep Connection)

echo $STRINGTIME'\t'$RESULT >> $LOGFILE
This is running on a RaspberryPi every 5 minutes.
Pete-B
Posts: 39
Joined: Mon Aug 01, 2011 4:03 pm

Re: Telnet Commands

Post by Pete-B »

Had another chance to look at this.
You might find that the data and time of the most recent connection is given in the file information for /var/status_ppp1.1
For me this file contains the value of: Connected
and has a date and time stamp that agrees with the time shown on the web page.

i.e at 16:30 21 Oct 2015
The web page shows: ppp1.1 pppoe_0_1_1.101 PPPoE 1 Day(s) 04:46:41
The command line shows:
# ls -l status*
-rw-r--r-- 1 admin root 9 Oct 20 11:44 status_ppp1.1
# cat status*
Connected#
Martin Goose
Posts: 15
Joined: Fri Oct 10, 2014 3:22 pm

Re: Telnet Commands

Post by Martin Goose »

Thanks for the information.

Can you please explain how you get to see that file on the router?
Pete-B
Posts: 39
Joined: Mon Aug 01, 2011 4:03 pm

Re: Telnet Commands

Post by Pete-B »

login as: XXXXXX
XXXXX@XXX.XXX.XXX.XXX's password:
> sh


BusyBox v1.17.2 (2015-06-01 17:19:31 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# cd /var
# ls -l status*
-rw-r--r-- 1 admin root 9 Oct 20 11:44 status_ppp1.1
# cat status*
Connected# exit
> exit

Bye bye. Have a nice day!!!
Martin Goose
Posts: 15
Joined: Fri Oct 10, 2014 3:22 pm

Re: Telnet Commands

Post by Martin Goose »

Thanks. Tried those commands and found:
-rw-r--r-- 1 admin root 9 Jan 1 1970 status_ppp1.1
Looks like the file is not getting correctly time stamped.

PS Using Software Version 2.32d.dh14
Post Reply