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: Query about the stats.log file data created by DSLStats  (Read 2622 times)

broadstairs

  • Kitizen
  • ****
  • Posts: 3700
Query about the stats.log file data created by DSLStats
« on: January 19, 2019, 03:39:33 PM »

I have been looking for an easy way to see how many ES both up and down I get on my line per day and display the daily totals using a PHP script. I noticed that there are two values in stats.log one for ES DS and one for ES US at position 41 and 42 respectively, however these seem to be a cumulative total and not the total for the day in question. I had expected them to reflect the total for that 24 hour period. Was this intentional or an error? Are they perhaps the total since the last re-sync or some other value?

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

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43568
  • Penguins CAN fly
    • DSLstats
Re: Query about the stats.log file data created by DSLStats
« Reply #1 on: January 19, 2019, 04:36:58 PM »

Positions 45 and 46 contain downstream and upstream ES delta values (i.e. the difference between the previous sample and the current sample).

It's done this way because the stats log is based on the log produced by HG612_Modem_Stats. MDWS started off as an extension for that program, and I was invited to join in later.
Logged
  Eric

broadstairs

  • Kitizen
  • ****
  • Posts: 3700
Re: Query about the stats.log file data created by DSLStats
« Reply #2 on: January 19, 2019, 07:59:34 PM »

Yes I already use those values for the graphs. I was hoping the two at 41 & 42 held the 24 hour totals. So in order to get the 24 hour totals I have to read all entries in each stats.log and add up the individual values which makes doing this for all days I have data for somewhat heavy processing! Oh well it's only CPU cycles I suppose.

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

Westie

  • Kitizen
  • ****
  • Posts: 1596
Re: Query about the stats.log file data created by DSLStats
« Reply #3 on: January 19, 2019, 09:08:54 PM »

So in order to get the 24 hour totals I have to read all entries in each stats.log and add up the individual values
...or subtract the previous day's cumulative from the current one. Still a slog, but only 4.2% of the work!
Logged

broadstairs

  • Kitizen
  • ****
  • Posts: 3700
Re: Query about the stats.log file data created by DSLStats
« Reply #4 on: January 20, 2019, 08:30:41 AM »

...or subtract the previous day's cumulative from the current one. Still a slog, but only 4.2% of the work!

Not quite that simple as I have no idea when the values get reset as the don't reflect the absolute total for all time!

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

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43568
  • Penguins CAN fly
    • DSLstats
Re: Query about the stats.log file data created by DSLStats
« Reply #5 on: January 20, 2019, 11:14:16 AM »

The algorithm DSLstats uses for calculating the delta values takes that into account. Basically, if a new total is less than the previous total then it either sets the delta value to zero for that sample, or it may use the new total as the delta value for that sample if it concludes that the total has simply passed its maximum value (or has been reset) and started counting from zero again. It takes different action if more than one sample time has passed since the previous record.
Logged
  Eric

broadstairs

  • Kitizen
  • ****
  • Posts: 3700
Re: Query about the stats.log file data created by DSLStats
« Reply #6 on: January 20, 2019, 11:45:18 AM »

Eric I think we are talking at cross purposes. The values at 45 & 46 work fine and show correct values on my script graphs and agree with the values I can see on DSLStats itself.

The values I was hoping to use are  41& 42, and these are not usable for the purpose I need as they contain some cumulative value for more than 24 hours and I am unable to determine what period they do cover. Anyway it's academic now as I will have to process the entire stats.log file and add up the deltas for every day in the archive which in my case looks like 1440x365 records so far!

Stuart

Edit: After investigating some more I now see that the values at 41 & 42 are the total since the last re-sync (I think) so the values are not really what I need as I am trying to build a table of ES values for longer than just the last re-sync. Just a shame a daily total was not included originally but I understand that was probably not in the original design criteria.

« Last Edit: January 20, 2019, 12:13:53 PM by broadstairs »
Logged
ISP:Vodafone Router:Vodafone Wi-Fi hub FTTP
 

anything