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 ... 44, 45, 46 ... 107, 108, 109  Next
Author Message
al_c
DD-WRT Guru


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

PostPosted: Fri Oct 31, 2014 19:57    Post subject: YAMon 2.0.16 has been posted Reply with quote
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!

Al



new monthly graphs.png
 Description:
 Filesize:  84.8 KB
 Viewed:  14766 Time(s)

new monthly graphs.png


Sponsor
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Oct 31, 2014 20:59    Post subject: Reply with quote
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
Dlife
DD-WRT Novice


Joined: 31 Oct 2014
Posts: 1

PostPosted: Fri Oct 31, 2014 21:07    Post subject: ISP Data import Reply with quote
Hi,

In the attachment the format of my isp for usage data import.

Regards Dieter



usage_+32486462001_2014-10-01_month.zip
 Description:

Download
 Filename:  usage_+32486462001_2014-10-01_month.zip
 Filesize:  1.02 KB
 Downloaded:  311 Time(s)

al_c
DD-WRT Guru


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

PostPosted: Fri Oct 31, 2014 21:12    Post subject: Reply with quote
ddaniel51 wrote:
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.



default config.zip
 Description:

Download
 Filename:  default config.zip
 Filesize:  2.12 KB
 Downloaded:  329 Time(s)

ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Oct 31, 2014 21:32    Post subject: Reply with quote
Thank you kind Sir.

It just keeps getting better
deanpeak
DD-WRT User


Joined: 13 Sep 2014
Posts: 70

PostPosted: Sun Nov 02, 2014 0:31    Post subject: Reply with quote
ddaniel51 wrote:
Thank you kind Sir.

It just keeps getting better


I second that! Keep up the good work Al!
al_c
DD-WRT Guru


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

PostPosted: Mon Nov 03, 2014 3:13    Post subject: Differences graphs on the Monthly Breakdown tab` Reply with quote
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!

Al



differences graphs.png
 Description:
 Filesize:  130.88 KB
 Viewed:  14536 Time(s)

differences graphs.png



h2m.zip
 Description:

Download
 Filename:  h2m.zip
 Filesize:  2.82 KB
 Downloaded:  299 Time(s)

deanpeak
DD-WRT User


Joined: 13 Sep 2014
Posts: 70

PostPosted: Mon Nov 03, 2014 14:33    Post subject: Reply with quote
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.
al_c
DD-WRT Guru


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

PostPosted: Wed Nov 05, 2014 3:06    Post subject: Reply with quote
deanpeak wrote:
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...

Al
kendalja
DD-WRT Novice


Joined: 07 Feb 2014
Posts: 45

PostPosted: Fri Nov 07, 2014 16:26    Post subject: Missing users.js Reply with quote
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".

That path does have W/R/X access.

Any help is appreciated.



devices.png
 Description:
 Filesize:  104.82 KB
 Viewed:  14281 Time(s)

devices.png


Gnits
DD-WRT Novice


Joined: 10 Apr 2014
Posts: 28

PostPosted: Sat Nov 08, 2014 0:18    Post subject: Reply with quote
wow, big failure for me.

I am getting an error in line 60

if(_scriptVersion=="2.0.14e"){

Saying that it isn't defined and all the nice unhappy yellow boxes.

Also, I get this when the script is started from the telnet prompt

: not foundbshare/YAMon2/Setup/yamon2.sh: eval: line 1:
: not foundbshare/YAMon2/Setup/yamon2.sh: eval: line 1:

I figure knowing my _baseDir="/tmp/mnt/smbshare/yamon2/"

might help with that error.
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Sat Nov 08, 2014 3:23    Post subject: Reply with quote
Gnits wrote:
wow, big failure for me.

I am getting an error in line 60

if(_scriptVersion=="2.0.14e"){

Saying that it isn't defined and all the nice unhappy yellow boxes.

Also, I get this when the script is started from the telnet prompt

: not foundbshare/YAMon2/Setup/yamon2.sh: eval: line 1:
: not foundbshare/YAMon2/Setup/yamon2.sh: eval: line 1:

I figure knowing my _baseDir="/tmp/mnt/smbshare/yamon2/"

might help with that error.





It would be much easier to follow the install directions and put it in /opt.
Gnits
DD-WRT Novice


Joined: 10 Apr 2014
Posts: 28

PostPosted: Sat Nov 08, 2014 3:34    Post subject: Reply with quote
[quote="ddaniel51]
It would be much easier to follow the install directions and put it in /opt.[/quote]

While that would be true, I run my entire yamon out of a mapped drive from my NAS. which has worked VERY well, until 16.
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Sat Nov 08, 2014 9:13    Post subject: Reply with quote
Gnits wrote:
[quote="ddaniel51]
It would be much easier to follow the install directions and put it in /opt.


While that would be true, I run my entire yamon out of a mapped drive from my NAS. which has worked VERY well, until 16.[/quote]

Thanks but, I'll keep mine local on the router and save the network traffic.
Gnits
DD-WRT Novice


Joined: 10 Apr 2014
Posts: 28

PostPosted: Sat Nov 08, 2014 18:32    Post subject: Reply with quote
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

Gnits
Goto page Previous  1, 2, 3 ... 44, 45, 46 ... 107, 108, 109  Next Display posts from previous:    Page 45 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