YAMon 3.4 - usage monitoring for your router

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 34, 35, 36  Next
Author Message
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 92

PostPosted: Wed Nov 07, 2018 14:05    Post subject: Changing monthly data cap Reply with quote
Upgraded my ISP package and that increases the monthly data cap. The yamon readme.txt file states that "config.file" may be changed on the fly so I modified _monthlyDataCap to the new value. This did not update the graph on the main yamon summary report page. Additionally changing monthlyDataCap (no underscore this time) in /opt/YAMon3/data/2018/10/2018-10-mac_data.js with yamon stopped then restarting yamon worked.

Just hoping this information could save others some digging. Your installation and month folder paths will need to be adjusted. Note that I did not have any success with the "Bandwidth Allowance Cap" in the settings tab of the web interface.
Sponsor
Sigals
DD-WRT Novice


Joined: 09 Nov 2018
Posts: 12

PostPosted: Sun Nov 11, 2018 1:01    Post subject: Reply with quote
r8er wrote:
I keep finding no stats for devices in the Live tab. It will work for some time, but not sure how long. Seems that it works for a few hours. This time it worked yesterday, but today it doesn't. this isn't the first time I've seen it. I ran setup.sh last time and it fixed it; now back to this.


ColoradoUser wrote:
YAMon stops running and/or recording data: My problems appear to be identical to that being discussed by aloss and al_c. I have tried the aloss cron job suggestion, with the same result he gets: the cron job keeps YAMon running, but after a few hours all device data drops away. Side note: I see devices continue to appear in the “Live” report, but all have gone to an “unknown” source name in the “live” data – although all devices are still present and properly named in the “devices” tab. So I suspect Al is right about the iptables modifications going south.


I have this issue almost everyday, I love the software but it really is becoming a chore now, I the data on the devices tab is all correct however on the live tab everything shows "unkown"



To fix it I have to export the users.js file again, stop yamon, replace it, then start it back up and it works again.
iotola
DD-WRT Novice


Joined: 29 Oct 2018
Posts: 19
Location: UK

PostPosted: Tue Nov 13, 2018 11:01    Post subject: Large values appearing Reply with quote
Every 5 days or so I get an inexplicably and impossibly large values. I read somewhere on here this could be due to restarting etc, where stopping doesn't actually stop everything. It is a bit of a pain to have to look for these values and zero them.

So does anyone have a script that could just zero any inexplicably large values?
Also if it really is due to not stopping processes correctly does anyone have a script to just kill the floating processes before executing the YAMon start script?
VTecheira
DD-WRT User


Joined: 17 Sep 2014
Posts: 55

PostPosted: Thu Nov 15, 2018 12:38    Post subject: Reply with quote
Sigals wrote:

ColoradoUser wrote:
YAMon stops running and/or recording data: My problems appear to be identical to that being discussed by aloss and al_c. I have tried the aloss cron job suggestion, with the same result he gets: the cron job keeps YAMon running, but after a few hours all device data drops away. Side note: I see devices continue to appear in the “Live” report, but all have gone to an “unknown” source name in the “live” data – although all devices are still present and properly named in the “devices” tab. So I suspect Al is right about the iptables modifications going south.


I have this issue almost everyday, I love the software but it really is becoming a chore now, I the data on the devices tab is all correct however on the live tab everything shows "unkown"


I've recently noticed this issue as well i.e.YAMon stops recording hourly data, and I've only started doing some digging. It's definitely iptables related as I see this in the log.

Code:
00:01:14        2       checkChainEntries: YAMON34v4 returned only 0 entries?!? Resetting iptables rules


The messages suggests that Al tries to handle it but what is the root trigger is not clear to me yet. It usually takes a few days of running to kick in for me. Because I don't like at live tabs that much, not sure if it's related. I'll keep digging but a YAMon restart fixes.

