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 ... 81, 82, 83 ... 149, 150, 151  Next
Author Message
artyddwrt
DD-WRT User


Joined: 17 Oct 2016
Posts: 57

PostPosted: Thu Mar 23, 2017 2:55    Post subject: Re: YAMon for Access Point Reply with quote
bilkain wrote:

............

Hi, artyddwrt. Thank you for your help. I can't seem to do much so I guess i'll just use desktop based software. Thanks again for your help.


Are you able to change your setup so that your ddwrt is not setup as an access point, but instead is setup to act like a router with DHCP running? It could act as a router for only those devices it services, and then you would be able to monitor those devices.
Sponsor
al_c
DD-WRT Guru


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

PostPosted: Thu Mar 23, 2017 3:19    Post subject: Re: Problems installing YAMon3 on shibby tomato Reply with quote
zablonski wrote:
Hi Al,

I've been using yamon for a while on DD-wrt with no problems. Recently, I switched to tomato firmware for the bandwidth limiting option and robust qos. On tomato, yamon is installing with errors, and the reports page (192.168.1.1/user/index.html) is coming up blank even though yamon is running.

My tomato build mounts the flash disk to /mnt/sda1. I set the router to bind it to /opt (mount -o bind /mnt/sda1 /opt). I get the errors whether I bind to /opt or not.

A screenshot of the errors is attached. I have very little experience with linux, so please excuse any ignorance on my part.

Any help you can provide would be great. Thanks!


There's a more than ample supply of ignorance to go around! Don't be shy, you're more than welcome to all of mine. For example, I'm profoundly ignorant with respect to Tomato. One day I'll flash one of my routers to Tomato but in the mean time, I'll depend on good souls like you to assist with the effort.

Thanks for the detailed screenshots, that really helps me track issues down. I think I can fix a number of the issues on my own... but might need some help for others - e.g.
what is the path to the dnsmasq.conf and dnsmasq.lease files in Tomato

Did the script create a setup.log file in /mnt/sda1/YAMon3/logs? If yes, can you send that to questions@usage-monitoring.com?

Thx
zablonski
DD-WRT Novice


Joined: 22 Mar 2017
Posts: 2

PostPosted: Thu Mar 23, 2017 8:15    Post subject: Re: Problems installing YAMon3 on shibby tomato Reply with quote
al_c wrote:
Thanks for the detailed screenshots, that really helps me track issues down. I think I can fix a number of the issues on my own... but might need some help for others - e.g.
what is the path to the dnsmasq.conf and dnsmasq.lease files in Tomato

Did the script create a setup.log file in /mnt/sda1/YAMon3/logs? If yes, can you send that to questions@usage-monitoring.com?

Thx


File locations are:

/tmp/etc/dnsmasq.conf
/tmp/var/lib/misc/dnsmasq.leases

Symlinks to /tmp/etc and /tmp/var are located in /
Don't know if that's relevant.

I'll send setup.log shortly. Thanks for your help!
al_c
DD-WRT Guru


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

PostPosted: Fri Mar 24, 2017 14:33    Post subject: Programming `doh` moments Reply with quote
I've been perplexed for some time because my `differences` graph on the Daily Usage tab often starts the day with a big delta between the router and YAMon tallies.

As I was running an errand in the car last night, it suddenly occurred to me what might be causing the issue. I have no idea why it popped into my mind, but it did.

Every day just after midnight, the script runs a block of code that updates the names of the data and log files. Several months (years?) ago, I added some lines to also flush the YAMon iptable chains (with the intent of removing stale IP addresses and perhaps shaving a few micro seconds from the execution time).

