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

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 107, 108, 109  Next
Author Message
al_c
DD-WRT Guru


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

PostPosted: Sun Apr 20, 2014 3:06    Post subject: Reply with quote
ewcrider wrote:
After running v1.0.17b for a few weeks, I decided to give v2.0.4d a try. Unfortunately, I ran into a couple of issues.
First, the website would load hourly data indefinitely. After investigating, it seemed the problem was the converted hourly data files. They do not contain the 3rd line, where the variable users_updated is set. I modified convert.sh to add that line in the files, reran it, and the website started to work. On a related note, the numerical data in the converted files is stored in quotes, while new information is not. For example, a converted line would be like ...,"down":"1160","up":"944",... whereas new lines are generated like ...,"down":1160,"up":944,.... This doesn't seem to be causing any issues.

Second, the live updates tab is giving me js errors. The alerts that appear on the site:
Code:
Error #5 reading the LiveUsage data file: `./js/live_data.js` SyntaxError: syntax error
Error #4 reading the LiveUsage data file: `./js/live_data.js` SyntaxError: missing ] after element list
Error #4 reading the LiveUsage data file: `./js/live_data.js` SyntaxError: unterminated string literal
Error #4 reading the LiveUsage data file: `./js/live_data.js` SyntaxError: syntax error
In the javascript console, the errors are:
Code:
ReferenceError: disk_utilization is not defined      yamon.js:693
TypeError: $(...).draggable is not a function        util.js:910


@ewcrider - thanks for bringing this to my attention and for all of the detail.