For my set up here are the potential/unusual things that may help trigger.
1. Running a bridge network and as a result multiple bridge mac entries
2. Doing mobile phone tethering so it's possible that the mobile tethering resets that may be a trigger.
al_c
DD-WRT Guru


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

PostPosted: Thu Nov 15, 2018 13:36    Post subject: Re: Changing monthly data cap Reply with quote
yoyoma2 wrote:
Upgraded my ISP package and that increases the monthly data cap. The yamon readme.txt file states that "config.file" may be changed on the fly so I modified _monthlyDataCap to the new value. This did not update the graph on the main yamon summary report page. Additionally changing monthlyDataCap (no underscore this time) in /opt/YAMon3/data/2018/10/2018-10-mac_data.js with yamon stopped then restarting yamon worked.

Just hoping this information could save others some digging. Your installation and month folder paths will need to be adjusted. Note that I did not have any success with the "Bandwidth Allowance Cap" in the settings tab of the web interface.


I used to keep the bandwidth cap *only* in the config.file.

Now, it is added to the monthly usage file HOWEVER it is added only when the monthly file is created. I currently do not update the value in the active monthly usage file if the value changes mid-month.

So the short answer is next month things should be correct.

You can always modify the active monthly file yourself.

I will look into updating the value (presumably on restart and/or if I detect a change in your config.file).

Al
al_c
DD-WRT Guru


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

PostPosted: Thu Nov 15, 2018 13:41    Post subject: Reply with quote
Sigals wrote:
r8er wrote:
I keep finding no stats for devices in the Live tab. It will work for some time, but not sure how long. Seems that it works for a few hours. This time it worked yesterday, but today it doesn't. this isn't the first time I've seen it. I ran setup.sh last time and it fixed it; now back to this.


ColoradoUser wrote:
YAMon stops running and/or recording data: My problems appear to be identical to that being discussed by aloss and al_c. I have tried the aloss cron job suggestion, with the same result he gets: the cron job keeps YAMon running, but after a few hours all device data drops away. Side note: I see devices continue to appear in the “Live” report, but all have gone to an “unknown” source name in the “live” data – although all devices are still present and properly named in the “devices” tab. So I suspect Al is right about the iptables modifications going south.


I have this issue almost everyday, I love the software but it really is becoming a chore now, I the data on the devices tab is all correct however on the live tab everything shows "unkown"



To fix it I have to export the users.js file again, stop yamon, replace it, then start it back up and it works again.


What is happening to your users.js on the router? Is it getting corrupted in someway?

Otherwise I'm baffled as to why re-exporting is necessary?!?
Sigals
DD-WRT Novice


Joined: 09 Nov 2018
Posts: 12

PostPosted: Thu Nov 15, 2018 17:28    Post subject: Reply with quote
al_c wrote:
Sigals wrote:
r8er wrote:
I keep finding no stats for devices in the Live tab. It will work for some time, but not sure how long. Seems that it works for a few hours. This time it worked yesterday, but today it doesn't. this isn't the first time I've seen it. I ran setup.sh last time and it fixed it; now back to this.


ColoradoUser wrote:
YAMon stops running and/or recording data: My problems appear to be identical to that being discussed by aloss and al_c. I have tried the aloss cron job suggestion, with the same result he gets: the cron job keeps YAMon running, but after a few hours all device data drops away. Side note: I see devices continue to appear in the “Live” report, but all have gone to an “unknown” source name in the “live” data – although all devices are still present and properly named in the “devices” tab. So I suspect Al is right about the iptables modifications going south.


I have this issue almost everyday, I love the software but it really is becoming a chore now, I the data on the devices tab is all correct however on the live tab everything shows "unkown"



To fix it I have to export the users.js file again, stop yamon, replace it, then start it back up and it works again.


What is happening to your users.js on the router? Is it getting corrupted in someway?

Otherwise I'm baffled as to why re-exporting is necessary?!?


That's just how I was handling it, however I can confirm restarting yamon also fixes the issue for a time.
mason10198
DD-WRT Novice


