What's new

connmon connmon - Internet connection monitoring

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
@mafiaboy01, how good are you at script coding? I wouldn't even know where to begin. :(
 
I think the issue is with this line:
Code:
        if [ "$(uname -o)" = "ASUSWRT-Merlin" ] && [ "$(nvram get buildno | tr -d '.')" -ge "38400" ]; then
So the test will fail for any version 384.9 or earlier. That isn't testing for 384.xx, which would test for the part before the ".".

If one is on 384, one might download the script, delete lines 924 to 927, and have a go. (With a backup config to restore if it goes ***s up.
 
Thanks @Jack Yaz for the update. I was thinking cut works here. This installed just fine on 384.6, and so far so good.
 
v2.3.0 is now available

Changelog:
Code:
Use csv files for ChartJS data - reduces generation time of stats
Revert to single cron job as a result of the above improvement
General improvements to WebUI page
Automatically purge data older than 30 days to prevent database file size growing too large
 
Thank you! Updated, no issues.
 
v2.3.1 is now available
Changelog:
Code:
Switch to single tar archive for shared-jy resources

With this update, if you are running my other scripts (connmon, ntpmerlin, spdmerlin, uiDivStats, modmon), you MUST update these as well. Ignore any error messages during updates after the first script (it will mention too many levels of symbolic links), and let the update complete.

Once you have updated all of the scripts, run
Code:
rm -rf /www/user/shared-jy && rm -rf /jffs/addons/shared-jy
then open any of the scripts mentioned above and run 1 further update.

This will hopefully be the last time any of this messing around is needed - I'm switching to a single archive for all shared-jy resources to ease the pain of any new files that are needed in the future. Please accept my apologies for the inconvenience!
 
@Jack Yaz - Thank you. Also a Thank you to everyone else here and especially @RMerlin. Long time reader of the forums (years and years) but decided to finally register.

connmon v2.3.1 definitely seems to have improved on the CPU utilization in terms of how much and for how long.

with the prior version to v2.3.1, I was seeing every 5 mins 100 % overall CPU utilization (I don't remember the duration - but it seemed more then 8 seconds). Because of that I installed netdata onto the AC68u itself and dug in to find out what was causing the spikes - isolated it to cron jobs -- and when I removed connmon the spikes stopped. I left connmon uninstalled and tuned netdata and left that running as I liked the amount of detail I got. Overall netdata was taking up 1-3 % cpu overall while running on the AC68U while giving a great amount of detail.

With the latest connmon release I decided let me install it again and see if it improved (it has as per above and below).

Currently running on an RT-AC68U f/w 384.15 with a 4GB USB 2.0 flash drive attached. The following are active via AMTM currently:
- scribe, nsrum, connmon, scMerlin, spdMerlin, uiScribe.
- entware (additional packages): netdata

CPU with above running is consistently at 1-7 percent utilization (totally great as far as I am concerned). Spikes in CPU utilization occur when cron jobs run.
- connmon approx every 5 mins spikes to approx overall 70% utilization (as expressed when overall cores provide 100 % total) for a duration of 8 seconds each time.
- spdMerlin at every 7 and 37 each hour causes overall CPU spike 80% for 30 seconds.

RAM is ~ 42 % used -- so no memory pressure or swapping.

Many other stats (as captured by netdata which I think btw is great). I've actually gone ahead and installed netdata onto a Raspberry Pi 3b and collect stats to it -- while leaving the AC68u to just stream out its data collected to the Raspberry Pi. On the Pi I am also running fping module in netdata (haven't got that working on AC68u yet).

I'll share a post down the road on my netdata install via entware opkg command and the changes I made to the configuration files, etc..
 
@Jack Yaz - Thank you. Also a Thank you to everyone else here and especially @RMerlin. Long time reader of the forums (years and years) but decided to finally register.

connmon v2.3.1 definitely seems to have improved on the CPU utilization in terms of how much and for how long.

with the prior version to v2.3.1, I was seeing every 5 mins 100 % overall CPU utilization (I don't remember the duration - but it seemed more then 8 seconds). Because of that I installed netdata onto the AC68u itself and dug in to find out what was causing the spikes - isolated it to cron jobs -- and when I removed connmon the spikes stopped. I left connmon uninstalled and tuned netdata and left that running as I liked the amount of detail I got. Overall netdata was taking up 1-3 % cpu overall while running on the AC68U while giving a great amount of detail.

With the latest connmon release I decided let me install it again and see if it improved (it has as per above and below).

Currently running on an RT-AC68U f/w 384.15 with a 4GB USB 2.0 flash drive attached. The following are active via AMTM currently:
- scribe, nsrum, connmon, scMerlin, spdMerlin, uiScribe.
- entware (additional packages): netdata

CPU with above running is consistently at 1-7 percent utilization (totally great as far as I am concerned). Spikes in CPU utilization occur when cron jobs run.
- connmon approx every 5 mins spikes to approx overall 70% utilization (as expressed when overall cores provide 100 % total) for a duration of 8 seconds each time.
- spdMerlin at every 7 and 37 each hour causes overall CPU spike 80% for 30 seconds.

Many other stats (as captured by netdata which I think btw is great). I've actually gone ahead and installed netdata onto a Raspberry Pi 3b and collect stats to it -- while leaving the AC68u to just stream out it's data collected to the Raspberry Pi.

I'll share a post down the road on my netdata install via entware opkg command and the changes I made to the configuration files, etc..
I too run netdata, several devices stream to a central Linux box, which then pumps the data into grafana for long term retention :)
 
I too run netdata, several devices stream to a central Linux box, which then pumps the data into grafana for long term retention :)

