Posted: Fri Oct 31, 2014 19:57 Post subject: YAMon 2.0.16 has been posted
Version 2.0.16 addresses two key issues
- the functionality in yamon.startup that makes a local copy of the JavaScript & CSS files on usage-monitoring.com has been incorporated into the main yamon2.sh script. The means that a new option has been added in default config.file... there are three possible values for `_doLocalFiles`
> 0-> do not make a local copy (*my preferred setting)
> 1-> make a copy using `curl`
> 2-> make a copy using `wget`
Some firmware versions do not support the `curl` function...
use 2 if you get errors when the value is set to 1
- fixed a major logic gaff in the Daily backups functionality (previously it only made a backup if you wanted to tar the files).
If you did not see them before, on the `Monthly Usage` tab in the Reports, I now include device and owner usage graphs (at the bottom of the page below the table). You can clearly see who is hogging the data on our router... I enabled access restrictions about half way through the interval and daily consumption has gone way down... I'm such a mean dad!
Uhhh, Al. _doLocalFiles= is missing in the default config you sent in 16.
Adding the line _doLocalFiles=0 brought the config up to date.
Since the default in the script file is d_doLocalFiles=0
YAMon runs as usual for most of us anyway.
Dave
Fixed - sorry! Thanks for point that out.
I've fixed the zip file on the first page of this thread...
But... you don't need to download the whole archive again if the one you've got has the wrong `default config.file`... the correct`default config.file` is attached to this message.
Posted: Mon Nov 03, 2014 3:13 Post subject: Differences graphs on the Monthly Breakdown tab`
I've finally gotten around to fixing/re-enabling the difference graphs on the monthly breakdown tab... see screenshot below.
These graph options are only available if the `Show Data at Router` and/or `Show ISP Columns` options are selected on the `Settings` tab.
I'm also now highlighting the days on which your router was rebooted (those dates will be preceded with an asterisk).
If you are using the JS & CSS files at my domain, you should see these new graphs the next time you reload the graph (maybe do a ctrl+shift+F5 to clear the cache). If you're using local copy of these files, you will have to reload those files (by restarting the script).
NB - the restart highlighting will not occur for previous ISP billing intervals or any dates prior to upgrading to 2.0.16. If you really want to get this info, you can regenerate your monthly date files using the attached script...
- replace the currently copy of this file in your /opt/YAMon2/Setup directory
- give the file execute permissions
- run the script
Code:
/opt/YAMon2/Setup/h2m.sh [startday] [month] [[year]] [[just]]
->[startday] - required... the day on which your billing interval starts
->[month] - required... the month you want re-generate
->[[year]] - optional... defaults to the current year
->[[just]] - optional... will only update the totals for the specified date within the interval
Notes:
It will take several minutes for the script to run and it will add to your server loads
Make a back of your monthly data files before running the h2m.sh script!
Hey Al,
One thing I noticed is if you make a usage correction on the daily usage tab that these corrections do not seem to show on the monthly break down reports? It seems to reflect in the summary totals at the top though. Also if you view the reports from a different computer, any corrections adjustments do not seem to show at all?
FYI... on a good note since I upgraded to your latest version, I have not had any issue where I was getting that 'oops' screen and having to stop and restart the script and sometimes having to reenter my setup parameters.
Hey Al,
One thing I noticed is if you make a usage correction on the daily usage tab that these corrections do not seem to show on the monthly break down reports? It seems to reflect in the summary totals at the top though. Also if you view the reports from a different computer, any corrections adjustments do not seem to show at all?
RE - different computers... that is a (well) known limitation. Currently, I persist the settings using localStorage variables (which are effectively cookies on steroids). The problem with localStorage variables is that they are tied to a specific browser on one device (i.e., the values cannot be shared across browsers/devices).
Today I started playing with database integration that allows sharing of settings across all browsers & devices. I still have a lot of debugging to do but I have basic functionality working (for just the values on the Settings tab ATM).
The way things work at the moment:
There is a button on the Settings tab which, when it is clicked, creates a table in the database. The table is given a unique & cryptic name and that value is returned and stored in a field on your Settings tab. You copy this string and paste it into your config.file (and then restart yamon2.sh). When you reload the reports, the script will get the table name from your config.js file and will use that to retrieve the most recent set of settings from that table.
I'm currently wrestling with what events trigger the code to store the values to the database. One option is to save values to the database every time there is a change (which could cause bloating of the tables); another approach is to save things only when you leave/close the YAMon reports (and presumably only if you've changed a value). I've been working on the latter approach but that has been tricky (especially when it comes to different browsers) so I might go back to the first.
I still do not store ISP or correction data yet.
The problem (that I anticipate) with this (or any) database implementation is that the values get stored on my domain (usage-monitoring.com)... some folks are going to object to putting their data into my database. Assuming I release this to the wild one day, everyone's data will go into a separate table. That table will have an effectively indecipherable name and even if someone does work backwards, the name is just the timestamp of when the table was created. I do not store any info that relates the table back to the machine that issued the request.
Another option is to allow anyone who is interested to host the database on their own computers... I think this would be a nightmare to support.
Your thoughts and feedback are welcome and appreciated...
Posted: Fri Nov 07, 2014 16:26 Post subject: Missing users.js
Like the title says I'm missing users.js in `/opt/YAMon2/data`. The script is loading just fine however the devices are showing up as 'new device: mac address'. I try to create my own users.js file and place it in the /opt/YAMon2/data folder via Winscp and I get "General failure (server should provide error description).
Error code: 4
Error message from server: Failure".
Finally deleting all of the js files on the router www/users/js directory and the directory under setup as well as setting local files to 2 fixed the problem.
Thank you.
Trying to figure out why...
/tmp/mnt/smbshare/YAMon2/Setup/yamon2.sh (or --stop) works
but...
/tmp/mnt/smbshare/YAMon2/Setup/yamon.shutdown
results in...
-sh: /tmp/mnt/smbshare/YAMon2/Setup/yamon.shutdown: not found
and ...
/tmp/mnt/smbshare/YAMon2/Setup/yamon.startup
results in...
-sh: /tmp/mnt/smbshare/YAMon2/Setup/yamon.startup: not found
all three files show -rwxr-xr-x root root