YAMon 3.0... Usage Reporting by device per hr/day/mo

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 ... 116, 117, 118 ... 149, 150, 151  Next
Author Message
al_c
DD-WRT Guru


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

PostPosted: Wed Sep 13, 2017 22:01    Post subject: Reply with quote
scope2 wrote:
ddaniel51 wrote:
Al's .sh is good the way it is. The config3.3.js get's sent provided your _ftp_dir and corresponding nested dirs on the ftp server are correct.


I honestly tried everything @ddaniel51, in the end, after debugging I found what the issue was.. There might be scenarios where the existing code works (as in your case), but I am pretty sure the change I proposed is required.

I have sent the change I had to do to Al, hopefully he will comment on it. Smile


Yes it works... but does it always work? Evidently not (and that really is not a surprise to me). I'll definitely take a look into the proposed improvements.

Al
Sponsor
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Thu Sep 14, 2017 14:04    Post subject: Reply with quote
Hey Al, how about removing the config.js from ftp since it is created fresh every time YAMon starts and include users.js and the monthly file since these two are more important to have a backup of? It'd make rebuilding lost data a breeze instead of suffering like @scope2 did.
Heck, toss the config.file in there too.

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
scope2
DD-WRT User


Joined: 12 Jul 2017
Posts: 183

PostPosted: Thu Sep 14, 2017 17:29    Post subject: Reply with quote
Another strange one.. When I press the 'Export users.js' button in the front end I get the correct list of devices (as shown in the table on the screen, with the correct group/name)..

If I press 'View the contents of your users.js file' link on the same page I get a list of devices, but not with the correct names, etc..

Subsequently this is also the file that gets backed up to the FTP Server.

Im not bothered with the 'View content...' link, but I would like the correct users.js file to get exported to the FTP server. Smile

The file under /opt/YAMon3/data/users.js does NOT contain the correct groups/labels, so I suspect this is the file that gets backed up..

Question is, why do I see 2 different files (content)?

Edit: "Since your `users.js` file was created 57d 2h ago and last updated -117d -24h ago, a total of 59 devices have connected to your router; 36 of which have been active during the current reporting interval."
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Sep 15, 2017 19:08    Post subject: Reply with quote
That is the difference between the file on the usb stick and the shtuff Al keeps in the variables.

There is a method (though clunky) to export it to the users.js.

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
jakehm
DD-WRT Novice


Joined: 15 Sep 2017
Posts: 3

PostPosted: Fri Sep 15, 2017 23:40    Post subject: Reply with quote
ddwrt bandwidth monitoringsays 10Mbps.
Yamon live usage says 0.11 KB/S.

What is going on?
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Sat Sep 16, 2017 3:47    Post subject: Reply with quote
jakehm wrote:
ddwrt bandwidth monitoringsays 10Mbps.
Yamon live usage says 0.11 KB/S.

What is going on?


ddwrt is 1 second slices in mega bits and Yamon is 30 second averages in mega bytes. They'll never look even remotely the same.

_________________
Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
jakehm
DD-WRT Novice


Joined: 15 Sep 2017
Posts: 3

PostPosted: Sat Sep 16, 2017 8:39    Post subject: Reply with quote
But the y axis of the graph is labeled KB/s
al_c
DD-WRT Guru


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

PostPosted: Sat Sep 16, 2017 14:37    Post subject: Reply with quote
scope2 wrote:
Another strange one.. When I press the 'Export users.js' button in the front end I get the correct list of devices (as shown in the table on the screen, with the correct group/name)..

If I press 'View the contents of your users.js file' link on the same page I get a list of devices, but not with the correct names, etc..

Subsequently this is also the file that gets backed up to the FTP Server.

Question is, why do I see 2 different files (content)?

Everything is functioning as designed...
The fundamental problem is that the stock dd-wrt web server does not offer cgi/bin capabilities so the web side cannot write back to the router hence I cannot update users.js directly from the reports.

To get around this, all of the customizations you make on the Devices tab are saved in a LocalStorage variable. When you open the reports, the JavaScript reads users.js from the router and blends that info with whatever is saved in the LS variable. I thought about this a *lot* and it is the simplest solution that I could come up with. However, that said, it comes with 2 major draw-backs:
1. by design, LS variables are specific to a browser on a device (meaning the customizations are not shared if you view the reports from multiple devices)
2. your changes are lost if the LS variable is removed