I think I've addressed a number of these issues... in particular, I believe I've addressed the `users_updated` issue. I had a `situation` on my router today that caused my hourly data file to get regenerated (with the first several hours and the *_created & *_updated variables missing... my ISP was having problems at that time and I don't know if that is related or just a red herring but I ended up with a malformed data file that was causing errors in the reports. The JavaScript now handles that better... but it is a little distressing that I do not know why/how the file became corrupted in the first place. My V1 hourly data file did not suffer the same problems. I'll have to keep an eye on this.

As you pointed out, the current convert.sh script encapsulates the numeric values in quotes while yamon2.sh does not. This has no bearing on how things run in the reports. Nonetheless, I've modified convert.sh to remove those extraneous quotes.

I cannot replicate the live_data.js errors. Are you getting it still? Can you send me the offending file?

The `draggable` error will go away shortly (i.e., when I get around to posting 2.0.5)


Al
Sponsor
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Sun Apr 20, 2014 3:45    Post subject: Reply with quote
Thanks to you guys for helping me get YAMon2 up & running on my netgear r7000.

It has been running for just about 2 hrs now.

I have a couple of questions.
#1 What are you guys seeing for memory usage on average?
In the 2 or so hrs mine has been up it bounces around 75-80% free. Just curious what is expected/normal.

#2 In the gui all devices are reported as "new device". How can I alter this to reflect NetBIOS or other friendly names? This is showing up as an alert.

I have attached a screen shot to show what I see in the gui.

Thank you for all the help & I look forward to seeing how this charts over a month or so of aggregated data.



YAMon2_gui_alert.jpg
 Description:
 Filesize:  255.09 KB
 Viewed:  11544 Time(s)

YAMon2_gui_alert.jpg



_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Sun Apr 20, 2014 5:03    Post subject: Reply with quote
ok so I found the java script which houses the "user/devices" list is.

I haven't figured out the exact command line to stop & restart the YAMon2 services so I currently restart the router so the JS will go into effect.

Time to watch the data collect!

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Sun Apr 20, 2014 13:14    Post subject: Reply with quote
Al,
good morning.

Something I have noticed since last night.
When I web into the YAMon2 interface, the "loading hourly data file" message runs and runs and runs.
As I sit here in the AM after my first login, it is still going for 5+ minutes.
I captured it though it isn't much to go on.

Is there a way to speed this up or do I need to tweak something?

Also, while this message is on the screen, it appears that other than the "live" tab, no device data totals are being displayed (as seen in the lower left of the screen cap).

I have already stopped & restarted the service via command line. No change in behavior.

Thank you
Mike



YAMon2_gui_loading.jpg
 Description:
 Filesize:  188.08 KB
 Viewed:  11508 Time(s)

YAMon2_gui_loading.jpg



_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
ewcrider
DD-WRT Novice


Joined: 03 Apr 2014
Posts: 2

PostPosted: Sun Apr 20, 2014 14:44    Post subject: Reply with quote
al_c wrote:
I cannot replicate the live_data.js errors. Are you getting it still? Can you send me the offending file?


Here are three examples of live_data.js grabbed from tmp/www/js



live_data.zip
 Description:

Download
 Filename:  live_data.zip
 Filesize:  14.41 KB
 Downloaded:  269 Time(s)

slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Mon Apr 21, 2014 17:21    Post subject: Reply with quote
I am running into a browser/compatibility issue I believe but still some sort of display error.

I run win7 x64 on my pc.
Typically I use IE 11.x
When I hit the YAMon2 page, it comes up with an "uh oh, java error" message.
Chrome on the other hand is not giving the above error BUT shows the "loading data" for a long time and below under the devices it doesn't appear to be correctly functioning.

I have attached a zip of 2 screen shots to illustrate what I am seeing.



Yamon2_screen_caps_03.zip
 Description:

Download
 Filename:  Yamon2_screen_caps_03.zip
 Filesize:  373.95 KB
 Downloaded:  225 Time(s)


_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Mon Apr 21, 2014 18:56    Post subject: Reply with quote
ok so I "uninstalled" YAMon2.
The process I used was
#1 stop yamon process via command line.
#2 back-up the user.js file to pc.
#3 Delete all directories under /opt/YAMon2 accept "Setup.
#4 run /opt/yamon2/setup/yamon2.sh
#5 replaced user.js with backed up copy from pc.
#6 Waited a couple of minutes then log into the gui via chrome.
Watching the "live updates" for data.
After a couple of minutes a repeating errors shows on the page.

Any ideas if I did this re-install wrong or what is this error trying to tell me that I can correct?
Thank you



YAMon2_gui_alert_error_live_data.jpg
 Description:
 Filesize:  295.31 KB
 Viewed:  11375 Time(s)

YAMon2_gui_alert_error_live_data.jpg



_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
al_c
DD-WRT Guru


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

PostPosted: Tue Apr 22, 2014 4:22    Post subject: YAMon version 2.0.5 Reply with quote
This update fixes a number of things:
1. The biggest change (probably) is that I've modified `yamon2.html` to look for the `hosted` JavaScript and CSS files at usage-monitoring.com (rather than my personal domain - alcaughey.com).
Why? to keep things tidier on my personal domain.
2. In my effort to clean up and reduce the size of the code in `yamom2.sh`, I was a little overzealous and removed the bits that checked to see whether users.js had been changed (editted manually rather than a new device or IP address change). That code has been added back into `yamom2.sh` (so you will have to restart the script!) In the reports, the JavaScript code detects when the file has been changed and (for the most part) updates the views accordingly (it's not perfect yet but things work reasonably well)
3. I've added a new parameter in the `default config.file` called `_doCurrConnections` by default this value is set to 0 (for disabled). You'll notice this on the bottom right of the `Live Updates` tab... when the value is set to 0, the `Active Connections` table will not be displayed. Change to value to 1 to have the table appear in the reports again.
Why? Some users are having problems with this table (the Alert dialog appears with repeated messages about errors in live_data.js. In a nutshell, it is a timing issue - i.e., that the reports are trying to read the file as the `curr_connections` variable is being written... meaning that the JavaScript structure in not properly defined and that causes an error. I actually try to read the file 4 times before issuing the error message in the Alert dialog but apparently that is not sufficient for all users.
4. I've added a timeout for the Loading dialog - i.e., if it does not go away on its own after 10s, then it probably means that there was a JavaScript error... I close the dialog and show an alert.
5. I've addressed the time issue that occasionally resulted in all devices being added as unknown new devices.
6. last but not least, on the Daily usage report, if you collapse a group, the background colour for the chevron beside the group name will change to the colour for that group in the pie chart.

If/when you do come across an error, please (please, please) send me all relevant information... e.g., log files, offending data files, screenshots, information from the console, information about the browser you're using, etc., etc. The more background info you send me, the faster I can replicate the error and resolve it.

I still have not gotten to the Monthly Breakdown report... hopefully I'll have time for that this week.


As always, I appreciate your feedback and your assistance!

Al



YAMon (2.0.5).zip
 Description:

Download
 Filename:  YAMon (2.0.5).zip
 Filesize:  35.77 KB
 Downloaded:  230 Time(s)

al_c
DD-WRT Guru


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

PostPosted: Tue Apr 22, 2014 4:35    Post subject: Reply with quote
ewcrider wrote:
al_c wrote:
I cannot replicate the live_data.js errors. Are you getting it still? Can you send me the offending file?


Here are three examples of live_data.js grabbed from tmp/www/js


See the comments in the V2.0.5 message... I've added a parameter in config.file that allows you to turn on/off the active connections table.


There is probably another way to handle this but this was the easiest solution for the time being.

Al
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Tue Apr 22, 2014 12:40    Post subject: Reply with quote
Al,
thank you for the new code.
How do you recommend installing the new 2.05 for a user who has 2.04 installed?

#1 Run the shutdown script, then...

Do you suggest just copying certain files to certain directories, a complete wipe & re-install (with data loss) or?

Also, is there an proper way to remove YAMon2 should I wish to start over from scratch?

Thank you
I will be installing the updated version this evening.
Mike

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
al_c
DD-WRT Guru


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

PostPosted: Tue Apr 22, 2014 15:03    Post subject: Reply with quote
slidermike wrote:
Al,
thank you for the new code.
How do you recommend installing the new 2.05 for a user who has 2.04 installed?

#1 Run the shutdown script, then...

Do you suggest just copying certain files to certain directories, a complete wipe & re-install (with data loss) or?

Also, is there an proper way to remove YAMon2 should I wish to start over from scratch?

Thank you
I will be installing the updated version this evening.
Mike


It is very simple to upgrade (and it should not result in any data loss).

Simply:
1. stop the current script. The easiest way to do this is to enter:
`/opt/YAMon2/Setup/yamon2.sh --stop`
(NB that path'll change if you've installed the script somewhere other than /opt/YAMon2...)

2. unzip the archive and copy the contents to `/opt/YAMon2/Setup`
You have to replace the current yamon2.sh with the new one and the contents of the `/www/` directory with the new folder.

3. restart the script. The easiest way to do this is to enter:
`/opt/YAMon2/Setup/yamon2.sh`
The script will automatically copy all of the necessary files to `/tmp/www/`.

Gin! (game over, you're done)

It is even easier to completely start afresh... It is not like a windows application where you have to run an uninstaller or anything as complicated as that.
Just delete the `/opt/YAMon2/` directory... that's it that's all.

Al
slidermike
DD-WRT Guru


Joined: 11 Nov 2013
Posts: 1487
Location: USA

PostPosted: Wed Apr 23, 2014 1:26    Post subject: Reply with quote
Al,
thank you for the explicit directions.

I have a minor suggestion if & when your looking for esthetics.
On the monthly tab, over to the right are the 2 nice gauges.
Instead of the words "memory utilization" appearing when you hover your mouse over them how about actually calling the numeric % utilized.

Looking good so far!

Thank you
Mike

_________________
Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode

R7000 specific Tips/Tricks.
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=264152
al_c
DD-WRT Guru


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

PostPosted: Wed Apr 23, 2014 4:22    Post subject: Reply with quote
slidermike wrote:
Al,
thank you for the explicit directions.

I have a minor suggestion if & when your looking for esthetics.
On the monthly tab, over to the right are the 2 nice gauges.
Instead of the words "memory utilization" appearing when you hover your mouse over them how about actually calling the numeric % utilized.

Looking good so far!

Thank you
Mike

Mike - thanks for the suggestion... is this what you had in mind? (I've added separate title tags for each gauge.)

I also found and fixed a spurious alert about your users.js changing when you moved between days.

These fixes were made in the hosted JS files so you don't have to make any changes at your end. Just reload the reports.

Al



gauges with title.png
 Description:
 Filesize:  10.13 KB
 Viewed:  11198 Time(s)

gauges with title.png


andyrav
DD-WRT Novice


Joined: 04 Mar 2014
Posts: 21

PostPosted: Wed Apr 23, 2014 9:59    Post subject: View Yamon from internet Reply with quote
Hi, does anyone know how i could view http://192.168.0.1/user/yamon2.html
from outside the network i.e. internet?
cheers
NiTrus
DD-WRT User


Joined: 25 Dec 2010
Posts: 295
Location: Twin Cities, MN

PostPosted: Wed Apr 23, 2014 11:04    Post subject: Re: View Yamon from internet Reply with quote
andyrav wrote:
Hi, does anyone know how i could view http://192.168.0.1/user/yamon2.html
from outside the network i.e. internet?
cheers


setup a dyndns account..i use http://www.noip.com
still free..

or use your WAN-IP..

_________________
NETGEAR R9000 | RT | 40134
NETGEAR R7800 | AP | 40134



Last edited by NiTrus on Wed Apr 23, 2014 11:45; edited 1 time in total
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 107, 108, 109  Next Display posts from previous:    Page 7 of 109
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware 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