I haven't pinpointed the root cause of it yet (because frankly I haven't had the time to fully investigate) but I can confirm this behavior as well. Simply restarting YAMon resolves it. At some point through the processes of DD-WRT and/yamon the yamon iptables gets mangled. It's seems to take 1 - 3 days to occur. At least on my setup. I also make liberal use of other services so that may be a contributing factor.
A quick and dirty work around I started using to avoid the problem was setting a cron job to restart YAMon at 3:45AM and I've never seen the problem when I did that.
I'll probably mod my local copy to do a restart when that message is seen in the logs. Now oddly enough, the last time I looked in the logs it looks like Al does try to reset the entries when the message occurs but it must be different from standard start up.
In case someone has more time than I do, here's how I plan to investigate.
1. Take a full list of iptables right after YAMon starts.
2. Monitor the log for the next occurrence of the error.
3. When it occurs, increase logging to maximum for one hour and try to review the logs to identify root cause.
4. Put some mechanism to reset the iptables similar to what a restart does.
I need to restart my YAMon every 1-2 days as well. I found the script to restart it daily and it appears to have solved it for the most part. _________________ Netgear R8000 - r50814 std - Main Router
Asus RT-AC68R -r46329 std - AP
Asus RT-AC68R -r46329 std - AP
TEW811DRU -r50595 mini - AP
TEW811DRU -r50595 mini - AP
I've got a couple of general questions. Maybe these have been answered previously...
Q1: On the Daily Usage Report there is a small seciont for "Local Traffic:" How does this work or get setup? My entry is blank. Should it be?
Q2: On the Monthly Report there is a line "Corrections". What can we do with this if anything?
Thanks
RE: local traffic - A couple of releases ago, I added iptables chains called YAMON34v<x>Entry & YAMON34v<x>Local (one set of chains for IP v4 and another for IP v6 if that option is enabled). The `Entry` chain contains rules to catch traffic between `internal` & `private` ip addresses - e.g., traffic between addresses within the 192.168.x.x block or from 192.168.x.x to 10.0.0.x (or vice versa), etc. Those entries `jump` to the Local chain to calculate a gross total of the internal traffic. Traffic which does not match any of the internal rules falls into the YAMON34v<x> chain which then tallies traffic on a per IP basis. Without this logic in iptables, the reports would include internal traffic in the device totals which could cause discrepancies with your ISP totals.
The `internal` & `private` values are defined in /includes/defaults.sh:
As of 3.4.5, there is an `_local_ip6` option in config.file which provides greater control for the IP 6 entries... I can't exactly recall why I added this only for IPv6 but I think I was getting different IPv6 ranges in different firmware variants.
I haven't looked recently but AFAIK that is still working properly.
RE: corrections - a *long* time ago (when the script was crapping out or producing incorrect numbers) I added, on the `Daily Usage` tab, the ability to add a `Correction` so that my daily & monthly totals would better match those of my ISP. If you click on the gear icon in the top right corner of the table (on the Daily usage tab), the dialog will open and you can enter a reason for the correction and your estimated missing traffic (in MB). Once you've entered this information, a `corrections` row will be shown at the bottom of the daily table and the total of your corrections will appear at the bottom of the monthly table
Further, on the monthly breakdown table you'll see an exclamation point beside that day to show that a correction was added (hover over the date to see the details of the correction)
I should probably hide the corrections row on the monthly table if there aren't any.
I haven't pinpointed the root cause of it yet (because frankly I haven't had the time to fully investigate) but I can confirm this behavior as well. Simply restarting YAMon resolves it. At some point through the processes of DD-WRT and/yamon the yamon iptables gets mangled. It's seems to take 1 - 3 days to occur. At least on my setup. I also make liberal use of other services so that may be a contributing factor.
A quick and dirty work around I started using to avoid the problem was setting a cron job to restart YAMon at 3:45AM and I've never seen the problem when I did that.
I'll probably mod my local copy to do a restart when that message is seen in the logs. Now oddly enough, the last time I looked in the logs it looks like Al does try to reset the entries when the message occurs but it must be different from standard start up.
In case someone has more time than I do, here's how I plan to investigate.
1. Take a full list of iptables right after YAMon starts.
2. Monitor the log for the next occurrence of the error.
3. When it occurs, increase logging to maximum for one hour and try to review the logs to identify root cause.
4. Put some mechanism to reset the iptables similar to what a restart does.
I need to restart my YAMon every 1-2 days as well. I found the script to restart it daily and it appears to have solved it for the most part.
ATM - in v3.4.5 (and before) if it appears that the iptable chain is messed up, the code tries to fix the entries. I've got 3.4.6 running on my router where restart.sh is run when the bad state is detected. It appears to be working when I manually flush the chain. I'm going to run some more tests and likely post an update on the weekend. I've added a couple of dumps of the contents of iptables as well so that the log'll provide a better idea of what was happening just prior to restarting.
What I don't like about this solution is that I still do not understand what is corrupting the chains in iptables. In fact if the error message is `YAMON34v4 returned only 0 entries` it likely means that the chain has been deleted which is not possible unless iptables has been completely reset (i.e., you cannot delete the YAMON34v4 chain if there are any references to it from other chains?!?)
I've got a couple of general questions. Maybe these have been answered previously...
Q1: On the Daily Usage Report there is a small seciont for "Local Traffic:" How does this work or get setup? My entry is blank. Should it be?
Q2: On the Monthly Report there is a line "Corrections". What can we do with this if anything?
Thanks
RE: local traffic - A couple of releases ago, I added iptables chains called YAMON34v<x>Entry & YAMON34v<x>Local (one set of chains for IP v4 and another for IP v6 if that option is enabled). The `Entry` chain contains rules to catch traffic between `internal` & `private` ip addresses - e.g., traffic between addresses within the 192.168.x.x block or from 192.168.x.x to 10.0.0.x (or vice versa), etc. Those entries `jump` to the Local chain to calculate a gross total of the internal traffic. Traffic which does not match any of the internal rules falls into the YAMON34v<x> chain which then tallies traffic on a per IP basis. Without this logic in iptables, the reports would include internal traffic in the device totals which could cause discrepancies with your ISP totals.
The `internal` & `private` values are defined in /includes/defaults.sh:
As of 3.4.5, there is an `_local_ip6` option in config.file which provides greater control for the IP 6 entries... I can't exactly recall why I added this only for IPv6 but I think I was getting different IPv6 ranges in different firmware variants.
I haven't looked recently but AFAIK that is still working properly.
RE: corrections - a *long* time ago (when the script was crapping out or producing incorrect numbers) I added, on the `Daily Usage` tab, the ability to add a `Correction` so that my daily & monthly totals would better match those of my ISP. If you click on the gear icon in the top right corner of the table (on the Daily usage tab), the dialog will open and you can enter a reason for the correction and your estimated missing traffic (in MB). Once you've entered this information, a `corrections` row will be shown at the bottom of the daily table and the total of your corrections will appear at the bottom of the monthly table
Further, on the monthly breakdown table you'll see an exclamation point beside that day to show that a correction was added (hover over the date to see the details of the correction)
I should probably hide the corrections row on the monthly table if there aren't any.
Does this help?
Al
Absolutely! Thanks for the info. _________________ Netgear R7800: DD-WRT v3.0-r47822 std (12/09/21)
Linksys wrt1900acsV2: DD-WRT v3.0-r47822 std (12/09/21)
When starting yamon with startup.sh after telneting into the router, my terminal would always hang on exit. By adding these lines to yamon3.4.5.sh to detach from the terminal just before the main loop, exiting from the terminal now returns cleanly to the host from which the telnet was made. This assumes that yamon doesn't do terminal I/O once running in background.
Code:
$send2log ">>> Starting main loop" 1
# Detach from terminal
exec 0>&- # close stdin
exec 1>&- # close stdout
exec 2>&- # close stderr
Just tested under Windows with putty. In the Session dialog's Close window on exit section with Only on clean exit selected putty will hang on exit after yamon's startup.sh. With the above change, telnet exits cleanly and the putty window closes as it should.
Obviously fixing the corrupt iptables is higher priority but it would be nice if this terminal hang was eventually fixed too.
My terminal never hangs when ending a YAMon session but, then again I don't use putty. _________________ 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
My terminal never hangs when ending a YAMon session but, then again I don't use putty.
The terminal hangs when you exit dd-wrt (exit or Ctrl-D) after you started yamon with startup.sh within that session. If you then telnet in from another terminal and stop yamon with shutdown.sh, the previously hung terminal will immediately unhang and exit cleanly. Tested with putty on Windows and gnome terminal on linux.
My terminal never hangs when ending a YAMon session but, then again I don't use putty.
The terminal hangs when you exit dd-wrt (exit or Ctrl-D) after you started yamon with startup.sh within that session. If you then telnet in from another terminal and stop yamon with shutdown.sh, the previously hung terminal will immediately unhang and exit cleanly. Tested with putty on Windows and gnome terminal on linux.
I've never noticed it either but looks like a simple update. I'll get it into 3.4.6. I'll do a little testing but I expect that I'll have to add a check on the value of `_log2file`.
Posted: Mon Jan 21, 2019 15:52 Post subject: _append_PPPOE setting?!?
Sort of an embarrassing question back to the community
I was digging through multiple versions of files and found a copy of config.file with a parameter named `_append_PPPOE` with the comment 'option to append a PPPOE entry to the ifconfig list'
Apparently I was just getting started on something because the parameters been added but there is no code elsewhere in the files.
Now the embarrassing part... does anyone out there know what this parameter was supposed to do? ATM I have no recollection and cannot file any emails about this.
I've changed the way that the code handles bad entries in iptables... in the past it tried to recreate the iptables entries; now it runs restart.sh. I still do not know why/how the iptables entries are getting corrupted though (and that is problematic).
on start-up the script iterates through the static leases and updates users.js if there are any changes
there is a new parameter in config.file (or at least default_config.file) that allows you to ignore the incomplete mac entries... the downside of doing this is that YAMon's totals might miss small amounts of traffic for the `incomplete` entries.
In addition, I've included the code suggested by yoyoma2 to detach from terminal (and prevent PuTTY/telnet hangs after launching YAMon). There's likely a number of other small modifications that I've forgotten.
It's been a while since I last posted an update... So in case you've forgotten how to get the latest and greatest files, you can
- on your router, re-run `/opt/install.sh`
- or, again on the router, run `/opt/YAMon3/compare.sh`; hit return to choose the current (production) server and then enter `s` to sync with the servier. Finally hit `r` to restart.
- or, go to the downloads page to get a fresh version of install.sh
- or, go to the Manual Install page to get the individual files.
As always, let me know if I've messed up anything.
When installing YAMon 3.4.6 the "install.sh" wants to call "setup.sh" but the file is still called "setup3.4.6.sh". I tweaked it and it installed but even with SFE off it's not tracking the data. Is it Ok that there's a lot of YAMon entries in iptable?
EDIT: Also, if I do a clean install the config file wants to store data in "data3" & "live_data3.js" but the default says "data" & "live_data.js".
EDIT2: With a clean install it tries to load the data from the start of the month (for me it's 5), saying:
Quote:
Please check paths to ensure that the file exists: data/2019-01-05-mac_data.js
But the file doesn't exist and it seems to refuse to continue.