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:

Author Topic: DSLstats suggestion - Usage stats.  (Read 4102 times)

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33879
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
DSLstats suggestion - Usage stats.
« on: June 21, 2013, 12:47:11 PM »

Something that struck me after an outage this am, which could be a really useful feature is recording the Data Transferred figures.

This would Im sure be appreciated by users on ISPs which dont have a CP for bandwidth figures and something that a lot of users would really like to know - particularly since these days many items such as Smart TVs, APTVs and so many mobile devices  connect via wi-fi and there is no way to record usage by these items.

Is there anyway that you can make use of these 2 figures to get a record of bandwidth used.

Code: [Select]
Uptime: 0 days, 5:40:14

Data Transferred (Sent/Received) [GB/GB]: 3,66 / 1,27



Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #1 on: June 21, 2013, 04:17:08 PM »

Yes, that's a good suggestion. The data isn't available in such a straightforward way in the regular Broadcom CLI, but I imagine that it must be there in some form. What Thomson CLI command includes this figure? (I expected it to be in the output of xdsl info expand=enabled but I don't see it in the printout of that command which I made when I was last using the TG582N).
Logged
  Eric

rhohne

  • Member
  • **
  • Posts: 76
Re: DSLstats suggestion - Usage stats.
« Reply #2 on: June 21, 2013, 06:51:00 PM »

On the TG585v8 usage figures were available using the ip iflist command
Code: [Select]
{admin}=>ip iflist
Interface                            Group      MTU  TX(bytes)  RX(bytes) Admin  Oper
0   loop. . . . . . . . . . . . . .  local   65.535  7.878.293 42.404.741 UP     [UP]   
1   Internet. . . . . . . . . . . .  wan      1.500 66.921.398 976.668.975 UP     UP     
2   LocalNetwork. . . . . . . . . .  lan      1.500 1.013.437.967 72.588.819 UP     [UP]   

On Broadcom devices usage is generally available from the ifconfig or cat /proc/net/dev commands, once the correct interface has been determined.

The figures from the telnet commands are wrapped at 4GB (2^32), so total usage is not available without additional calculations.

Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #3 on: June 21, 2013, 07:05:00 PM »

Thanks for that information.
Logged
  Eric

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #4 on: June 23, 2013, 11:35:34 AM »

Now that I've put to bed another new feature I was working on (saving graphical data as XML files and restoring the data later for viewing) I've started thinking about this one.

It looks as though I can get the data from the router by one means or another, but I'm unsure how best to present it. What I'm thinking of is a simple list of historical monthly totals and a day by day plot for the current month. The daily values won't be accurate unless the program is running at midnight every night, and of course the modem/router has to be running 24/7. The monthly totals will also be affected by program downtimes, but generally to a smaller extent.

As this is a fairly complicated feature, I'm going to release v3.5 now (in the next couple of days) and plan to add the usage stats in v3.6.
Logged
  Eric

broadstairs

  • Kitizen
  • ****
  • Posts: 3697
Re: DSLstats suggestion - Usage stats.
« Reply #5 on: June 23, 2013, 12:26:02 PM »

I guess for most the monthly figures will be the most valuable as most ISPs with caps run on a monthly basis. Perhaps allow users to specify a cap value and present the current month as a % of this value giving a quite easy way to tell how your connection is doing.

Stuart
Logged
ISP:Vodafone Router:Vodafone Wi-Fi hub FTTP

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #6 on: June 23, 2013, 12:45:15 PM »

That's a good idea, thanks Stuart.
Logged
  Eric

kitz

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 33879
  • Trinity: Most guys do.
    • http://www.kitz.co.uk
Re: DSLstats suggestion - Usage stats.
« Reply #7 on: June 23, 2013, 01:16:13 PM »

Just throwing a few ideas around.

Daily totals as you say will have to be collected at midnight.   I can imagine at some point someone will request a feature for alternative start day of month, but unless this is easy for now I would concentrate on a calendar month.

As for display, first show the current stats from the router with uptime and usage.
then perhaps in table format with total for day and cumulative figure.
Perhaps also another table to display a total so far this month and also showing each of the previous 11 months.

A caveat would have to be issued about downtime and router resets.  Perhaps if the prog detects less than 24 hrs uptime then that days data could be displayed in a different colour to indicate the possible loss of data.

Thinking on the above further when dslstats does its 2 min poll, could uptime usage stats be sent to a separate file so user there is a record somewhere of that info. 

Not sure how hard it would be for if the prog detects <24 hours uptime to call on this data from a .bak file.   This is obviously something more advanced so for now I would think the main thing is getting the basics going.

Logged
Please do not PM me with queries for broadband help as I may not be able to respond.
-----
How to get your router line stats :: ADSL Exchange Checker

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #8 on: June 23, 2013, 01:41:51 PM »

Thanks for those ideas. As far as I know, the cumulative totals don't get reset unless the router is actually rebooted, so missing data shouldn't be too much of a problem so long as the data can be read close to the turn of the month. Individual days may be wrong, but the monthly totals will be fairly accurate.

I was planning on collecting and saving the data with every sample, and analysing the figures as part of the normal post-sampling processes. Where there are discontinuities in the timeline I could, as you suggest, display the daily data in a different colour.
Logged
  Eric

broadstairs

  • Kitizen
  • ****
  • Posts: 3697
Re: DSLstats suggestion - Usage stats.
« Reply #9 on: June 23, 2013, 01:55:02 PM »

Eric I have a PC which I run 24x7 as it monitors my weather station and I could run DSLStats on it, unfortunately it runs Windows 2000 rather than XP so is there any way DSLStats could be compiled for W2K without you having to do any addition work?

I am loathed to spend money on an XP license (its not man enough for W7 or 8) when it works perfectly well for what I need using my weather software, sadly the weather programs Linux version is very flaky and the author is not keen on updating it as he does not get any money for it.

Stuart
Logged
ISP:Vodafone Router:Vodafone Wi-Fi hub FTTP

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #10 on: June 23, 2013, 02:33:37 PM »

Stuart, I presume that you've tried running the Windows version on your Win2000 machine?

I think I've got a Win2000 installation disc somewhere, so I could probably install it in a virtual machine and build DSLstats on it. I'll check it out.
Logged
  Eric

broadstairs

  • Kitizen
  • ****
  • Posts: 3697
Re: DSLstats suggestion - Usage stats.
« Reply #11 on: June 23, 2013, 02:45:47 PM »

Eric I asked because I was sure I'd tried before and failed but I just tried the 3.41 on my W2K system and it works  8) So there we are I can run it 24x7 when the stats version becomes available. I probably wont run it until then as in some ways it's more convenient on my Linux system which I use most of the time. Anyway I can test the Windows 32bit one on W2K in future as well.

Stuart
Logged
ISP:Vodafone Router:Vodafone Wi-Fi hub FTTP

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43467
  • Penguins CAN fly
    • DSLstats
Re: DSLstats suggestion - Usage stats.
« Reply #12 on: June 23, 2013, 04:19:45 PM »

Thanks for letting me know, Stuart. I really wasn't sure if it would run on W2000, but I seem to recall that XP was closely related to W2000.
Logged
  Eric