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 ... 72, 73, 74 ... 107, 108, 109  Next
Author Message
deanpeak
DD-WRT User


Joined: 13 Sep 2014
Posts: 70

PostPosted: Sun Jun 14, 2015 3:03    Post subject: Reply with quote
al_c wrote:
deanpeak wrote:


Hey Al, A stupid question but if I don't ask I will not get an answer. Symlink... Currently I have data in the /tmp/... www and in opt/...data directory... can I use one of these as for symlink or do I need to create a new directory? If I can use one of these, I simply update the config file and then update the location in the setting on the report?


When you enable the symlink option in config.file, the script will automatically add a symbolic link for you!

It will create an entry in /tmp/www/ that points back to the actual data files in /opt/YAMon2/data). The script then only has to update the files in that location (and no longer has to `publish` them to /tmp/www/data). I'm still experimenting with the appropriate delay between updates but I 'm seeing a pretty dramatic drop in server loads (often below 10% now).
Al

Hey Al,
I set the Symlink in the config file the other night. The starting having issues where the report would not loaded. I could see where the data file in tmp was not being updated anymore but the data file in opt still seem to be updated. I tried for a while trying to get it to work with no luck. So I decided to work on it in the morning. This morning I was having issues still but I could see it appeared the data file in opt was being updated. I finally copied the data over to the data files in the tmp files and then I could start loading the reports? I then notice some of my device owner/names appeared to be cleared... anyway, I went through and updated all that. This evening I checked the reports and noticed the reports are loading but it seem they are not up to date. they are missing data from during the day. I can see the the data files in opt seem to be getting updated... the tmp data files are not. So before I starting messing with it and make it worse, I thought I would get your thoughts because I a sure it is a simple mistake on my part.
Thanks,
Dean
Sponsor
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Sun Jun 14, 2015 3:25    Post subject: Reply with quote
deanpeak wrote:
al_c wrote:
deanpeak wrote:


Hey Al, A stupid question but if I don't ask I will not get an answer. Symlink... Currently I have data in the /tmp/... www and in opt/...data directory... can I use one of these as for symlink or do I need to create a new directory? If I can use one of these, I simply update the config file and then update the location in the setting on the report?


When you enable the symlink option in config.file, the script will automatically add a symbolic link for you!

It will create an entry in /tmp/www/ that points back to the actual data files in /opt/YAMon2/data). The script then only has to update the files in that location (and no longer has to `publish` them to /tmp/www/data). I'm still experimenting with the appropriate delay between updates but I 'm seeing a pretty dramatic drop in server loads (often below 10% now).
Al

Hey Al,
I set the Symlink in the config file the other night. The starting having issues where the report would not loaded. I could see where the data file in tmp was not being updated anymore but the data file in opt still seem to be updated. I tried for a while trying to get it to work with no luck. So I decided to work on it in the morning. This morning I was having issues still but I could see it appeared the data file in opt was being updated. I finally copied the data over to the data files in the tmp files and then I could start loading the reports? I then notice some of my device owner/names appeared to be cleared... anyway, I went through and updated all that. This evening I checked the reports and noticed the reports are loading but it seem they are not up to date. they are missing data from during the day. I can see the the data files in opt seem to be getting updated... the tmp data files are not. So before I starting messing with it and make it worse, I thought I would get your thoughts because I a sure it is a simple mistake on my part.
Thanks,
Dean

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy
al_c
DD-WRT Guru


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

PostPosted: Sun Jun 14, 2015 17:45    Post subject: Reply with quote
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al
al_c
DD-WRT Guru


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

PostPosted: Sun Jun 14, 2015 18:01    Post subject: updates to JS files... Reply with quote
I just pushed an update to the JS (&CSS) files at usage-monitoring.com.

I have changed/improved the way that the next and previous interval buttons work...
In particular, rather than simply loading the next/previous row in the summary table (as implemented previously), I now calculate the starting date for the interval and if it does not exist, I automagically add it to the summary table.

This fixes my design flaw of how to fill in missing entries in the middle of the summary table. I believe it should also address the previously reported skipping intervals when you click the next/prev interval buttons issue. Can anyone who was experiencing this please confirm that it has been resolved (via a PM to me)

