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 ... 49, 50, 51 ... 107, 108, 109  Next
Author Message
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Mon Nov 24, 2014 0:00    Post subject: Reply with quote
FYI my R7000 is running below .3 on an idle network with Yamon running.

Dave
Sponsor
rseiler
DD-WRT Guru


Joined: 01 Oct 2007
Posts: 622

PostPosted: Mon Nov 24, 2014 3:24    Post subject: Reply with quote
al_c wrote:
Right - the save settings button only appears if you have database integration. Without the database, everything goes into a localStorage variable and should be getting updated automatically when ever you make any changes... it could be that I've broken that in the transition but I hadn't noticed anything on my test config.

OK, thanks. I'll probably try database integration later though will keep things as they are for now in case this actually turns out to be something beyond an issue here and some troubleshooting needs to be done.

ddaniel51 wrote:
FYI my R7000 is running below .3 on an idle network with Yamon running.

Thanks, though that router is radically higher-end than mine, so I can't really compare with it. I can just compare with the script stopped vs started, and it does add about two points even when updating is on 60. Note that both stopped/started figures are not at idle, but then the router is never at idle.
patmtp35
DD-WRT Novice


Joined: 19 Mar 2010
Posts: 41

PostPosted: Mon Nov 24, 2014 8:36    Post subject: Reply with quote
fap = restriction 20gb/ month

al is just what i'm loking for so i'll try to set it up tonight !

thanls for our explanations
patmtp35
DD-WRT Novice


Joined: 19 Mar 2010
Posts: 41

PostPosted: Mon Nov 24, 2014 19:03    Post subject: Reply with quote
i add

var _unlimited_usage=1
var _unlimited_start="23:45"
var _unlimited_end="5:45"

to config.js it's good like that ?
al_c
DD-WRT Guru


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

PostPosted: Mon Nov 24, 2014 19:32    Post subject: Reply with quote
patmtp35 wrote:
i add

var _unlimited_usage=1
var _unlimited_start="23:45"
var _unlimited_end="5:45"

to config.js it's good like that ?


First - the default value for _updatefreq is 15 which means that YAMon updates the internal totals every `_15` seconds... seconds. This means you can set _unlimited_start and _unlimited_end to the actual beginning and end of your unlimited usage interval (there is no need to give 15min buffer)

Second, it has been a long time since I looked closely at that code but I'm pretty sure that both _unlimited_start & _unlimited_end must be on the same side of midnight... so you cannot use the values specified above but you could certainly use:

var _unlimited_usage=1
var _unlimited_start="0:00"
var _unlimited_end="5:45"

Does anyone's unlimited interval start before midnight? If yes, I can look at fixing that limitation. If no, I won't bother?

Also does anyone have more than one unlimited usage interval in the day? I've only heard of them being in the wee hours of the morning.

Al
patmtp35
DD-WRT Novice


Joined: 19 Mar 2010
Posts: 41

PostPosted: Mon Nov 24, 2014 19:49    Post subject: Reply with quote
ok i ll give a try tonigh with 0:00
rseiler
DD-WRT Guru


Joined: 01 Oct 2007
Posts: 622

PostPosted: Mon Nov 24, 2014 23:04    Post subject: Reply with quote
I updated another router today with 17b and see the same inability to save Settings, so it does appear to be a regression (again, with the save-to-server feature unused).

I think "_ispBillingDay" is inadvertently set to 5 in the default config file (description says it defaults to 1). I only noticed it because of the yellow exclamation point.

I did a little more testing of the server load on same-model routers (set with _updatefreq=60). My router when supporting a household averages about 1 without the script and 3 with (sometimes a little lower but often higher). When at "idle" (meaning just one device doing basically nothing), it's more like 0.1 without and 0.3 with. So it's 3x either way.
ericd
DD-WRT Novice


Joined: 08 May 2013
Posts: 4

PostPosted: Tue Nov 25, 2014 1:36    Post subject: java script error Reply with quote
Hi Al,
Than you for the bandwidth monitor software. I use it often.
I am getting a java script error in both 2.16 and 2.17b in the browser:
yamon.js:714 Uncaught ReferenceError: users_created is not defined
http://192.168.1.1/user/yamon2.html Failed to load resource: net::ERR_CACHE_MISS

Can you suggest a solution to resolve the error?
Thanks,
Eric
al_c
DD-WRT Guru


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

PostPosted: Tue Nov 25, 2014 3:19    Post subject: Re: java script error Reply with quote
ericd wrote:
Hi Al,
Than you for the bandwidth monitor software. I use it often.
I am getting a java script error in both 2.16 and 2.17b in the browser:
yamon.js:714 Uncaught ReferenceError: users_created is not defined
http://192.168.1.1/user/yamon2.html Failed to load resource: net::ERR_CACHE_MISS

