YAMon 2.2 Usage Reporting: by device per hr/day/mo or live

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2, 3 ... 66, 67, 68 ... 107, 108, 109  Next
Author Message
nanis
DD-WRT Novice


Joined: 19 Mar 2015
Posts: 7

PostPosted: Tue Mar 31, 2015 10:17    Post subject: Month length problem Reply with quote
In Monthly Totals the graph in Feb-Mar shows February as 31 days while in the graph for Mar-Apr shows March as 28 days, please check attached photos


Screen Shot 2015-03-31 at 2.11.18 PM.png
 Description:
 Filesize:  27.55 KB
 Viewed:  7516 Time(s)

Screen Shot 2015-03-31 at 2.11.18 PM.png



Screen Shot 2015-03-31 at 12.06.15 PM.png
 Description:
 Filesize:  37.84 KB
 Viewed:  7516 Time(s)

Screen Shot 2015-03-31 at 12.06.15 PM.png


Sponsor
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Tue Mar 31, 2015 18:04    Post subject: Re: Month length problem Reply with quote
nanis wrote:
In Monthly Totals the graph in Feb-Mar shows February as 31 days while in the graph for Mar-Apr shows March as 28 days, please check attached photos


Uh-oh! Things work well at my end...

What is the value of `_doLocalFiles` in your config.file? If it is not 0 then you have a local copy of the JS files and have to restart yamon2.sh to get the current JS files.

It could also be that you are operating with a cached copy of the JS files... do you get the same results after you type <ctrl>+F5? (F5 reloads a page; <ctrl>+F5 clears the cache before reloading)

Of course it could also be that I've not really solved the bug. I could easily replicate the bad behaviour before introducing the change and it was gone afterwards.

I'll look at the code again tonight.

Al
nanis
DD-WRT Novice


Joined: 19 Mar 2015
Posts: 7

PostPosted: Tue Mar 31, 2015 18:25    Post subject: Re: Month length problem Reply with quote
al_c wrote:
nanis wrote:
In Monthly Totals the graph in Feb-Mar shows February as 31 days while in the graph for Mar-Apr shows March as 28 days, please check attached photos


Uh-oh! Things work well at my end...

What is the value of `_doLocalFiles` in your config.file? If it is not 0 then you have a local copy of the JS files and have to restart yamon2.sh to get the current JS files.

It could also be that you are operating with a cached copy of the JS files... do you get the same results after you type <ctrl>+F5? (F5 reloads a page; <ctrl>+F5 clears the cache before reloading)

Of course it could also be that I've not really solved the bug. I could easily replicate the bad behaviour before introducing the change and it was gone afterwards.

I'll look at the code again tonight.

Al


Actually `_doLocalFiles` was 0 until 2 days ago when I had a problem loading so I made it 1 and it started loading again, thats when the problem appeared, I changed it back to 0 but the problem is still there, I tried chrome and firefox but still have the problem, CTRL F5 doesn't work with a mac, thats why I tried with different browsers.
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Tue Mar 31, 2015 18:37    Post subject: Re: Month length problem Reply with quote
nanis wrote:

Actually `_doLocalFiles` was 0 until 2 days ago when I had a problem loading so I made it 1 and it started loading again, thats when the problem appeared, I changed it back to 0 but the problem is still there, I tried chrome and firefox but still have the problem, CTRL F5 doesn't work with a mac, thats why I tried with different browsers.


Just started a couple of days ago... hmmm...

What is the value of `_ispBillingDay` in your config.file?

Al
nanis
DD-WRT Novice


Joined: 19 Mar 2015
Posts: 7

PostPosted: Tue Mar 31, 2015 19:23    Post subject: Reply with quote
`_ispBillingDay` is 26 in config.file
villager_tom
DD-WRT Novice


Joined: 05 Mar 2015
Posts: 34

PostPosted: Tue Mar 31, 2015 22:23    Post subject: Still making external calls Reply with quote
Code:

