Posted: Thu Mar 23, 2017 2:55 Post subject: Re: YAMon for Access Point
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.
Posted: Thu Mar 23, 2017 3:19 Post subject: Re: Problems installing YAMon3 on shibby tomato
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?
Posted: Thu Mar 23, 2017 8:15 Post subject: Re: Problems installing YAMon3 on shibby tomato
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?
Posted: Fri Mar 24, 2017 14:33 Post subject: Programming `doh` moments
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.
Posted: Fri Mar 24, 2017 21:31 Post subject: setup file
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".
Posted: Fri Mar 24, 2017 22:25 Post subject: Re: setup file
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
Posted: Sat Mar 25, 2017 14:42 Post subject: Re: YAMon for Access Point
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.
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??? )
Posted: Sun Mar 26, 2017 17:34 Post subject: error
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.
Posted: Sun Mar 26, 2017 18:12 Post subject: Re: YAMon for Access Point
[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.
Posted: Sun Mar 26, 2017 19:08 Post subject: Re: error
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...
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?
Posted: Mon Mar 27, 2017 21:10 Post subject: YAMon on AsusMerlin
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.
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??? )
Awesome. I had actually been wondering about that. Clearly outlining the iptables cleanup steps is very good to know.