Page 1 of 1

Telnet Commands

Posted: Mon Sep 28, 2015 6:02 pm
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?

Re: Telnet Commands

Posted: Tue Sep 29, 2015 10:44 am
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)

Re: Telnet Commands

Posted: Tue Sep 29, 2015 11:58 am
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.

Re: Telnet Commands

Posted: Tue Sep 29, 2015 12:02 pm
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

Re: Telnet Commands

Posted: Wed Sep 30, 2015 10:02 am
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.

Re: Telnet Commands

Posted: Thu Oct 01, 2015 8:28 am
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.

Re: Telnet Commands

Posted: Wed Oct 21, 2015 4:33 pm
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#

Re: Telnet Commands

Posted: Thu Oct 22, 2015 11:04 am
by Martin Goose
Thanks for the information.

Can you please explain how you get to see that file on the router?

Re: Telnet Commands

Posted: Thu Oct 22, 2015 11:14 am
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!!!

Re: Telnet Commands

Posted: Thu Oct 22, 2015 2:13 pm
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