YAMon 3.4 - usage monitoring for your router

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


Joined: 24 Sep 2016
Posts: 371

PostPosted: Wed Sep 11, 2019 17:38    Post subject: Reply with quote
Sounds great. Glad ipv4 is first.

I often would get a message that my usage data had holes. Eventually I found out that changing "Additional Cron Jobs" in Administration->Management and applying would kill yamon and a few other of my custom background tasks. I now have a cron job that periodically tests for yamon and restarts it if dead. If yamon 4 is 100% cron based then dying background task is no longer an issue. There is a workaround for cron falling asleep.

Aren't you missing a "root" for dd-wrt? It is important that you include "root" before the command
Sponsor
al_c
DD-WRT Guru


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

PostPosted: Wed Sep 11, 2019 17:55    Post subject: Reply with quote
yoyoma2 wrote:
Sounds great. Glad ipv4 is first.

I often would get a message that my usage data had holes. Eventually I found out that changing "Additional Cron Jobs" in Administration->Management and applying would kill yamon and a few other of my custom background tasks. I now have a cron job that periodically tests for yamon and restarts it if dead. If yamon 4 is 100% cron based then dying background task is no longer an issue. There is a workaround for cron falling asleep.

Aren't you missing a "root" for dd-wrt? It is important that you include "root" before the command

Thanks for the input. I'm building and testing on my Turris Omnia which runs a flavour of Openwrt... it does not require the root field (which goes back to my firmware-specific foibles comment).

I will definitely be dusting off my DD-WRT test router before releasing things into the wild. (And will be looking for guinea pigs too)
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Wed Sep 11, 2019 23:50    Post subject: Reply with quote
Squeak squeak, chitter.
_________________
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
ggee
DD-WRT Novice


Joined: 17 Apr 2017
Posts: 12

PostPosted: Sat Sep 14, 2019 4:01    Post subject: Reply with quote
I'm running 3.4.7 and I recently updated the dd-wrt firmware on my ArcherC9v1 and it looks like it is tracking the wrong interface for stats. I also run MRTG and I saw that the ppp0 interface moved from SNMP index 2 to 9. How can I tell what interface YAMon is looking at?

I have noticed this.

Code:

Measured @ Router:  939.7    85.8    1.0    3855.4
Difference:               921.9    77.7    999.6    -
al_c
DD-WRT Guru


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

PostPosted: Sat Sep 14, 2019 12:23    Post subject: Reply with quote
ggee wrote:
I'm running 3.4.7 and I recently updated the dd-wrt firmware on my ArcherC9v1 and it looks like it is tracking the wrong interface for stats. I also run MRTG and I saw that the ppp0 interface moved from SNMP index 2 to 9. How can I tell what interface YAMon is looking at?

I have noticed this.

Code:

Measured @ Router:  939.7    85.8    1.0    3855.4
Difference:               921.9    77.7    999.6    -
is suspect that the Shortcut Forwarding Engine option us now enabled in the DD-WRT admin GUI...
ggee
DD-WRT Novice


Joined: 17 Apr 2017
Posts: 12

PostPosted: Sat Sep 14, 2019 18:49    Post subject: Reply with quote
al_c wrote:
ggee wrote:
I'm running 3.4.7 and I recently updated the dd-wrt firmware on my ArcherC9v1 and it looks like it is tracking the wrong interface for stats. I also run MRTG and I saw that the ppp0 interface moved from SNMP index 2 to 9. How can I tell what interface YAMon is looking at?

I have noticed this.

Code:

Measured @ Router:  939.7    85.8    1.0    3855.4
Difference:               921.9    77.7    999.6    -
is suspect that the Shortcut Forwarding Engine option us now enabled in the DD-WRT admin GUI...


Yes, I see that on the Setup page. I'll turn off.

Thanks.
VTecheira
DD-WRT User


Joined: 17 Sep 2014
Posts: 56

PostPosted: Sun Sep 15, 2019 23:20    Post subject: Reply with quote
Can you share the data structure to the files. I'm perpetually working on (and slowly progressing on) hook-in functions to store my YAMon data to SQLite. I've had some successful tests but not ready to run on the main router.

Also a while back I shared some bridge for identify MACs/IPs across a bridge it would be very nice to see that rolled in as well.