This updated does not require any changes to your router.

If you are using the hosted copies of these files (my preferred method), you will get the updates simply by refreshing the reports (or perhaps by hitting ctrl+F5 to force a refresh).

If not, (i.e., you are using local copies of these files) you will have to download a fresh copy (easiest way to do that is to restart the script).

TIA

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Mon Jun 15, 2015 3:01    Post subject: Reply with quote
al_c wrote:
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al


Will config.js have a corresponding entry if Organize is set to 0? Reason i asked is there is no Organize entry in my config.js.

Dave

_________________
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
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 776
Location: AR, USA

PostPosted: Mon Jun 15, 2015 3:28    Post subject: Reply with quote
ddaniel51 wrote:
al_c wrote:
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al


Will config.js have a corresponding entry if Organize is set to 0? Reason i asked is there is no Organize entry in my config.js.

Dave

My config.file has _organizeData=2.

/tmp/www/js/config.js does not have an entry for _organizeData.

***EDIT and UPDATE***

Adding "var _organizeData=2" to the bottom of the /tmp/www/js/config.js file fixed it for me.

_________________
R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x
https://pi-hole.net/
https://github.com/DNSCrypt/dnscrypt-proxy
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Mon Jun 15, 2015 4:42    Post subject: Reply with quote
#This:

if [ ! -f "$configjs" ] ; then
send2log " >>> config.js not found... creating new file: $configjs" 2
touch $configjs
fi
configtxt="var _ispBillingDay=$_ispBillingDay
var _wwwData='$wwwDataPath'
var _scriptVersion='$_version'
var _usersFileName='$_usersFileName'
var _usageFileName='$_usageFileName'
var _hourlyFileName='$_hourlyFileName'
var _processors=$processors
var _doLiveUpdates=$_doLiveUpdates"
[ "$_doLiveUpdates" -eq "1" ] && configtxt="$configtxt
var _updatefreq=$_updatefreq
var _liveFileName='./$_wwwJS$_liveFileName'
var _doCurrConnections=$_doCurrConnections"
configtxt="$configtxt
var _unlimited_usage=$_unlimited_usage"
[ "$_unlimited_usage" -eq "1" ] && configtxt="$configtxt
var _unlimited_start='$_unlimited_start'
var _unlimited_end='$_unlimited_end'
var _organizeData='$_organizeData'"

#Creates this:

var _ispBillingDay=16
var _wwwData='data/'
var _scriptVersion='2.1.0b'
var _usersFileName='users.js'
var _usageFileName='mac_data.js'
var _hourlyFileName='hourly_data.js'
var _processors=4
var _doLiveUpdates=1
var _updatefreq=12
var _liveFileName='./js/live_data.js'
var _doCurrConnections=1
var _unlimited_usage=0
var _dbkey='d24e26 truncated'

#What happened to Organize?

_________________
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
al_c
DD-WRT Guru


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

PostPosted: Mon Jun 15, 2015 4:43    Post subject: Organize data should work if you download 2.1.0c Reply with quote
I just posted an updated zip file to the first page of this thread. This new version (2.1.0c) fixes a boneheaded bug that prevented many of you from using the new `_organizeData` parameter in config.file.

It was not working for you because the necessary variable was not always written to /tmp/www/js/config.js.

Why? Because I accidentally appended that line of code to a statement which is only executed if `_unlimited_usage` is enabled in `config.file`... which it is in mine but (obviously) not so in many of yours.

Sorry for the inconvenience. Thanks to every one who helped track down this issue.

Al
al_c
DD-WRT Guru


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

PostPosted: Mon Jun 15, 2015 4:47    Post subject: Reply with quote
ddaniel51 wrote:
What happened to Organize?

This is what happened:
Code:
[ "$_unlimited_usage" -eq "1" ] && configtxt="$configtxt
var _unlimited_start='$_unlimited_start'
var _unlimited_end='$_unlimited_end'
var _organizeData='$_organizeData'"

`organizeData` would only get appended to the string if `_unlimited_usage=1`... doh!

Al
deanpeak
DD-WRT User


Joined: 13 Sep 2014
Posts: 70