Joined: 16 Nov 2018
Posts: 1

PostPosted: Fri Nov 16, 2018 1:43    Post subject: Reply with quote
Does anyone know why this is happening and/or how to permanently fix it? I'm getting crazy large numbers about once or twice a month that are throwing my whole report off, and I can't keep going and back digging through the usage files to fix it.


Screen Shot 2018-11-15 at 10.06.12 AM.png
 Description:
 Filesize:  72.84 KB
 Viewed:  756 Time(s)

Screen Shot 2018-11-15 at 10.06.12 AM.png



Screen Shot 2018-11-15 at 10.07.29 AM.png
 Description:
 Filesize:  30.59 KB
 Viewed:  756 Time(s)

Screen Shot 2018-11-15 at 10.07.29 AM.png


ran
DD-WRT Novice


Joined: 30 Jul 2008
Posts: 15

PostPosted: Sat Nov 17, 2018 0:15    Post subject: YAMon needs PuttY window to remain open to run? Reply with quote
So, just got this running on my AC68U.

However, if I close the PuttY window after starting the script, YAMon stops updating.

Any ideas why?
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 1227
Location: Indiana

PostPosted: Sat Nov 17, 2018 1:03    Post subject: Reply with quote
What happens if you start or restart from webgui-Administration>Commands?
_________________
SUPPORTED DEVICES -- DON'T USE ROUTER DATABASE!
--IMPORTANT UPGRADE INFORMATION--STUBBY install guide
Qualcomm-Atheros:
R7800 x2 kongat & BS WDS AP & Sta- R7500V2 BS std WDS STA- WNDR3700v4 BS std WDS STA- Nanostation M2 AirOS- LocoM2 AirOS
Broadcom:
R6200v2 41491std using R6250.chk WLAN Repeater Archer C9 v1 OEM WAP

DDWRT Policy Based Routing Guide by egc
ran
DD-WRT Novice


Joined: 30 Jul 2008
Posts: 15

PostPosted: Sat Nov 17, 2018 4:27    Post subject: Reply with quote
bushant wrote:
What happens if you start or restart from webgui-Administration>Commands?


Thank you for replying. I am unsure of what you are referring to as I used PuttY and WinSCP for all of my configuration.

I believe I've got it running now without the PuTTy window open. However, I find that the auto-logout of 30' prevents YaMon from updating. Is there a way to have YaMon get updates without logging into the router, or do I need to disable the auto-logout?

Thank you again.
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 1227
Location: Indiana

PostPosted: Sat Nov 17, 2018 13:59    Post subject: Reply with quote
ran wrote:

Thank you for replying. I am unsure of what you are referring to as I used PuttY and WinSCP for all of my configuration.

However, I find that the auto-logout of 30' prevents YaMon from updating. Is there a way to have YaMon get updates without logging into the router, or do I need to disable the auto-logout?

You can start or stop or restart YAMon3 from routers webgui.
http://routerip/Diagnostics.asp
IN commands box use
Code:
/pathto/YAMon3/startup.sh  or
/pathto/YAMon3/shutdown.sh  or
/pathto/YAMon3/restart.sh

Then Run Commands.
I have no idea what auto logout is. I do not see it in YAMon3/config.file. If that is part of the setup it has been months since I did that.

_________________
SUPPORTED DEVICES -- DON'T USE ROUTER DATABASE!
--IMPORTANT UPGRADE INFORMATION--STUBBY install guide
Qualcomm-Atheros:
R7800 x2 kongat & BS WDS AP & Sta- R7500V2 BS std WDS STA- WNDR3700v4 BS std WDS STA- Nanostation M2 AirOS- LocoM2 AirOS
Broadcom:
R6200v2 41491std using R6250.chk WLAN Repeater Archer C9 v1 OEM WAP

DDWRT Policy Based Routing Guide by egc
al_c
DD-WRT Guru


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

