Kitz Forum
Broadband Related => Router Monitoring Software => Topic started by: oldfogie on January 25, 2014, 08:30:44 AM
-
I'm experiencing frequent drop-outs of my adsl link.
So I've tried to monitor it with routerstats lite and it says its unable to connect to the router.
There is no telnet raw data.
and routerstats (full) tells me "Your client does not have permission to get URL /cgi-bin/STATUS/st_stat.asp from this server."
I'm running windows 7/64bit
when I log in to http://192.168.1.1/cgi-bin/STATUS/st_stat.asp?0 with firefox I see traffic and adsl statistics.
I've tried disabling windows firewall AND anti-virus software, it still wont connect.
Ive tried using PuTTy and if I select 192.168.1.1 and Telnet to port 22 I get this response
tc login: admin
Password: (here I typed in admin)
#
if I enter "ls" I get
bin dev lib proc sys userfs var
boaroot etc linuxrc sbin tmp usr
#
so its clearly responding - but I see no cgi-bin directory.
Help please?
-
issue resolved - I've been emailing the author and we beileve the D-Link 3780 sets a cookie. Routerstats cannot supply the cookie so the page request is not authorized. life can be complicated. >:(
-
Hi. I am having the same problem Could you explain how you resolved the issue?
Many thanks.
-
Routerstats cannot supply the cookie so the page request is not authorized.
From the sound of the reply, it seems that RS doesnt work with the DSL3750 :(
-
Ah but, that router is running Linux, so some form of stats harvesting may be available.
If for instance one was to telnet into the router and execute the command
ls /bin
then that may give a clue as to what command to use if the output is copied & pasted here.
I did google for some info on that model, but there seems very little available :no: A response to a similar question on the Talktalk Official forum was met with the flat reply "We do not support telnet". Very sad I think.
-
Hi Sorry about the delay. It has taken me a long time to work out how to do this!
Is this what you mean:
# ls /bin
ash dd grep ln mv pwd tar
busybox dmesg gunzip login netstat rm true
cat echo gzip ls pidof rmdir umount
chmod egrep hostname mkdir ping sed uname
cp false ip more ping6 sh usleep
date fgrep kill mount ps sleep zcat
#
-
It is indeed, well done :thumbs:
That list is a list of the Linux commands that can be typed into the router and executed. Unfortunately, the particular command or variation thereof, is not present. :no:
However, that's still not to say that the command does not exist on your router. It may just 'live' in a different directory to '/bin'.
The most common variations on the command to obtain statistics in a telnet session are :-
adsl
adslctl
adslcmd
xdslcmd
It might be easier to try those variations rather than explain how to navigate inside the router. Simply type each variation into a telnet session, and hopefully one of them will respond with a help message rather than a command :not found error.
If this proves to be the case, then it should be perfectly possible to pull the line statistics from the DLink.
-
Thanks!
How do I enter those. Is it "ls /adsl" ?
-
How do I enter those. Is it "ls /adsl" ?
No. :no:
Just type the relevant command at the prompt. Try each one, in sequence and note what is returned as a response.
For example, you might see adslctl: not found which indicates a failure or perhaps Usage: xdslcmd blah blah blah which would be indicative of success. ;)
-
Unfortunately, they all give "not found" :(
-
Unfortunately, they all give "not found" :(
That is very unfortunate. :(
Let's wait for Blackeagle . . . he may have other ideas.
-
I do indeed have other ideas ;)
Not least because I have never been in favour of giving up at the first hurdle.
Lets approach the problem from a slightly different angle, if delia is willing ?
Firstly, lets define what we do know.
- The router is running some form of Linux
- The router can report stats in the GUI, proving some method of communication with the driver is possible
- Apparent use of a session cookie precludes easy gathering of the stats from the GUI
- None of the more common commands for obtaining stats via telnet are apparent
1. Can easily be determined by typing uname -a at the telnet command line.
Another useful command would be cat /proc/cpuinfo which should reveal details of the chipset in the D-Link DSL-3680. It is highly likely that the chipset is in use in other routers and this may well give a clue to the method of communication D-Link are using.
Lastly, another useful command to issue would be echo "$PATH" This should return the locations of all the binary commands in the router, in other words, where the Linux system 'looks' to find a command typed into it.
E.G.
# echo "$PATH"
/bin:/sbin:/usr/bin
#
From this we can see that my router first looks in '/bin', then in '/sbin' and finally in '/usr/bin' before returning a 'command not found' message. Performing ls upon each of these locations gives the following
# ls /bin
zebra swapdev printserver ln ebtables cat
wpsd startbsp pppc klog dns busybox
wlancmd sntp ping kill dms brctl
web smbpasswd ntfs-3g iwpriv dhcps atserver
usbserver smbd nmbd iwconfig dhcpc atmcmd
usbmount sleep netstat iptables ddnsc atcmd
upnp siproxd mount ipp date at
upg sh mldproxy ipcheck cwmp ash
umount scanner mknod ip cp adslcmd
tr111 rm mkdir igmpproxy console acl
tr064 ripd mii_mgr hw_nat cms ac
telnetd reg mic ethcmd cli
tc radvdump ls equipcmd chown
switch ps log echo chmod
# ls /sbin
vconfig rmmod poweroff init halt
route reboot insmod ifconfig arp
# ls /usr/bin
wget top test mcast ftpput [[
traceroute tftp telnet killall ftpget [
#
This then is a complete set of the commands that can be typed into a telnet session on this particular router. A similar procedure followed on delia's router may or may not reveal something conclusive. :-\
It is most unfortunate that TT have not made the firmware available for download >:(
-
Thanks again for replying. I'm not sure I'm up to this, but I'll have a go.
This is what I have got so far. Hope it's what you meant!
# cat /proc/cpuinfo
system type : Ralink RT63365 SOC
processor : 0
cpu model : MIPS 34K V5.5
BogoMIPS : 465.30
wait instruction : yes
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : yes
hardware watchpoint : yes
ASEs implemented : mips16 dsp mt
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
unaligned accesses : 106114016
processor : 1
cpu model : MIPS 34K V5.5
BogoMIPS : 349.79
wait instruction : yes
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : yes
hardware watchpoint : yes
ASEs implemented : mips16 dsp mt
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
unaligned accesses : 106114016
processor : 2
cpu model : MIPS 34K V5.5
BogoMIPS : 349.79
wait instruction : yes
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : yes
hardware watchpoint : yes
ASEs implemented : mips16 dsp mt
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
unaligned accesses : 106114016
processor : 3
cpu model : MIPS 34K V5.5
BogoMIPS : 348.97
wait instruction : yes
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : yes
hardware watchpoint : yes
ASEs implemented : mips16 dsp mt
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
unaligned accesses : 106114016
# uname-a
-sh: uname-a: not found
# echo"$PATH"
-sh: echo/userfs/bin:/usr/sbin:/bin:/usr/bin:/sbin: not found
# # echo "$PATH"
# /bin:/sbin:/usr/bin
-sh: /bin:/sbin:/usr/bin: not found
# #
# ls /bin
ash dd grep ln mv pwd tar
busybox dmesg gunzip login netstat rm true
cat echo gzip ls pidof rmdir umount
chmod egrep hostname mkdir ping sed uname
cp false ip more ping6 sh usleep
date fgrep kill mount ps sleep zcat
-
;D Yay :dance:
Very interesting !! We can already see that the router is based upon the Ralink RT63365 SoC1.
Could you indulge me and post the contents of ls /sbin and ls /usr/bin please ?
Also, if you could have another go at uname -a, noting that there is a space between uname and the -a, which is why it didn't work.
In the meantime, I shall try and see if I can find another model of router using that chipset :)
[1] http://www.mediatek.com/en/products/connectivity/xdsl/adsl-wifi/rt63365/
-
Probably a daft question from un- knowledgeable me, but looking from another angle must the router set a session cookie? If the answer is "no" might the OP be able to alter the cookie settings to prevent one being set?
-
Sorry about the delay and apologies for the typing error, it's down to complete ignorance I'm afraid!
# ls /sbin
arp ifconfig insmod rmmod sysctl udhcpc
getty init reboot route udevd
# ls /usr/bin
LogFileParser expr pppd traceroute
[ firewallcmd prolinecmd udevinfo
adslphxcmd free qoscmd udevstart
algcmd head smuxctl updatewifistatus
alpha_mgr hwnat sys uptime
atmphxcmd ip syslogd utelnetd
basename ip6tables taskset w
br2684ctl iptables tc wan
brctl killall tcci wlanphxcmd
cpu klogd tce wscd
cut mpstat tcwdog yes
dirname nslookup test
ebtables passwd tftp
env portbindcmd top
# uname -a
Linux tc 2.6.22.15 #12 SMP Tue Aug 27 19:10:39 CST 2013 mips unknown
#
-
Ah ha !!!!!! Now, we are getting somewhere delia !!!
Please try the following command
adslphxcmd info --show
If that returns what I hope it does, it should be a fairly trivial matter for Eric to support your router with DSLstats.
Do not worry about typing errors or timings. You may not realise it yet, but what you have revealed could end up benefiting an awful lot of people :)
-
tc login: admin
Password:
# adslphxcmd info --show
adslphxcmd: ADSL driver and PHY status
Status Showtime
Channel: Interleave, UpInterleavestream rate = 596 Kbps, DownInterleavestream ra
te = 4168 Kbps
Link Power State: L0
Mode: ITU G.992.3(ADSL2)
Channel: Interleave
Line Status: No Defect
Training Status: Showtime
Down Up
SNR (dB): 6.2 9.2
Attn (dB): 55.3 35.6
Pwr (dBm): 0.0 12.5
Max(Kbps): 4680 704
Rate (Kbps): 4168 596
Intl Depth: 32 2
G.dmt framing
R: 0 0
S: 0 0
D: 0 0
ADSL2 framing
MSGc: 38 10
R: 6 12
S: 1.47 11.87
D: 32 2
Counters
RS: 79874808 9915721
RSCorr: 55574 0
RSUnCorr: 458 65504
HEC: 1643 0
OCD: 0 0
LCD: 0 0
Total Cells: 289357702 1841911
Drop Cells: 0 0
Bit Errors: 0 0
ES: 183 0
SES: 3 0
UAS: 85 85
CRC: 458 65504
FEC: 55574 0
#
-
Oh excellent :dance:
That is indeed the correct command to pull of the stats. Way to go delia !!
Whilst we wait for the author of DSLstats to confirm whether or not he can add the required support, it may be possible to use routerstats to grab the telnet data.
What you would need to do is click the cog at the top left of RS to get to the settings page. Set up the http login to the telnet login details (probably admin admin) and then move to the telnet configuration page.
Tick the top two boxes and untick the third. Make sure the middle 'dot' is selected for broadcom in the chipset selection, then delete everything in the box at the side and type in /usr/bin/adslphxcmd info --show
Click in the 'disable http plotting' box, and then 'apply and save' and close the set up window.
Now if you click the 'run' button, the graphs should be available under the 'telnet router' tab.
Of course DSLstats (if support can be added) will give you more info and save you having to configure everything manually.
-
Having had an initial look at this, it may be possible to get DSLstats to work with this router, so long as the CLI provides the necessary data.
Delia, you're doing sterling work here, and I'm very grateful. Could I bother you to try just two more commands:
adslphxcmd info --stats
and
adslphxcmd info --Bits (note the capital B)
You don't need to post the entire output of the second command (it'll be very long if it works) but just the first 10 lines or so would be useful.
Many thanks
-
Hi roseway, here it is
# adslphxcmd info --stats
adslphxcmd: ADSL driver and PHY status
Status Showtime
Channel: Interleave, UpInterleavestream rate = 596 Kbps, DownInterleavestream ra
te = 4168 Kbps
Link Power State: L0
Mode: ITU G.992.3(ADSL2)
Channel: Interleave
Line Status: No Defect
Training Status: Showtime
Down Up
SNR (dB): 6.0 9.2
Attn (dB): 55.3 35.6
Pwr (dBm): 0.0 12.6
Max(Kbps): 4680 704
Rate (Kbps): 4168 596
Intl Depth: 32 2
G.dmt framing
R: 0 0
S: 0 0
D: 0 0
ADSL2 framing
MSGc: 38 10
R: 6 12
S: 1.47 11.87
D: 32 2
Counters
RS: 107507584 13346080
RSCorr: 11252 0
RSUnCorr: 788 65504
HEC: 3190 0
OCD: 0 0
LCD: 0 0
Total Cells: 389461319 2305528
Drop Cells: 0 0
Bit Errors: 0 0
ES: 270 0
SES: 7 0
UAS: 85 85
CRC: 788 65504
FEC: 11252 0
#
Sorry the second one didn't work!
-
Hi Blackeagle. I have tried following your instructions for configuring Router stats but I must be doing something wrong as it doesn't seem to be working.
Is the Telnet IP address 192.168.1.1?
-
Normally the --Bits command should work. Maybe you have a stripped-down version with fewer functions.
Try adslphxcmd or adslphxcmd --help to get an overview of the available commands.
-
This isn't actually a Broadcom-based modem/router. It has a Ralink SoC, and the CLI has been designed to mimic Broadcom, but it isn't complete.
Looking at the information delia posted above, it seems that all the features of the normal --stats command are available, so DSLstats can be made to work with it in a somewhat reduced fashion. There's enough there to make it worthwhile, so I'll certainly be going ahead with it. It will be interesting to see if any other useful functions are revealed by morphium's suggestion above.
-
I have tried both of morphium's suggestions
adslphxcmd
adslphxcmd --help
Unfortunately neither worked.
-
This isn't actually a Broadcom-based modem/router. It has a Ralink SoC, and the CLI has been designed to mimic Broadcom, but it isn't complete.
Looking at the information delia posted above, it seems that all the features of the normal --stats command are available, so DSLstats can be made to work with it in a somewhat reduced fashion. There's enough there to make it worthwhile, so I'll certainly be going ahead with it. It will be interesting to see if any other useful functions are revealed by morphium's suggestion above.
That is great news for owners of routers based around this chipset as they all seem to share the same adslphxcmd binary.
Looking at the F/W of a similar hardware based router reveals a command wan. This works in a bit of a non-conformist method as it outputs its results to /var/log/messages
Running a command then such as wan adsl linedata near outputs the result and to read it, one executes cat /var/log/messages
Similarly, wan adsl perfdata would list the errors. You can see delia's router implements this command in /usr/bin
I point out this information in the hope it may be useful to someone.
Further information on commands and my original source - here (http://translate.google.com/translate?depth=1&hl=en&prev=/search%3Fq%3Dadslphxcmd%2Binfo%2B--Bits%26biw%3D1422%26bih%3D1012&rurl=translate.google.co.uk&sl=el&u=http://www.adslgr.com/forum/threads/590231-ZTE-ZXV10-W300-v-5-2/page15%3Fs%3D134c7a738f32c11557b6010ef1c9a6b3)
Hi Blackeagle. I have tried following your instructions for configuring Router stats but I must be doing something wrong as it doesn't seem to be working.
Is the Telnet IP address 192.168.1.1?
Yes it is. I can't guarantee that it'll work but I have had success in the past getting RS to graph from telnet (by changing the command) when it couldn't scrape the http page.
@ Eric - You did notice both the --stats and --show options return the same data ?
-
@ Eric - You did notice both the --stats and --show options return the same data ?
Actually I didn't. In Broadcom based routers the --stats option returns more comprehensive data. I think I'll stick with --stats because that's what DSLstats already uses.
-
I have tried both of morphium's suggestions
adslphxcmd
adslphxcmd --help
Unfortunately neither worked.
But what actually happened? ???
Absolutely nothing? Just the command line prompt returned? Or was there some error message shown?
-
But what actually happened?
Just the command line prompt returned
-
Just the command line prompt returned
Thank you. :)
We now know that the adslphxcmd utility has been built to ignore any command line flags that it does not understand and to not provide any form of help. :(
-
I have manged to get RS working by typing in the command
adslphxcmd info --show instead of
/usr/bin/adslphxcmd info --show that Blackeagle suggested:
Make sure the middle 'dot' is selected for broadcom in the chipset selection, then delete everything in the box at the side and type in /usr/bin/adslphxcmd info --show
-
Rather belatedly (sorry), I'm pleased you got it working.
I've been building some support for the DSL-3780 into DSLstats. I decided to buy one on eBay for not very much, to support the development. I've got it working, plotting data and recording it, although there's some information which simply doesn't appear to be available, such as bitloading. Unfortunately the router itself proved to be an unstable performer here, repeatedly dropping the PPP connection, so I couldn't leave it in place for long. I'll come back to it when I have some more time, but in the meantime I can offer partial support for this model.
-
Nice one Eric ;D Delia is currently away I believe, but I'm sure she'll be delighted on her return.
-
Thanks for your help roseway. I have tried to get dslstats working for my router without success so far. I have entered the login name and password, but the event log just keeps saying "No data received." I'm sure I must be missing something really obvious :-[
My PC runs 64 bit Windows and I downloaded the 32 bit Windows version, could that be why it doesn't work?
-
Delia, did you select the DSL-3780 from the "Modem/router model" drop-down list? And just to be clear, the login name and password are the details you use when logging into the router, not your ISP login credentials.
-
Yes to both questions :)
-
One more thing then - please make sure that the CLI command prefix (still on the login page) says 'adslphxcmd'. If it already does say that, then it looks as though I've goofed in some way. :)
-
Yes it does :)
-
Right, thanks for checking those things. As soon as I can, I'll connect up my DSL-3780 and try to find out why it isn't working for you.
-
Many thanks :)
-
I think I've worked it out now. Delia, have you changed the router login password from its default value ('admin') to something else? I've now realised that the login password for telnet is always 'admin', even when you've changed it in the web interface. So, in DSLstats, the password which you enter in the login page should be 'admin'.
The data you can currently see is very limited - just the SNRM and Connection speed graphs, and some data on the Stats page. I'll try to tidy it up and fill in some gaps for the next release.
(If it still doesn't work for you I'll have to don my thinking cap again).
-
You are correct, I had changed the password. I have changed it back to admin as you suggest. Unfortunately, I am still getting "Modem/router failed to respond to telnet request."
Interestingly, Router Stats works fine with my changed password. I am getting bothered that I have done something stupid and don't want you spending ages trying to find my mistake!
Stop Press!
I have just re-booted the router and DSL Stats is now working- with my changed password! :-[
-
No need for embarrassment, I probably didn't explain myself well. I'm pleased you got it working. :)
-
Now this is quite strange. I've just switched PC on and started dslstats and it's saying "Modem/router failed to respond to telnet request." I haven't changed anything since last night when it worked fine.
Also, when I type "telnet 192.168.1.1" into the Run box, the box shows connecting.... then disappears.
-
The router has a limit on how many simultaneous telnet connections it can support (that number may be two). It appears that something has caused the router to think that it already has the maximum number of connections, so it rejects any more attempts to log in. If when you last closed down Windows, there were two connections already there, then it could be that these weren't disconnected on shutdown.
If you've been using Routerstats, you should always press its stop button before closing down, because it stays connected via telnet all the time it's running. If you've been logging in manually, you should always logout when you've finished, for the same reason. In the case of DSLstats, it's possible that you shut down the PC while it was in the middle of sampling, which could possibly also result in a stale login remaining.
All this is speculation, but I can't think of anything else. If I'm right, then I'm afraid that rebooting the router again is the only cure.
-
Thank you for a patient and clear explanation.
-
You're welcome. :)