PostPosted: Mon Jun 15, 2015 16:46    Post subject: Reply with quote
al_c wrote:
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al

Hey Al,
I have not set the Organized data... Only the symlink. I am having problems with viewing the report. If I am able to view it the report, it is not current. I can see the the data file is being updated in the opt directory and not in tmp which I believe is correct...
al_c
DD-WRT Guru


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

PostPosted: Mon Jun 15, 2015 19:31    Post subject: Reply with quote
deanpeak wrote:
al_c wrote:
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al

Hey Al,
I have not set the Organized data... Only the symlink. I am having problems with viewing the report. If I am able to view it the report, it is not current. I can see the the data file is being updated in the opt directory and not in tmp which I believe is correct...

Have you changed the `Path to Data` (on the Settings tab in the reports) to `data2/`?

If no, please do so. If yes, then there is another issue.

Al
boatingdude
DD-WRT Novice


Joined: 12 Dec 2013
Posts: 24

PostPosted: Mon Jun 15, 2015 22:49    Post subject: Yamon with privoxy Reply with quote
Hi al_c,

I was wondering if you have some new way to run yamon while privoxy is running,

thanks for the great work,
regards
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Mon Jun 15, 2015 23:27    Post subject: Reply with quote
al_c wrote:
deanpeak wrote:
al_c wrote:
HalfBit wrote:

I think I am having the same issue. The information in the top data or data2 directory is shown, but nothing in the year or month folders.

I'm getting the following error:
"Error #4 reading the hourly data file: `data2/2015-06-13-hourly_data.js` Not Found"


What is the value of `_organizeData` in /tmp/www/js/config.js? Does it match the value in your config.file?

Al

Hey Al,
I have not set the Organized data... Only the symlink. I am having problems with viewing the report. If I am able to view it the report, it is not current. I can see the the data file is being updated in the opt directory and not in tmp which I believe is correct...

Have you changed the `Path to Data` (on the Settings tab in the reports) to `data2/`?

If no, please do so. If yes, then there is another issue.

Al


Al, if dean sets his symlink to just data/ then everything will work without other changes also.

That is how mine is run.

Dave

Thanks for finding your bug in the script. I'm now running "Organized 2".

_________________
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
al_c
DD-WRT Guru


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

PostPosted: Tue Jun 16, 2015 16:07    Post subject: Reply with quote
ddaniel51 wrote:


Al, if dean sets his symlink to just data/ then everything will work without other changes also.

That is how mine is run.

Dave

Thanks for finding your bug in the script. I'm now running "Organized 2".


Yes (once you upgrade to 2.1.0c), you can either edit the value in config.file (and change the symlink path to `/data` from the default `/data2`) or you must edit the `path to data` value on the Settings tab in the reports. Either will work (they just have to be pointing to the same location).

I used `data2` for the symlink because I was jumping back and forth between the two options and did not want one dataset to clobber the other.

I think that I will turn the symlink option on by default in the future (and will likely revert the path to `data`).

Thanks for you assistance and input.

Al
deanpeak
DD-WRT User


Joined: 13 Sep 2014
Posts: 70

PostPosted: Wed Jun 17, 2015 13:20    Post subject: Reply with quote
al_c wrote:
ddaniel51 wrote:


Al, if dean sets his symlink to just data/ then everything will work without other changes also.

That is how mine is run.

Dave

Thanks for finding your bug in the script. I'm now running "Organized 2".


Yes (once you upgrade to 2.1.0c), you can either edit the value in config.file (and change the symlink path to `/data` from the default `/data2`) or you must edit the `path to data` value on the Settings tab in the reports. Either will work (they just have to be pointing to the same location).

I used `data2` for the symlink because I was jumping back and forth between the two options and did not want one dataset to clobber the other.

I think that I will turn the symlink option on by default in the future (and will likely revert the path to `data`).

Thanks for you assistance and input.

Al

I upgraded to 2.1.0c last night... made the few tweaks in the config file before coping the new files over and it worked with out issue so far.... I have not tried the organized data feature yet. Seems I need to run a process before turning on this feature?
Goto page Previous  1, 2, 3 ... 72, 73, 74 ... 107, 108, 109  Next Display posts from previous:    Page 73 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