PostPosted: Sat Nov 17, 2018 18:19    Post subject: Reply with quote
Sigals wrote:
al_c wrote:
Sigals wrote:
r8er wrote:
I keep finding no stats for devices in the Live tab. It will work for some time, but not sure how long. Seems that it works for a few hours. This time it worked yesterday, but today it doesn't. this isn't the first time I've seen it. I ran setup.sh last time and it fixed it; now back to this.


ColoradoUser wrote:
YAMon stops running and/or recording data: My problems appear to be identical to that being discussed by aloss and al_c. I have tried the aloss cron job suggestion, with the same result he gets: the cron job keeps YAMon running, but after a few hours all device data drops away. Side note: I see devices continue to appear in the “Live” report, but all have gone to an “unknown” source name in the “live” data – although all devices are still present and properly named in the “devices” tab. So I suspect Al is right about the iptables modifications going south.


I have this issue almost everyday, I love the software but it really is becoming a chore now, I the data on the devices tab is all correct however on the live tab everything shows "unkown"



To fix it I have to export the users.js file again, stop yamon, replace it, then start it back up and it works again.


What is happening to your users.js on the router? Is it getting corrupted in someway?

Otherwise I'm baffled as to why re-exporting is necessary?!?


That's just how I was handling it, however I can confirm restarting yamon also fixes the issue for a time.


At the top of the live usage tab you should see an entry: `Last update: 2018/11/17 13:14:03` where the date is a link that'll open the most recent live usage data file (by default: http://192.168.1.1/yamon/js/live_data3.js)

When things stop updating, what do you see when you click that link?
al_c
DD-WRT Guru


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

PostPosted: Sat Nov 17, 2018 18:26    Post subject: Reply with quote
mason10198 wrote:
Does anyone know why this is happening and/or how to permanently fix it? I'm getting crazy large numbers about once or twice a month that are throwing my whole report off, and I can't keep going and back digging through the usage files to fix it.


Yikes... generally speaking, I've only ever seen crazy numbers in two circumstances:
1. integer overflow (but those have largely stopped after I wrote my own addition routines)
2. when you somehow get two instances of YAMon running simultaneously... in theory this should not be possible as the script starts, it checks to see if another instance is running but I've seen it happen especially if I'm starting and stopping the script in rapid succession (which leads me to believe there is a race condition somewhere in the code).

Do you have log file from when the numbers went wonky? If yes, can you send them to me? If no, can you set loglevel=0 and wait for it to happen again and then send the logs?

In terms of fixing the issue, unfortunately, it is largely handraulic - i.e., you'll have to manually edit the hourly files. Once those have been fixed, you can run h2m.sh to fix the monthly file.

Thanks!

Al
al_c
DD-WRT Guru


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

PostPosted: Sat Nov 17, 2018 18:33    Post subject: Reply with quote
ran wrote:
bushant wrote:
What happens if you start or restart from webgui-Administration>Commands?


Thank you for replying. I am unsure of what you are referring to as I used PuttY and WinSCP for all of my configuration.

I believe I've got it running now without the PuTTy window open. However, I find that the auto-logout of 30' prevents YaMon from updating. Is there a way to have YaMon get updates without logging into the router, or do I need to disable the auto-logout?

Thank you again.


I'm not familiar with the auto-logout feature... where do you find it?

Did you create the startup/shutdown scripts when you ran setup.sh? (If yes, there'll be entries in the DD-WRT Gui-->Administration-->Commands tab.

Otherwise, I usually manually restart things from a PuTTY window... `/opt/YAMon3/restart.sh 0`
(restart.sh will shutdown any currently running instances and then launch a fresh one. The training `0` parameter tells the script to shutdown and restart right away (with a zero second delay)

Al
Goto page Previous  1, 2, 3 ... 17, 18, 19 ... 34, 35, 36  Next Display posts from previous:    Page 18 of 36
Post new topic   Reply to topic    DD-WRT Forum 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