Telnet Commands
-
- Posts: 15
- Joined: Fri Oct 10, 2014 3:22 pm
Telnet Commands
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?
Can this value be accessed through the telnet interface of the router? Is there a document which documents all the telnet commands?
-
- Posts: 5398
- Joined: Tue Jul 19, 2011 4:30 pm
Re: 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)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?
-
- Posts: 39
- Joined: Mon Aug 01, 2011 4:03 pm
Re: Telnet Commands
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.
This might be the information you need.
-
- Posts: 5398
- Joined: Tue Jul 19, 2011 4:30 pm
Re: Telnet Commands
Nice findPete-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.

-
- Posts: 15
- Joined: Fri Oct 10, 2014 3:22 pm
Re: Telnet Commands
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.
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.
-
- Posts: 15
- Joined: Fri Oct 10, 2014 3:22 pm
Re: Telnet Commands
As a workaround I am scraping the router web page with a script as follows:
This is running on a RaspberryPi every 5 minutes.
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
-
- Posts: 39
- Joined: Mon Aug 01, 2011 4:03 pm
Re: Telnet Commands
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#
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#
-
- Posts: 15
- Joined: Fri Oct 10, 2014 3:22 pm
Re: Telnet Commands
Thanks for the information.
Can you please explain how you get to see that file on the router?
Can you please explain how you get to see that file on the router?
-
- Posts: 39
- Joined: Mon Aug 01, 2011 4:03 pm
Re: Telnet Commands
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!!!
-
- Posts: 15
- Joined: Fri Oct 10, 2014 3:22 pm
Re: Telnet Commands
Thanks. Tried those commands and found:
PS Using Software Version 2.32d.dh14
Looks like the file is not getting correctly time stamped.-rw-r--r-- 1 admin root 9 Jan 1 1970 status_ppp1.1
PS Using Software Version 2.32d.dh14