******************************************************************
******************************************************************
 ___      ___   ____        ____    ____
 \\\\    ////  ///\\\      |||\\\  ///|||   ______    __  ___
  \\\\  ////  ////\\\\     ||||\\\///||||  ////\\\\  ||||/|||\
   \\\\////  ////  \\\\    |||| \\// |||| ||||  |||| ||||/\||||
    \\\///  /////\/\\\\\   ||||  \/  |||| ||||  |||| ||||  ||||
     ////  ////      \\\\  ||||      |||| ||||  |||| ||||  ||||
    ////  ////        \\\\ ||||      ||||  \\\\////  ||||  ||||

                     Yet Another Monitor
               Copyright (c) 2013-2014 Al Caughey
                     All rights reserved.
                  http://usage-monitoring.com
Launch options:
  + <path to yamon2.sh>
  + <path to yamon2.sh> <path to config.file>
  + <path to yamon2.sh> --help
  + <path to yamon2.sh> --stop

YAMon :: 2.0.18d


******************************************************************
*  You have started `yamon.sh` without any parameters.
*  The script will use the settings in `config.file` in your
*  `Setup` directory.
******************************************************************
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to usage-monitoring.com (66.96.147.69:80)
Connecting to code.jquery.com (94.31.29.53:80)
Connecting to code.jquery.com (94.31.29.230:80)


Hi Al,

In my config file, I have _doLocalFiles=2 but I see the script still attempting to make connections to outside servers as shown above.

Just wondering what the reason for this is and how I can stop it.

I'm trying to get this script to be run as self-enclosed as possible due to the last update corrupting my log files and giving me largely incorrect numbers when I had set _doLocalFiles=0 in my config file.

Thanks.

Tom
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Apr 01, 2015 4:04    Post subject: Re: Still making external calls Reply with quote
villager_tom wrote:


I'm trying to get this script to be run as self-enclosed as possible due to the last update corrupting my log files and giving me largely incorrect numbers when I had set _doLocalFiles=0 in my config file.

Thanks.

Tom


Tom - when you start yamon2.sh, if _doLocalFiles > 0, the script will download the latest versions of the JS & CSS files from my server (usage-monitoring.com) and also from jQuery. So yes, it has to make connections to external servers to get those files. Hence the messages on in your screenshot.

I'm not sure which log files that you're talking about but the JS & CSS files only have read access the results as generated by the yamon2.sh shell script. By design, JS files run in your browser cannot write to the local file system on the web server and as a consequence, I cannot think of any way that they could be corrupting your files. So, sorry, but I do not expect that changing the value of _doLocalFiles files will resolve your issue.

I expect that your problems are more likely the result of
a) a bug in the script (perhaps because you have a different version of the firmware) or
b) a configuration issue (in your config.file or an implementation DD-WRT that the script does not handle correctly)

My suggestion is that you set _loglevel to 0 (or -1) in your config.file, let things run for a while and then send screenshots and logs to me so that I can help you figure out what is going on.

Without more info from you, I can't begin to understand what is going on.

Al
villager_tom
DD-WRT Novice


Joined: 05 Mar 2015
Posts: 34

PostPosted: Wed Apr 01, 2015 9:21    Post subject: Re: Still making external calls Reply with quote
al_c wrote:

My suggestion is that you set _loglevel to 0 (or -1) in your config.file, let things run for a while and then send screenshots and logs to me so that I can help you figure out what is going on.


Will do. Thx.
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Apr 01, 2015 13:53    Post subject: Re: Month length problem Reply with quote
al_c wrote:
nanis wrote:
In Monthly Totals the graph in Feb-Mar shows February as 31 days while in the graph for Mar-Apr shows March as 28 days, please check attached photos


Uh-oh! Things work well at my end...

What is the value of `_doLocalFiles` in your config.file? If it is not 0 then you have a local copy of the JS files and have to restart yamon2.sh to get the current JS files.

Al


I'm quite certain I know what is going on! *

You said that at some point you changed `_doLocalFiles` to 1 or 2... When you do that, yamon2.sh downloads a local copy of the JS and CSS files and *also* updates `yamon2.html` (in /opt/YAMon/Setup/www) to point to those local copies.

If you subsequently change `_doLocalFiles` back to 0, yamon2.sh is not currently smart enough to `correct` yamon2.html. **