As an aside, because I haven't really thought it through, YAMon shoud still be able to track traffic the router VPNs right? e.g. wireguard openVPN etc. I'm inclined to think so since ostensibly you (iptables) don't care where the packets go, but I'm not sure.
al_c
DD-WRT Guru


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

PostPosted: Tue Sep 24, 2019 20:51    Post subject: YAMon v4 Update... almost ready for beta testing Reply with quote
YAMon v4 is coming along slowly but all of the major router-side pieces seem to be in place and working well...
* the cron based scripts are running without fail
* new devices are being detected and added to users.js & iptables.
* traffic is being gathered into the hourly data files (and totals are in good agreement with YAMon v3), and
* just today, I completed the code that aggregates the daily totals into the monthly/interval file
(Like many of the other re-written functionality, it's much smaller and seemingly faster than before)

I have been building and testing on my main router (Turris Omnia running a flavour of OpenWRT). The next big steps include:
1) copying the files over to my DD-WRT & LEDE routers and looking for gross firmware issues
2a) getting some beta users who are willing to suffer through a manual install
2b) fixing the issues that they will no doubt find
3) updating the setup and install scripts
4) updatinf the JS files for the reports (because I've made significant changes to how the data is saved... but in a way that will not affect your historic files)
5) Finding/fixing/adding anything else I've missed...

I'll let you know when I'm ready for beta testers.

Thanks for your patience.

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Wed Sep 25, 2019 4:47    Post subject: Re: YAMon v4 Update... almost ready for beta testing Reply with quote
al_c wrote:

I'll let you know when I'm ready for beta testers.

Thanks for your patience.

Al


Have an open-wrt and dd-wrt with latest builds to test with.

Let me know or just email a pkg.

Dave

_________________
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
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Thu Sep 26, 2019 18:23    Post subject: Reply with quote
With the lastest (installer v3.4.8) on startup I get an error that "ip" does not support IPv6.

Code:
 ___     ___   __       ___    ___
 \\\\   ////  //\\     ||||\  /||||   _____   __ ____
  \\\\ ////  ///\\\    ||||\\//||||  ///|\\\  ||//|\\\
   \\\'///  ////\\\\   ||||\\//|||| ////^\\\\ |||/^\|||
    \\|//  ////  \\\\  |||| \/ |||| |||   ||| |||   |||
    ////  //////\\\\\\ ||||    |||| \\\\.//// |||   |||
   ////  ////      \\\\||||    ||||  \\\|///  |||   |||

              Yet Another Monitor (v: 3.4.7)
            Copyright (c) 2013-present Al Caughey
                  All rights reserved.
               http://usage-monitoring.com

!!! Uh-oh !!! the value of '_includeIPv6' has been changed to 0 because yourinstalled version of the ip function does not support IPv6 or the neigh parameter.Please check your config.file and/or your version of busybox.See also http://usage-monitoring.com/help/?t=ipv6-changed

*** _includeIPv6 changed to 0 because the installed version of the ip function
    does not support IPv6 or the neigh parameter.
*** Please check your config.file and/or your version of busybox.



    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~  Your reports URL: http://10.200.10.1/user/index.html
    ~  (subject to some firmware variant oddities)
    ~  If your reports do not open properly, see
    ~     http://usage-monitoring.com/help/?t=reports-help
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I do have "ip_full" installed from Entware and set the path to _path2ip='/opt/sbin/ip' . I also tested '/opt/sbin/ip -6 neigh show' and lists ipv6 addresses.

I down graded to installer v3.4.6 and startups without errors...



Code:
**********************************************************
**********************************************************
 ___     ___   ___       ____   ____
 \\\\   ////  //|\\     |||\\\ ///|||   _____    _  ___
  \\\\ ////  ///A\\\    ||||\\|//||||  ///O\\\  ||N///\\
   \\\|///  //// \\\\   |||| \M/ |||| ///   \\\ |||//|\\\
    \\Y//  ////   \\\\  ||||  V  |||| |||   ||| |||   |||
    ////  //////|\\\\\\ ||||     |||| \\\   /// |||   |||
   ////  ////       \\\\||||     ||||  \\\|///  |||   |||

                  Yet Another Monitor
            Copyright (c) 2013-present Al Caughey
                  All rights reserved.
               http://usage-monitoring.com

    YAMon Version:: 3.4.6

