Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2] 3

Author Topic: rs-ux and rs-w v0.9 released  (Read 9064 times)

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #15 on: September 14, 2012, 07:00:46 PM »

Thanks b*cat. rs-ux currently gets its information from the AS value in --stats, and this value (in seconds) agrees with the "Since link time =" item at the bottom of --stats, so I'm happy that it's correct in the case of the HG612. Unfortunately, other routers present the information differently.
Logged
  Eric

burakkucat

  • Global Moderator
  • Senior Kitizen
  • *
  • Posts: 27726
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: rs-ux and rs-w v0.9 released
« Reply #16 on: September 14, 2012, 09:46:44 PM »

 :thumbs:
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

rhohne

  • Member
  • **
  • Posts: 76
Re: rs-ux and rs-w v0.9 released
« Reply #17 on: September 14, 2012, 10:20:51 PM »

Impatiently waiting for the next version to see which additional features will be added.

Have now been running rs-w v0.9 on and off for the last couple of days and have the following observations :-

  • No longer hangs when resized
  • DSL connection time correct. Perhaps the system uptime and PPP connection time can be added at a later date.
  • Wrong Y offset for QLN "Expanded view".
  • "Expanded view" overlaps "Take snapshot" when width reduced too much on QLN & Hlog.
  • Bitloading graph unreadable if height reduced too much - perhaps an increase in the minimum height restriction required.
  • When Bitloading graph is resized due to SNR > 50 then SNR scale factor is wrong - see attached.
  • On occasions router upstream SNR is reported as all zero, resulting in the graph flipping between the resized and normal scales.
  • If "Pause" pressed during sample period then get "Can only run command when connected" error message box.
  • Sampling notification not visable during first reading.

Have found that I can not run rsw for extended periods due to a "The internet connection may have been dropped" error message box. When this happens it looks like the login sequence is bypassed and "adsl info --stats" is sent as the login name.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #18 on: September 14, 2012, 10:57:18 PM »

Thanks for the report. Some initial thoughts:

1. Good.
2. Uptime is problematical, as discussed earlier. I'll look at it further, but some information may simply not be available from the telnet interface of some routers.
3. Agreed. I missed that one.
4. Agreed.
5. Yes, I probably need to increase the minimum window size.
6. Agreed.
7. I think that this only happens when the router reports zeros for all the upstream tones. You can check this in the Telnet data/SNR tab.
8. I'll check this out.
9. Agreed.

Concerning your final point, I think I may have already dealt with this in the next version, but I must check further.
« Last Edit: September 15, 2012, 07:25:22 AM by roseway »
Logged
  Eric

asbokid

  • Kitizen
  • ****
  • Posts: 1286
    • Hacking the 2Wire
Re: rs-ux and rs-w v0.9 released
« Reply #19 on: September 15, 2012, 01:59:52 AM »

Thanks for the report. Some initial thoughts:

1. Good.
2. Uptime is problematical, as discussed earlier. I'll look at it further, but some information may simply not be available from the telnet interface of some routers.

Maybe the info that you need could come from the /proc pseudo-file system (mostly where the c/l tools get it from)