So, I'm quite certain (99%) that you're still seeing the error because your reports are referencing the now out-of-date local copies of the JS files.

If you have the YAMon (2.0.18d).zip file, you can refresh you copy of yamon2.html from there and I expect that'll fix this issue.

Please let me know if this works.

Al

* believe it or not, this occurred to me while I was in the shower this AM (hopefully not TMI)
** I'll add this to the to-do list (but with a pretty low priority)
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Apr 01, 2015 14:15    Post subject: Reply with quote
joedan wrote:
The only concern I have is that now I am so addicted to this software the dreadful thought you may walk away from it at some point in your life and shutdown your servers. Smile


A very valid concern!

To address similar concerns (raised many months ago), I set up a Google Code project that contains the YAMon source code (but, to be honest, I've not updated things there for quite some time).

Google recently announced that they're shuttering the Google Code repository (because GitHub or BitBucket offer similar/better functionality). I will migrate the code to one of those in the near future and promise to update things there on a ongoing basis.

In conclusion (and most importantly), I do not plan to abandon this `little` project. I get a lot of create satisfaction while developing the code (and I've learned so much while doing this). I also enjoy the conversations that I had in this forum and directly via email.

Al
nanis
DD-WRT Novice


Joined: 19 Mar 2015
Posts: 7

PostPosted: Wed Apr 01, 2015 14:46    Post subject: Reply with quote
I did replace the file, now its not loading & hung on "loading monthly data file"
MikeMcr
DD-WRT User


Joined: 28 Aug 2009
Posts: 54

PostPosted: Sun Apr 05, 2015 16:02    Post subject: Re: Still making external calls Reply with quote
al_c wrote:
Tom - when you start yamon2.sh, if _doLocalFiles > 0, the script will download the latest versions of the JS & CSS files from my server (usage-monitoring.com) and also from jQuery. So yes, it has to make connections to external servers to get those files. Hence the messages on in your screenshot.


Hi, is there any way to improve the "getLocalCopies" function in yamon2.sh so that it does not zap the local copies if your server is offline?

I just tried the curl command you use, with an invalid server and noticed it replaces the output with a 0 byte file.

I assume the same will be true of wget but haven't tried it.

EDIT: wget actually seems to handle this situation better so I'll switch to use that rather than curl.
MikeMcr
DD-WRT User


Joined: 28 Aug 2009
Posts: 54

PostPosted: Mon Apr 06, 2015 20:49    Post subject: Reply with quote
Do the graphs work for anyone else on the "Monthly Breakdown" tab, if you filter by a device or user?

In the caption above the missing graph, it always lists the user name with a "dd-" prefix (and all lowercase) so I don't know if that has anything to do with it.

For example, if the device name is "TV" and the user is "Michael", (full name is Michael-TV) it reads:

Graphs → Device: `TV` for User: `dd-michael-tv`
rseiler
DD-WRT Guru


Joined: 01 Oct 2007
Posts: 622

PostPosted: Tue Apr 07, 2015 0:42    Post subject: Reply with quote
Since searching a thread on this board is impossible, I'd like to ask about experiences with OpenWRT. Aside from the firmware change setting in the config file and the lack of a need to install Optware, what else do I need to know? I know there's going to be some gotchya, so I thought I'd ask first.

I'm on Chaos Calmer (Atheros), if that matters.
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Tue Apr 07, 2015 2:26    Post subject: Reply with quote
MikeMcr wrote:
Do the graphs work for anyone else on the "Monthly Breakdown" tab, if you filter by a device or user?

In the caption above the missing graph, it always lists the user name with a "dd-" prefix (and all lowercase) so I don't know if that has anything to do with it.

For example, if the device name is "TV" and the user is "Michael", (full name is Michael-TV) it reads:

Graphs → Device: `TV` for User: `dd-michael-tv`

That's a bug but it'll be easy to fix. Thanks for pointing that out.

You're seeing the right content in the graphs though... right?

Al
Goto page Previous  1, 2, 3 ... 66, 67, 68 ... 107, 108, 109  Next Display posts from previous:    Page 67 of 109
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum