YAMon v4... usage totals by device

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> General Questions
Goto page 1, 2, 3 ... 13, 14, 15  Next
Author Message
al_c
DD-WRT Guru


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

PostPosted: Mon Oct 14, 2019 17:47    Post subject: YAMon v4... usage totals by device Reply with quote
Here it is... I've been developing and testing under both DD-WRT, Turris and LEDE (the latter two being OpenWrt variants).

There is now an installer!

For install instructions and a link to the installer, see https://usage-monitoring.com/v4-beta.php and/or https://usage-monitoring.com/installv4.php.

See also https://usage-monitoring.com/whatsnew.php for ongoing updates.

Limitations... this beta is focussed on the router-side scripts which collect the data... The reports are a whole other can of worms. I'll start on those shortly. The reports pages will open but will throw a JS error almost immediately.

One of the biggest improvements (if I may say so myself) is that after a mere 6 years, I finally figured out how to incorporate system error messages right into the logs. In addition, the logs are html and can be viewed in a browser (typically 192.168.1.1/user/logs/<date>.html). I've built some limited filtering into the logs and the errors are highlighted in bold red text so it should be much easier to find out when and were issues occur.

Let me know what you find!

Al



install-instructions.txt
 Description:

Download
 Filename:  install-instructions.txt
 Filesize:  4.72 KB
 Downloaded:  273 Time(s)


_________________
Thanks to everyone for supporting YAMon!

If you use and like YAMon and have not done so recently, please consider making a donation - thanks!
YAMon GitHub Repository


Last edited by al_c on Mon Mar 30, 2020 22:18; edited 3 times in total
Sponsor
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Wed Oct 16, 2019 13:14    Post subject: Reply with quote
What is needed to let Y3 & Y4 run concurrently?
_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
al_c
DD-WRT Guru


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

PostPosted: Wed Oct 16, 2019 15:17    Post subject: Reply with quote
ddaniel51 wrote:
What is needed to let Y3 & Y4 run concurrently?
nothing should be necessary... All the files go into separate folders, the iptables entries are also separate.

The only possible conflict would be in the symlinks in /tmp/www
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Thu Oct 17, 2019 5:35    Post subject: Reply with quote
Ran across this in log and it repeats.
Packing up logs & data to email you.
An 11MB html sure loads slow.

04:28:01
update-reports.sh - start
04:28:01
traffic.sh: --> 04:26 -> 04:28
04:28:01
GetTraffic - -vnx
Could not open socket to kernel: Address family not supported by protocol

04:28:01
GetTraffic - No IPv6 traffic
04:28:01
GetTraffic: 245 192.168.1.96 0.0.0.0/0 / 192.168.1.96)
/opt/yamon4/update-reports.sh: line 152: arithmetic syntax error

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php


Last edited by ddaniel51 on Thu Oct 17, 2019 5:47; edited 1 time in total
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Thu Oct 17, 2019 5:45    Post subject: Reply with quote
Which email addy do you prefer large amounts of data come to? I have 4.
_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
al_c
DD-WRT Guru


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

PostPosted: Thu Oct 17, 2019 11:13    Post subject: Reply with quote
ddaniel51 wrote:
Which email addy do you prefer large amounts of data come to? I have 4.
send thing to questions@usage-monitoring.com please!
al_c
DD-WRT Guru


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

PostPosted: Thu Oct 17, 2019 11:20    Post subject: Reply with quote
ddaniel51 wrote:
Ran across this in log and it repeats.
Packing up logs & data to email you.
An 11MB html sure loads slow.

04:28:01
update-reports.sh - start
04:28:01
traffic.sh: --> 04:26 -> 04:28
04:28:01
GetTraffic - -vnx
Could not open socket to kernel: Address family not supported by protocol

04:28:01
GetTraffic - No IPv6 traffic
04:28:01
GetTraffic: 245 192.168.1.96 0.0.0.0/0 / 192.168.1.96)
/opt/yamon4/update-reports.sh: line 152: arithmetic syntax error


The logs should/will get (a lot) smaller when loglevel is changed from 0 to 1 or higher. As well, at this point, I've got a lot of perhaps extraneous logging statements

I've see the kernel socket message occasionally on my router too but it doesn't seem to affect things...
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Fri Oct 18, 2019 4:31    Post subject: Reply with quote
Changing ISP billing date in config is not picked up and stays day 5.

It appears to be hard coded to 5 in start-stop.sh.

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Fri Oct 18, 2019 5:11    Post subject: Reply with quote
Change to config "_wwwPath='/tmp/www4/' " not picked up in attempt to keep 4 from wiping 3's index.html.

Strangely it did take the change to "_webIndex='index4.html'".

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Fri Oct 18, 2019 19:40    Post subject: Reply with quote
Hit <enter> to accept the default (`1`),
or enter your preferred value: 0
/opt/yamon4/setup4.0.0.sh: line 565: setWebDirectories: not found
>>> specified path to _dnsmasq_conf (/tmp/etc/dnsmasq.conf) does not exist
>>> specified path to _dnsmasq_leases (/tmp/dhcp.leases) does not exist
/opt/yamon4/setup4.0.0.sh: line 588: copyfiles: not found

**********************************************************
*** Saved configuration settings to `/opt/yamon4/config.file`
*** & copied previous file to `/opt/yamon4/config.old`
**********************************************************
cat: can't open '/opt/yamon4/default_config.file': No such file or directory

YAMon4.0.0 is now configured and ready to run.
To launch YAMon manually, enter `/opt/yamon4/startup.sh`.
start?

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
al_c
DD-WRT Guru


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

PostPosted: Fri Oct 18, 2019 21:40    Post subject: Reply with quote
ddaniel51 wrote:
Hit <enter> to accept the default (`1`),
or enter your preferred value: 0
/opt/yamon4/setup4.0.0.sh: line 565: setWebDirectories: not found
>>> specified path to _dnsmasq_conf (/tmp/etc/dnsmasq.conf) does not exist
>>> specified path to _dnsmasq_leases (/tmp/dhcp.leases) does not exist
/opt/yamon4/setup4.0.0.sh: line 588: copyfiles: not found

**********************************************************
*** Saved configuration settings to `/opt/yamon4/config.file`
*** & copied previous file to `/opt/yamon4/config.old`
**********************************************************
cat: can't open '/opt/yamon4/default_config.file': No such file or directory

YAMon4.0.0 is now configured and ready to run.
To launch YAMon manually, enter `/opt/yamon4/startup.sh`.
start?
oh crap... You found the start of the setup script... I should have removed that from the zip file. It's no where neat ready for testing.

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Sat Oct 19, 2019 5:24    Post subject: Reply with quote
Hehe


Running 3 & 4 concurrent. Will look at files after midnight chores.

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
al_c
DD-WRT Guru


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

PostPosted: Sat Oct 19, 2019 14:38    Post subject: Reply with quote
ddaniel51 wrote:
Changing ISP billing date in config is not picked up and stays day 5.

It appears to be hard coded to 5 in start-stop.sh.


Yup... fixed.
In /includes/start-stop.sh,

Line #46 should be
Code:
newjobs="${newjobs}\n0 0 ${_ispBillingDay:-1} * * $user ${d_baseDir}/new-billing-interval.sh"

Rather than
Code:
newjobs="${newjobs}\n0 0 5 * * $user ${d_baseDir}/new-billing-interval.sh"


The new line sets the script to run on _ispBillingDay of each month (or defaults to 1 if `_ispBillingDay` has not been set... which would actually indicate something bad had happend to your config.file)

Al
al_c
DD-WRT Guru


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

PostPosted: Sat Oct 19, 2019 15:16    Post subject: Reply with quote
ddaniel51 wrote:
...
Could not open socket to kernel: Address family not supported by protocol
.

Do you have ipv6 enabled in your DD-WRT admin GUI?

On my DD-WRT router, I get that message if ipv6_enable=0 in nvram (nvram,show | grep ipv6).
AFAIK - the script runs fine in spite of the message.

I will have to add a check to see whether the value is set and that'll stop the message from appearing in the logs.

Al
ddaniel51
DD-WRT Guru


Joined: 19 Feb 2013
Posts: 1384

PostPosted: Sat Oct 19, 2019 15:24    Post subject: Reply with quote
It appears _wwwPath is hard coded in SetPaths according to OS varient and not via config.file.

Corrected DD-WRT dnsmasq info:

AddEntry '_dnsmasq_conf' "/tmp/dnsmasq.conf"
AddEntry '_dnsmasq_leases' "/tmp/dnsmasq.leases"

_________________
Segment 1 R9000 10Gb LAN, 1Gb ISP BS
Test Bed R9000 10Gb LAN
Wired AP 1 R9000 10Gb LAN
Wired AP 2 R9000 1Gb LAN
Wired AP 3 R9000 1Gb LAN
Test Bed R7800 1Gb LAN OpenWRT Kong
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
www.desipro.de/openwrt/ (Kong's)
YAMon usage-
www.monitoring.com/manualInstall.php
Goto page 1, 2, 3 ... 13, 14, 15  Next Display posts from previous:    Page 1 of 15
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