Posted: Tue Mar 31, 2015 18:04 Post subject: Re: Month length problem
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.
Posted: Tue Mar 31, 2015 18:25 Post subject: Re: Month length problem
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.
Posted: Tue Mar 31, 2015 18:37 Post subject: Re: Month length problem
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?
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.
Posted: Wed Apr 01, 2015 4:04 Post subject: Re: Still making external calls
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.
Posted: Wed Apr 01, 2015 9:21 Post subject: Re: Still making external calls
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.
Posted: Wed Apr 01, 2015 13:53 Post subject: Re: Month length problem
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)
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.
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.
Posted: Sun Apr 05, 2015 16:02 Post subject: Re: Still making external calls
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.
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:
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.
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?