If / when you have some time - any tips you may have re: netdata configuration you like / prefer on the ASUS devices would be great. Also did you ever try to get the netdata / fping module working on the router itself.

Thanks again!
 
I'm having a problem getting connmon installed from within amtm. Any suggestions would be appreciated?
I've tried uninstalling and resintalling. The same errors occur.

Nothing appears in the router UI under Tools after installing either.



Enter option This installs connmon - Internet connection monitoring
on your router.

Author: Jack Yaz



https://www.snbforums.com/threads/connmon-internet-connection-monitoring.56163/
_____________________________________________

Continue? [1=Yes e=Exit] 1

connmon: Welcome to connmon v2.3.1, a script by JackYaz

connmon: Checking your router meets the requirements for connmon

connmon: Installing required packages from Entware

Downloading http://bin.entware.net/aarch64-k3.10/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package sqlite3-cli (3300100-1) installed in root is up to date.
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file

connmon: New version of connmonstats_www.asp downloaded

connmon: Mounting connmon WebUI page as user3.asp

connmon: New version of shared-jy.tar.gz downloaded

connmon: 30 second ping test to 8.8.8.8 starting...

grep: /tmp/pingresult.txt: No such file or directory
connmon: Test results - Ping 0 ms - Jitter - 0 ms - Line Quality 0 %
 
Last edited:
Okay, I tried uninstalling from amtm again.

Then I just did entered

/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.
githubusercontent.com/jackyaz/connmon/master/connmon.sh" -o "/jffs/scripts/connm
on" && chmod 0755 /jffs/scripts/connmon && /jffs/scripts/connmon install

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32092 100 32092 0 0 164k 0 --:--:-- --:--:-- --:--:-- 175k
connmon: Welcome to connmon v2.3.1, a script by JackYaz

connmon: Checking your router meets the requirements for connmon

connmon: Installing required packages from Entware

Downloading http://bin.entware.net/aarch64-k3.10/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package sqlite3-cli (3300100-1) installed in root is up to date.
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
connmon: New version of connmonstats_www.asp downloaded

connmon: Mounting connmon WebUI page as user3.asp

connmon: 30 second ping test to 8.8.8.8 starting...

connmon: Test results - Ping 9.952 ms - Jitter - 0.978 ms - Line Quality 100.000 %



I now see an Addons section with graphs in the router webui. Is that normal?
 
That's what's supposed to happen, so yes, it's normal.
you have a short ping time to google, your jitter is a bit high but will hopefully settle, and your line quality is perfect.

I've been wondering if I should change the IP that conmon pings (Quad 1) to my ISP's DNS...anyone have thoughts on that?
 
Okay, I tried uninstalling from amtm again.

Then I just did entered

/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.
githubusercontent.com/jackyaz/connmon/master/connmon.sh" -o "/jffs/scripts/connm
on" && chmod 0755 /jffs/scripts/connmon && /jffs/scripts/connmon install

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32092 100 32092 0 0 164k 0 --:--:-- --:--:-- --:--:-- 175k
connmon: Welcome to connmon v2.3.1, a script by JackYaz