Can you suggest a solution to resolve the error?
Thanks,
Eric

The first line of your users.js file should be something like:
Code:
var users_created="2014-04-16 23:35:37"


If the script is saying that the variable does not exist, it could mean that you users.js has become corrupted. Can you send your file to me in a PM?

Look in /opt/YAMon2/daily-bu2/... you should be able to find a recent version of the file which should get you up and running again (copy the backup to /opt/YAMon2/data and to /tmp/www/data)

Let me know if that helps.

Al
ericd
DD-WRT Novice


Joined: 08 May 2013
Posts: 4

PostPosted: Tue Nov 25, 2014 3:41    Post subject: Reply with quote
Hi Al,
Adding the first line to the users.js file (as you suggested) fixed the problem. Perhaps I had inadvertently deleted it when I edited the file.
Thanks!
Eric
patmtp35
DD-WRT Novice


Joined: 19 Mar 2010
Posts: 41

PostPosted: Tue Nov 25, 2014 8:12    Post subject: Reply with quote
hi al!

it rocks ! al is working perfectly with the unlimited interval 00:00 5:45.

regards
al_c
DD-WRT Guru


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

PostPosted: Tue Nov 25, 2014 14:19    Post subject: Reply with quote
ericd wrote:
Hi Al,
Adding the first line to the users.js file (as you suggested) fixed the problem. Perhaps I had inadvertently deleted it when I edited the file.
Thanks!
Eric

D'oh! Smile
al_c
DD-WRT Guru


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

PostPosted: Tue Nov 25, 2014 14:20    Post subject: Reply with quote
patmtp35 wrote:
hi al!

it rocks ! al is working perfectly with the unlimited interval 00:00 5:45.

regards


Great to hear!
PeterS-ZH
DD-WRT User


Joined: 15 Feb 2011
Posts: 58
Location: Zurich, Switzerland

PostPosted: Wed Nov 26, 2014 23:49    Post subject: Reply with quote
Hello Al

I'm running v2.0.17b and it cannot display the data for Nov 26. It comes up with the error

Code:
Error #4 reading the hourly data file: `data/2014-11-26-hourly_data.js` SyntaxError: missing ) after argument list


and just doesn't show anything in the Daily Usage - and wasn't showing anything before midnight either.

Now that 2014-11-01-mac_data.js has been updated, I find the following line above the block with the 26th data:

Code:
dtp({"day":"26","down":716106572,"up":50762848,"reboots":"1"})


and I do not see the "reboots":"1" anywhere else in that file...


I'm not particularly concerned because the data seems to be there alright, but somehow the behavior does not make too much sense.
The thing that does intrigue a bit is, that also before the 26th data was added to the file, the Daily Usage did not show any data - so somehow the 'reboot' must have been hidden somewhere else as well...

Just thought I'd let you know in case you are not aware of that situation.

Best regards,

Peter
al_c
DD-WRT Guru


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

PostPosted: Thu Nov 27, 2014 3:45    Post subject: Reply with quote
PeterS-ZH wrote:
Hello Al

I'm running v2.0.17b and it cannot display the data for Nov 26. It comes up with the error

Code:
Error #4 reading the hourly data file: `data/2014-11-26-hourly_data.js` SyntaxError: missing ) after argument list


and just doesn't show anything in the Daily Usage - and wasn't showing anything before midnight either.


Ok... there is definitely a bug somewhere in the script. You are the second or third person who has reported the missing `}` issue. If you open the hourly file, somewhere in that file, you will find a line that is missing its closing brace bracket. I believe it may be related to the router rebooting but I cannot confirm this.

I'll look at adding a sanity check somewhere to fix this problem automatically...

PeterS-ZH wrote:


Now that 2014-11-01-mac_data.js has been updated, I find the following line above the block with the 26th data:

Code:
dtp({"day":"26","down":716106572,"up":50762848,"reboots":"1"})


and I do not see the "reboots":"1" anywhere else in that file...
<snip/>

I now include [an estimate of] the number of reboots in the reports...

As I generate the hourly report, you will see that I track the uptime at each hour:
Code:
pnd({"hour":"17","uptime":168302.06,"down":1852962937,"up":383402257})

When the router is rebooted, the value of `uptime` resets to zero. So, as I generate the daily totals from the hourly file, I can the number of times that `uptime` is less than the previous interval to estimate the number of reboots (estimate because this method cannot detect two reboots within the same hour).

Now that I have this info, in the monthly breakdown report, I can flag the days on which there were reboots... hover to get the number - e.g.,


Thanks for the feedback

Al
Goto page Previous  1, 2, 3 ... 49, 50, 51 ... 107, 108, 109  Next Display posts from previous:    Page 50 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