**********************************************************


   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~  Your reports URL: http://10.200.10.1/user/index.html
   ~  (subject to some firmware variant oddities)
   ~  If your reports do not open properly, see
   ~     http://usage-monitoring.com/help/?t=reports-help
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**********************************************************
***  `yamon3.4.6.sh` has been started
**********************************************************

To stop the script:
 * run `shutdown.sh` [*RECOMMENDED*]
      e.g., `/opt/YAMon3/shutdown.sh`
 * or delete the `/tmp/YAMon3.4-running` directory
      e.g., `rmdir /tmp/YAMon3.4-running`

_________________
Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9

Off Site 1

R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4

Off Site 2

R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531


YAMon 3.4.6 | DNSCrypt-Proxy V2
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1464

PostPosted: Fri Sep 27, 2019 21:07    Post subject: Reply with quote
mac913 wrote:
[b]With the lastest (installer v3.4.Cool on startup I get an error that "ip" does not support IPv6.


3.4.8 was kind of a "land mine" and Al advised reverting to an earlier build.

_________________
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
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Sat Sep 28, 2019 4:36    Post subject: Reply with quote
ddaniel51 wrote:
mac913 wrote:
[b]With the lastest (installer v3.4.8) on startup I get an error that "ip" does not support IPv6.


3.4.8 was kind of a "land mine" and Al advised reverting to an earlier build.


It's strange that the 3.4.8 installer shows up as YAMon 3.4.7 too.

_________________
Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9

Off Site 1

R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4

Off Site 2

R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531


YAMon 3.4.6 | DNSCrypt-Proxy V2
SpareSimian
DD-WRT Novice


Joined: 26 Aug 2011
Posts: 15
Location: San Pablo, CA

PostPosted: Tue Oct 01, 2019 13:28    Post subject: Reply with quote
I've managed to get 3.4.7 working on my ZyXEL with OpenWRT. I've been diggging through the sources to understand how things work. I dumped the ip(6)tables to try to find out why I'm getting half my traffic assigned to "no matching MAC".

Why are the INPUT and OUTPUT rules not restricted to the WAN interface? I only want to measure WAN traffic, not LAN traffic to/from the router. Those rules should have an interface qualifier.
al_c
DD-WRT Guru


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

PostPosted: Tue Oct 01, 2019 13:59    Post subject: Reply with quote
SpareSimian wrote:
I've managed to get 3.4.7 working on my ZyXEL with OpenWRT. I've been diggging through the sources to understand how things work. I dumped the ip(6)tables to try to find out why I'm getting half my traffic assigned to "no matching MAC".

Why are the INPUT and OUTPUT rules not restricted to the WAN interface? I only want to measure WAN traffic, not LAN traffic to/from the router. Those rules should have an interface qualifier.


TBH, I can't remember when/why I added the YAMon entries into the INPUT and OUTPUT chains...

If you give a good argument, they could probably be removed.
(Even though it has been 6+ years, I am still largely quite ignorant when it comes to the the dark arts of iptables.)
Al
SpareSimian
DD-WRT Novice


Joined: 26 Aug 2011
Posts: 15
Location: San Pablo, CA

PostPosted: Tue Oct 01, 2019 15:42    Post subject: Reply with quote
I imagine you intended the INPUT and OUTPUT rules to collect traffic stats for traffic from the router itself to the WAN. LAN traffic goes through the FORWARD chain. You don't need to list known devices in the INPUT and OUTPUT chains. Just a simple count on just the WAN interface will do what you need to account for WAN traffic to and from the router itself.

So something like:

iptables -I INPUT 0 -i eth1.2 -j YAMON34v4WANIn
iptables -I OUTPUT 0 -o eth1.2 -j YAMON34v4WANOut

(Targets are empty chains. You'll also need the equivalent IPv6 rules, of course.)

The problem here is that the rules are gathering counts on traffic between the router and the LAN, such as my admin workstation watching the realtime feed. That will bloat up the admin station's counts when I leave it watching the router overnight.

Fundamentally, the INPUT and OUTPUT chains deal with packets that originate or terminate on the host. The FORWARD chain is for packets that will be routed through for two other hosts.
Goto page Previous  1, 2, 3 ... 34, 35, 36 ... 44, 45, 46  Next Display posts from previous:    Page 35 of 46
Post new topic   Reply to topic    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