connmon: Checking your router meets the requirements for connmon

connmon: Installing required packages from Entware

Downloading http://bin.entware.net/aarch64-k3.10/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package sqlite3-cli (3300100-1) installed in root is up to date.
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
connmon: New version of connmonstats_www.asp downloaded

connmon: Mounting connmon WebUI page as user3.asp

connmon: 30 second ping test to 8.8.8.8 starting...

connmon: Test results - Ping 9.952 ms - Jitter - 0.978 ms - Line Quality 100.000 %



I now see an Addons section with graphs in the router webui. Is that normal?
Jack made some changes to most of his scripts that required extra steps on updates, did you do those?
https://www.snbforums.com/threads/connmon-internet-connection-monitoring.56163/page-13#post-558391
 
Okay, I tried uninstalling from amtm again.

Then I just did entered

/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.
githubusercontent.com/jackyaz/connmon/master/connmon.sh" -o "/jffs/scripts/connm
on" && chmod 0755 /jffs/scripts/connmon && /jffs/scripts/connmon install

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32092 100 32092 0 0 164k 0 --:--:-- --:--:-- --:--:-- 175k
connmon: Welcome to connmon v2.3.1, a script by JackYaz

connmon: Checking your router meets the requirements for connmon

connmon: Installing required packages from Entware

Downloading http://bin.entware.net/aarch64-k3.10/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
Package sqlite3-cli (3300100-1) installed in root is up to date.
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
connmon: New version of connmonstats_www.asp downloaded

connmon: Mounting connmon WebUI page as user3.asp

connmon: 30 second ping test to 8.8.8.8 starting...

connmon: Test results - Ping 9.952 ms - Jitter - 0.978 ms - Line Quality 100.000 %



I now see an Addons section with graphs in the router webui. Is that normal?
Code:
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
/jffs/scripts/connmon: line 1050: can't open /jffs/addons/connmon.d/connmonstats_www.asp: no such file
can be ignored, result of a missing logic check where the webui mounting is trying to find a file that doesnt exist yet. installation should continue OK
 
v2.3.1 is now available
Changelog:
Code:
Switch to single tar archive for shared-jy resources

With this update, if you are running my other scripts (connmon, ntpmerlin, spdmerlin, uiDivStats, modmon), you MUST update these as well. Ignore any error messages during updates after the first script (it will mention too many levels of symbolic links), and let the update complete.

Once you have updated all of the scripts, run
Code:
rm -rf /www/user/shared-jy && rm -rf /jffs/addons/shared-jy
then open any of the scripts mentioned above and run 1 further update.

This will hopefully be the last time any of this messing around is needed - I'm switching to a single archive for all shared-jy resources to ease the pain of any new files that are needed in the future. Please accept my apologies for the inconvenience!

@Jack_Yaz
I'm running 2.3.1 on my AX88U with Merlin 384.15
If you look at the attached, my highest ping is at 18:40 last evening; however, the quality graph shows 100%. Conversely, my quality dips to 94% at roughly 23:20; however, my pings are nominal at that time. Could you shed some light on how your script determines line quality ? To my way of thinking, what I am seeing is backwards. :confused:

W
Capture00252.jpg
 
@Jack_Yaz
I'm running 2.3.1 on my AX88U with Merlin 384.15
If you look at the attached, my highest ping is at 18:40 last evening; however, the quality graph shows 100%. Conversely, my quality dips to 94% at roughly 23:20; however, my pings are nominal at that time. Could you shed some light on how your script determines line quality ? To my way of thinking, what I am seeing is backwards. :confused:

WView attachment 21888
Quality is determined by any packet loss, e.g. 100 minus the packet loss reported during the 30s test:

upload_2020-3-13_12-23-43.png
 

That’s a LOT of clock jitter. What NTP servers are you pointing at? Are everyone else’s ax88s like that, I wonder?
EDIT- I just looked at my stats, and for the last 30 days averages are: ping 16.2ms (graph shows cloudflare playing games; today it dropped to sub-9 and has been as low as 7.6), jitter 0.36ms and line quality 99.8. I would tend to think that this indicates a config issue with OP's router/WAN interface/connection

Sent from my iPhone using Tapatalk
 
Last edited:
Status
Not open for further replies.

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top