From the Huawei: HG612
Code: [Select]
Welcome Visiting Huawei  Home Gateway
Copyright by Huawei Technologies Co., Ltd.
..
BusyBox v1.9.1 (2010-10-15 17:59:06 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# cat /proc/stat
cpu  4557 0 10124 70898040 0 0 161898 0
cpu0 4557 0 10124 70898040 0 0 161898 0
intr 169056848 0 0 0 0 0 0 0 142149240 0 0 9700 0 20443679 0 0 0 0 0 0 0 0 0 0 81 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2640536 0 13693 0 0 0 0 0 3798321 5 1594 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ctxt 398645089
btime 946684800
processes 18047
procs_running 5
procs_blocked 0
#

In the case of uptime, the btime field in /proc/stat "gives the time at which the system booted, in seconds since the Unix epoch" (midnight on Jan 1st 1970.)

And the current time can get gotten as an epoch using the date command. Which is then subtracted from btime (the boot time epoch) - to give system uptime.  That's probably how the Huawei gets it.

Code: [Select]
# date +%s
947396644

e.g.. 947,396,644 - 946,684,800 = 711,844 seconds uptime = eight and a bit days uptime.

cheers, a
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #20 on: September 15, 2012, 07:27:49 AM »

Thanks Asbo, that would seem to be an accurate means of getting the system uptime.
Logged
  Eric

zhadoom

  • Member
  • **
  • Posts: 40
  • 38/4 Mb/s - HG612
Re: rs-ux and rs-w v0.9 released
« Reply #21 on: September 15, 2012, 03:37:38 PM »

Thanks for this very useful software.

I'm ( another ) VDSL2 user from Brazil using Huawei HG612.
I notice that the bitloading show something wrong when compared with telnet data. The connection doesn't use U0 band but the graphic colors part of D1 as upstream.

Code: [Select]
xdslcmd info --pbParams
xdslcmd: ADSL driver and PHY status
Status: Showtime
Retrain Reason: 0
Max: Upstream rate = 8496 Kbps, Downstream rate = 63900 Kbps
Path: 0, Upstream rate = 3998 Kbps, Downstream rate = 38000 Kbps

Discovery Phase (Initial) Band Plan
US: (872,1203) (1972,2779)
DS: (36,867) (1208,1971) (2788,4051)
Medley Phase (Final) Band Plan
US: (872,1203) (1972,2779)
DS: (36,867) (1208,1971) (2788,4051)
       VDSL Port Details       Upstream        Downstream
Attainable Net Data Rate:       8496 kbps         63900 kbps
Actual Aggregate Tx Power:        6.3 dBm          14.1 dBm
============================================================================
  VDSL Band Status        U0      U1      U2      U3      D1      D2      D3
  Line Attenuation(dB):   N/A 16.1 20.1   N/A 17.7 43.6 65.3
Signal Attenuation(dB):   N/A 30.4 48.0   N/A 17.7 43.6 65.3
        SNR Margin(dB):   N/A 15.7 14.9   N/A 13.3 13.3 0.0
         TX Power(dBm):   N/A 6.2 -8.6   N/A 12.2 7.6 -128.0
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #22 on: September 15, 2012, 03:53:49 PM »

Thanks for that. I'll see what I can do.
Logged
  Eric

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #23 on: September 16, 2012, 03:47:51 PM »

I've got Asbo's suggested method for calculating system uptime working properly now (after tearing my hair out over the fact that the calculated value never seemed to change - * see below).
I've covered all of rhohne's points, and I've successfully made it into a multi-threaded program, so that it now remains responsive during the sampling period.
I've still got to refine the handling of VDSL2 band plans, and when that's done I'll upload a new version, which I hope will be the basis for a v1.0 release.

* Just so that the programmers among you can have a giggle at my expense, I've spent ages wondering why the calculated system uptime didn't change, and I did finally work it out. At several points in the program I have to use floating point numbers, and I was using single-precision numbers on the basis that their 6-7 digit precision was more than enough for this program's needs. What I eventually realised was that the "seconds since the Unix epoch" numbers are 10-digit numbers, and what I have to do is subtract one of these very large numbers from another to get a fairly small result. So single precision just wasn't adequate - the changes between successive samples are all in the last few digits. I should have realised this earlier. :doh:
Logged
  Eric

asbokid

  • Kitizen
  • ****
  • Posts: 1286
    • Hacking the 2Wire
Re: rs-ux and rs-w v0.9 released
« Reply #24 on: September 18, 2012, 03:45:06 AM »

Yeh, glad it worked Eric!   Just had a quick look under /proc and didn't immediately find the answer, but perhaps even "date" could be omitted in calculating system up time?  The system info under /proc is so poorly/obscurely documented. E.g. ECI has disabled netstat in the busybox build for the f/w of its B-Focus VDSL2 CPE.  So it's really hard to see what network daemons are listening.  But the info on server sockets is still there under /proc albeit in obscure form.

Keep up the good work. You've got a really good project going there!

cheers, a

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #25 on: September 18, 2012, 07:51:16 AM »

Thanks asbo. System uptime and DSL link uptime are obviously going to be ongoing issues for various routers. For the moment, your suggested method for system uptime works with the HG612, and the AS figure gives a good DSL uptime with the HG612. However, I see that the HG612 and my three Linux PCs all have /proc/uptime; this returns two figures, the first of which (in seconds) corresponds with the value calculated by the 'asbo method'. I'm not sure what the second figure represents.

To add to the above, I've now checked out several other routers, and apart from the HG612, none of them support the 'time' command, so the time calculated from Unix epoch time unfortunately fails. However, all the routers I've tried do support 'cat /proc/uptime' which gives the system uptime directly in seconds, so this is what I'm going to use.
« Last Edit: September 18, 2012, 11:01:31 AM by roseway »
Logged
  Eric

rhohne

  • Member
  • **
  • Posts: 76
Re: rs-ux and rs-w v0.9 released
« Reply #26 on: September 18, 2012, 03:16:15 PM »

As you have pointed out the first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds.

Out of interest does the HG612 have a /tmp/wan_uptime or similar. If so then the PPP uptime can be calculated by subtracting /proc/uptime from it, as it a copy of /proc/uptime when the PPP connection is established

The date/time commands depend on the version of BusyBox and whether or not the option was selected to include them in the build.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 39516
  • Penguins CAN fly
    • DSLstats
Re: rs-ux and rs-w v0.9 released
« Reply #27 on: September 18, 2012, 03:40:38 PM »

Thanks for that information. I've checked out /tmp in the HG612, but it's empty. There's a wan directory under /var, but that doesn't contain uptimes.
Logged
  Eric

burakkucat

  • Global Moderator
  • Senior Kitizen
  • *
  • Posts: 27726
  • Over the Rainbow Bridge
    • The ELRepo Project
Re: rs-ux and rs-w v0.9 released
« Reply #28 on: September 18, 2012, 07:36:28 PM »

As you have pointed out the first number is the total number of seconds the system has been up. The second number is how much of that time the machine has spent idle, in seconds.

From my laptop, which is running RHEL 6u3, I see the following --

Quote
[bcat@Duo2 ~]$ cat /proc/uptime; uptime
9567.48 14757.53
 19:34:30 up  2:39,  2 users,  load average: 0.56, 0.23, 0.25
[bcat@Duo2 ~]$

How would you interpret that output, please?  ???
Logged
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.

rhohne

  • Member
  • **
  • Posts: 76
Re: rs-ux and rs-w v0.9 released
« Reply #29 on: September 18, 2012, 08:38:43 PM »

Besides ...

uptime:            2:39:27
total idle time:  14757s
current time:    19:34:30
uptime:            2:39
No users:         2
load averages for the past 1, 5 and 15 minute intervals: 0.56, 0.23, 0.25

I take it that you are refering to the idle time exceeding the uptime. What I didn't mention was that on multi core systems (and some linux versions) the second number is the sum of the idle time accumulated by each CPU
Logged
Pages: 1 [2] 3
 

anything