The main loop of the script looks like something like this:

  • check times (and possibly run the block described above)
  • update usage
  • pause (to ensure that the loop executes as per the value of `_updatefreq` in your config.file

This means that I am flushing ~30seconds worth of traffic from the totals every day... DOH!

I deleted the lines of code from my script last night and noticed a much smaller difference this AM. Before releasing an update, I'm going to let things run at my end to see if this continues and if there are any unexpected consequences.

If anyone else wants to try this themselves, the `offending` code is in yamon3.2.5.sh - in particular lines 553-558:
Code:
   send2log "   >>> Flushing iptables chains..." 0
   if [ "$_useTMangle" -eq "0" ] ; then
      $(iptables -F "$YAMON_IP4")
   else
      $(iptables -t mangle -F "$YAMON_IP4")
   fi


You can either remove the lines altogether or preface them with a `#` to comment them out.

Then run restart.sh

I'll let you know how this goes.

Again, Doh!

Al
artyddwrt
DD-WRT User


Joined: 17 Oct 2016
Posts: 57

PostPosted: Fri Mar 24, 2017 21:31    Post subject: setup file Reply with quote
Ever since I updated after 3.1.9 (I skipped to 3.2.4 from 3.1.9), when I run install it downloads "setup.sh" and the current "setup3.x.x.sh" but then looks to execute "setup.sh" instead of "setup3.x.x.sh". In fact, now under the 3.2.5 install, for me it even lists the "setup.sh" as not supported when it downloads it, but then still tries to execute it.

It's not a big deal because I just manually execute "setup3.x.x.sh" when it fails to execute "setup.sh".

However, is this just something only I see?
al_c
DD-WRT Guru


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

PostPosted: Fri Mar 24, 2017 22:25    Post subject: Re: setup file Reply with quote
artyddwrt wrote:
Ever since I updated after 3.1.9 (I skipped to 3.2.4 from 3.1.9), when I run install it downloads "setup.sh" and the current "setup3.x.x.sh" but then looks to execute "setup.sh" instead of "setup3.x.x.sh". In fact, now under the 3.2.5 install, for me it even lists the "setup.sh" as not supported when it downloads it, but then still tries to execute it.

It's not a big deal because I just manually execute "setup3.x.x.sh" when it fails to execute "setup.sh".

However, is this just something only I see?


Uh oh... the install.sh should be creating a symlink named setup.sh that points to setup3.x.x.sh... is that not working on your router?!? I'll check things again at my end...

[edit]I just looked and the symlink code is not there... Where did it go? In my mind, I am positive that I added that functionality in install.sh?!?

[edit^2]Fixed... it'll be in the 3.2.6 release when I get to that

Al


Last edited by al_c on Sat Mar 25, 2017 15:43; edited 1 time in total
artyddwrt
DD-WRT User


Joined: 17 Oct 2016
Posts: 57

PostPosted: Sat Mar 25, 2017 14:42    Post subject: Re: YAMon for Access Point Reply with quote
artyddwrt wrote:
bilkain wrote:

............

Hi, artyddwrt. Thank you for your help. I can't seem to do much so I guess i'll just use desktop based software. Thanks again for your help.


Are you able to change your setup so that your ddwrt is not setup as an access point, but instead is setup to act like a router with DHCP running? It could act as a router for only those devices it services, and then you would be able to monitor those devices.



Zakaron at this thread is using ddwrt for his wireless clients, with DNSMasq for dhcp for those wireless clients, separate from a main dhcp (for I am presuming his other clients). I suspect that Yamon would work in that sort of a setup for monitoring the wireless clients, without ddwrt needing to be setup as an access point.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=308065&highlight=

.
al_c
DD-WRT Guru


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

PostPosted: Sat Mar 25, 2017 15:46    Post subject: Reply with quote
I just added a topic on the help page that summarizes the steps necessary to perform a clean install - see http://usage-monitoring.com/help/?t=remove

At this point, I do not plan (in the short run at least) to write a script that automates steps 2, 3 & 4. If someone wants to take a run at it... have at it!

(You can also use theses steps to completely remove all traces of YAMon... but no-one would ever want to do that... right??? Smile)
bilkain
DD-WRT Novice


Joined: 14 Oct 2014
Posts: 5

PostPosted: Sun Mar 26, 2017 17:34    Post subject: error Reply with quote
Hi, Al,

I'm trying to reinstall Yamon3 and got this error:

YAMon will be started following a delay of 10 seconds.

NB - depending on your router and firmware, you may have to increase
this delay (to allow other processes to startup properly),
or you may be able to eliminate the delay altogether.
**********************************************************

........../opt/YAMon3/yamon3.2.5.sh: line 986: syntax error: unexpected end of file (expecting ")")


Could you help?

Thank you.

Edit: It seems like manual install fixed the problem. Thank you for all your hard work.
bilkain
DD-WRT Novice


Joined: 14 Oct 2014
Posts: 5

PostPosted: Sun Mar 26, 2017 18:12    Post subject: Re: YAMon for Access Point Reply with quote
[quote="artyddwrt"][quote="bilkain"]
............

Hi, artyddwrt. Thank you for your help. I can't seem to do much so I guess i'll just use desktop based software. Thanks again for your help.[/quote]

Are you able to change your setup so that your ddwrt is not setup as an access point, but instead is setup to act like a router with DHCP running? It could act as a router for only those devices it services, and then you would be able to monitor those devices.[/quote]

Hi, artyddwrt. Sorry, I didn't see this message first. Yes, I read other places so I ended up using the setting you mentioned. Thank you for your help.
al_c
DD-WRT Guru


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

PostPosted: Sun Mar 26, 2017 19:08    Post subject: Re: error Reply with quote
bilkain wrote:
Hi, Al,

I'm trying to reinstall Yamon3 and got this error:

YAMon will be started following a delay of 10 seconds.

NB - depending on your router and firmware, you may have to increase
this delay (to allow other processes to startup properly),
or you may be able to eliminate the delay altogether.
**********************************************************

........../opt/YAMon3/yamon3.2.5.sh: line 986: syntax error: unexpected end of file (expecting ")")


Could you help?

Thank you.

Edit: It seems like manual install fixed the problem. Thank you for all your hard work.


Yes - the `unexpected end of file` is a good indication that wget failed to fully download the file... AFAIK, currently the only way to fix that is to go the manual install route. Sorry.

If DD-WRT (or perhaps more correctly busybox) was updated to support the `curl` function, we wouldn't be having this conversation...
xichael
DD-WRT Novice


Joined: 21 Jun 2007
Posts: 24

PostPosted: Mon Mar 27, 2017 7:00    Post subject: Reply with quote
Hoping you can shed some light on how this random WAN IP from half-way around the world ended up in this otherwise LAN/DHCP filled column from the device list:



It's a bit disconcerting, as this device is my phone.

How is this sort of thing even possible? What does it mean?
gabu69
DD-WRT Novice


Joined: 27 Mar 2017
Posts: 2

PostPosted: Mon Mar 27, 2017 18:00    Post subject: How can I reset all the stats? Reply with quote
Is there any easy way to reset the stats?
BigJohn89
DD-WRT Novice


Joined: 27 Mar 2017
Posts: 2

PostPosted: Mon Mar 27, 2017 21:10    Post subject: YAMon on AsusMerlin Reply with quote
Hi Al,

I am having a few small issues with a new install of YAMon on a router running the AsusMerlin firmware, and was hoping you could help:

1. Just like I had seen another recent post, I have an error originating from line 91 - "command" not found. Any ideas? I did some digging, and it appears it is related to "command -V sort" where the "command" command is missing.

2. I was able to get the web page up and running, I didn't realize that the path needed for www was /tmp/var/wwwext/, however none of the pages I receive have data in them. I do get an error alert #4 regarding the data3/users.js file, however I can confirm that it is there and readable.

3. For some reason, YAMon is saying that I have UPNP enabled, when it is in fact disabled. Will that cause issues? In addition, the setup says that this router is not the DHCP server either (this is the only DHCP server I run).

I also had error lines mentioning dnsmasq.conf and .leases, however symlinks appeared to take care of those.

Any assistance would be greatly appreciated, and if there are any troubleshooting steps that you would like for me to try, please let me know.

Thank you very much!
John



YaMon2.PNG
 Description:
 Filesize:  4.85 KB
 Viewed:  6963 Time(s)

YaMon2.PNG



YaMon1.PNG
 Description:
 Filesize:  17.68 KB
 Viewed:  6963 Time(s)

YaMon1.PNG


artyddwrt
DD-WRT User


Joined: 17 Oct 2016
Posts: 57

PostPosted: Tue Mar 28, 2017 2:35    Post subject: Reply with quote
al_c wrote:
I just added a topic on the help page that summarizes the steps necessary to perform a clean install - see http://usage-monitoring.com/help/?t=remove

At this point, I do not plan (in the short run at least) to write a script that automates steps 2, 3 & 4. If someone wants to take a run at it... have at it!

(You can also use theses steps to completely remove all traces of YAMon... but no-one would ever want to do that... right??? Smile)



Awesome. I had actually been wondering about that. Clearly outlining the iptables cleanup steps is very good to know.

Thanks again for everything you've been doing Al.
Goto page Previous  1, 2, 3 ... 81, 82, 83 ... 149, 150, 151  Next Display posts from previous:    Page 82 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