Over the years, I've added a number of ways built into the reports that help to get around this...

  1. make a full backup of all of the information in the LS variable (by clicking export settings on the Settings tab)

    You can save/copy these values and then import them into browsers on different devices... slow and painful and you'll have to re-import as devices change on your network

  2. export the blended LS and users.js value (via the export users.js button on the Devices tab)...

    You can then copy this file back to your router... less painful but you'll still have to re-copy to your router as devices change on your network

  3. last but not least, enable the database integration options on the Settings tab

    Simple and painless and always up-to-date across all devices


Your choice... Smile

Al
scope2
DD-WRT User


Joined: 12 Jul 2017
Posts: 183

PostPosted: Sat Sep 16, 2017 14:43    Post subject: Reply with quote
al_c wrote:
Everything is functioning as designed...


Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.

I will manually export the users.js file, I rarely make any changes to it anyway. Smile
al_c
DD-WRT Guru


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

PostPosted: Sun Sep 17, 2017 13:38    Post subject: Reply with quote
scope2 wrote:
al_c wrote:
Everything is functioning as designed...


Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.

I will manually export the users.js file, I rarely make any changes to it anyway. Smile

aahhh... now I understand.

In config.file, you can specify whether or not you want a daily backup and where to store those files. The default location for the backups is the within the `daily-bu` directory (which is also on your memory stick so won't help at all if the stick fails). But you can specify an absolute path to point the backups to your NAS.

Is that closer to what you want?

Al
jakehm
DD-WRT Novice


Joined: 15 Sep 2017
Posts: 3

PostPosted: Sun Sep 17, 2017 23:58    Post subject: Reply with quote
ddaniel51 wrote:
jakehm wrote:
ddwrt bandwidth monitoringsays 10Mbps.
Yamon live usage says 0.11 KB/S.

What is going on?


ddwrt is 1 second slices in mega bits and Yamon is 30 second averages in mega bytes. They'll never look even remotely the same.


the y axis on that graph is labeled KB/s. So what am i missing?
TazBag
DD-WRT Novice


Joined: 13 Sep 2017
Posts: 1

PostPosted: Mon Sep 18, 2017 15:21    Post subject: Remove one Device Reply with quote
Hello, i try to search, but i not find if is possible.

In my network, sometime i connect one device only one time, never reconnect again. Is possible to delete from YAMon?

From Device Tab and from all usage report? Smile

Thank's in advice
al_c
DD-WRT Guru


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

PostPosted: Wed Sep 20, 2017 1:21    Post subject: Re: Remove one Device Reply with quote
TazBag wrote:
Hello, i try to search, but i not find if is possible.

In my network, sometime i connect one device only one time, never reconnect again. Is possible to delete from YAMon?

From Device Tab and from all usage report? Smile

Thank's in advice

It will naturally go away if there is no data for the device in the following months. Otherwise, the only other way is to remove it by hand from users.js on your router.

Does this help?

Al
al_c
DD-WRT Guru


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

PostPosted: Wed Sep 20, 2017 1:22    Post subject: Reply with quote
jakehm wrote:
ddaniel51 wrote:
jakehm wrote:
ddwrt bandwidth monitoringsays 10Mbps.
Yamon live usage says 0.11 KB/S.

What is going on?


ddwrt is 1 second slices in mega bits and Yamon is 30 second averages in mega bytes. They'll never look even remotely the same.


the y axis on that graph is labeled KB/s. So what am i missing?

Sorry... not following. Can you send a screen shot to questions@usage-monitoring.com?

Thx
scope2
DD-WRT User


Joined: 12 Jul 2017
Posts: 183

PostPosted: Wed Sep 20, 2017 15:45    Post subject: Reply with quote
al_c wrote:
scope2 wrote:
al_c wrote:
Everything is functioning as designed...


Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.

I will manually export the users.js file, I rarely make any changes to it anyway. Smile

aahhh... now I understand.

In config.file, you can specify whether or not you want a daily backup and where to store those files. The default location for the backups is the within the `daily-bu` directory (which is also on your memory stick so won't help at all if the stick fails). But you can specify an absolute path to point the backups to your NAS.

Is that closer to what you want?

Al


Yes it probably is, actually.. I dont need it real time, once a day is enough (and probably better for the NAS drive anyway). Smile I will have a look. thanks.
Goto page Previous  1, 2, 3 ... 116, 117, 118 ... 149, 150, 151  Next Display posts from previous:    Page 117 of 151
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