What's new
  • 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!

RTRMON RTRMON v2.1.6 -Jul 5, 2025- Monitor your Router's Health (New: AMTM, Network Conn/Bandwidth/Diag + Port Scanner + Speedtest)

So $PATH in that export statement is the console's $PATH?

And where would that go in the script, right at the beginning?
I'm planning on putting it at the very top, just below the script "description". Like what you would find in the vpnmon-r3 script.
 
I'm planning on putting it at the very top, just below the script "description". Like what you would find in the vpnmon-r3 script.
So I put the export path line at the very top of the script and removed "/opt/bin/" from the lines containing "column"..

Page 7 now works.

But for me to get a correct accounting of a device that has just recently disconnected from the lan I need to click the refresh button shown in the attached screenshot. Any idea what the web ui is doing there?

Any chance it could be incorporated into RTRMON?
 

Attachments

  • Screenshot at 2025-06-29 20-18-51.png
    Screenshot at 2025-06-29 20-18-51.png
    101.6 KB · Views: 15
So I put the export path line at the very top of the script and removed "/opt/bin/" from the lines containing "column"..

Page 7 now works.

But for me to get a correct accounting of a device that has just recently disconnected from the lan I need to click the refresh button shown in the attached screenshot. Any idea what the web ui is doing there?

Any chance it could be incorporated into RTRMON?
I'm going to have to guess it's some sort of timeout we're dealing with. Hitting the refresh gets it done faster... but perhaps when the timeout expired, it would show up in RTRMON. Great question. Something definitely to keep our eye on.
 
It turns out that the refresh button on the web interface only works with some clients some of the time. But pinging the clients in the various lists has the desired effect. Somehow trying to ping a client that can't be reached causes it to be dropped from the lists.

To get a more accurate accounting of what is actually connected I wrote a script that can be called from rtrmon.sh that automates this. Now I can see clients joining and leaving the lan in near real time. If anyone is interested I can post the script for others to try out and give details of how to call it from rtrmon.sh .

The only thing that doesn't work is disconnected clients in my vlan. They end up still showing up on page 7.
 
It turns out that the refresh button on the web interface only works with some clients some of the time. But pinging the clients in the various lists has the desired effect. Somehow trying to ping a client that can't be reached causes it to be dropped from the lists.

To get a more accurate accounting of what is actually connected I wrote a script that can be called from rtrmon.sh that automates this. Now I can see clients joining and leaving the lan in near real time. If anyone is interested I can post the script for others to try out and give details of how to call it from rtrmon.sh .

The only thing that doesn't work is disconnected clients in my vlan. They end up still showing up on page 7.
Would love to see. Please go ahead and share what you came up with, and perhaps there's a good fit to incorporate it into RTRMON?
 
Had to upload it as a .txt file. Obviously it should be a .sh . Here is a snippet of code in rtrmon.sh that shows how to call it. The call is line# 4482. The calls are in four places for the four lists in page 7.

4481 if [ -f "/jffs/addons/rtrmon.d/clientlist$iface.txt" ]; then
4482 /jffs/scripts/pinglist.sh "/jffs/addons/rtrmon.d/clientlist$iface.txt"
4483 if [ $maxclientcount -ge 1 ]; then
4484 sort -f -d -o /jffs/addons/rtrmon.d/clientlist$iface.txt -k "$SortbyNum" -t , /jffs/addons/rtrmon.d/clientlist$iface.txt 2>/dev/null
4485 column -t -s',' -o' | ' -N Name,IP,MAC,Uptime,"TX GB","RX GB","TX Mbps","RX Mbps","Sig" /jffs/addons/rtrmon.d/clientlist$iface.txt | sed 's/^/>
4486 else
4487 echo -e " No Devices Connected"
4488 fi
4489 else
4490 echo -e " No Devices Connected"
4491 fi
 

Attachments

Had to upload it as a .txt file. Obviously it should be a .sh . Here is a snippet of code in rtrmon.sh that shows how to call it. The call is line# 4482. The calls are in four places for the four lists in page 7.

4481 if [ -f "/jffs/addons/rtrmon.d/clientlist$iface.txt" ]; then
4482 /jffs/scripts/pinglist.sh "/jffs/addons/rtrmon.d/clientlist$iface.txt"
4483 if [ $maxclientcount -ge 1 ]; then
4484 sort -f -d -o /jffs/addons/rtrmon.d/clientlist$iface.txt -k "$SortbyNum" -t , /jffs/addons/rtrmon.d/clientlist$iface.txt 2>/dev/null
4485 column -t -s',' -o' | ' -N Name,IP,MAC,Uptime,"TX GB","RX GB","TX Mbps","RX Mbps","Sig" /jffs/addons/rtrmon.d/clientlist$iface.txt | sed 's/^/>
4486 else
4487 echo -e " No Devices Connected"
4488 fi
4489 else
4490 echo -e " No Devices Connected"
4491 fi
Thanks @DrDog! I should have some time these next 4 days to duplicate your efforts here and see how we can make use of this!
 
So to try to solve the try to solve the problem of disconnected vlan clients still showing up on page 7 I modified the pinglist script to make a copy of a client list file with unreachable clients left out. rtrmon then operates on the copy in the usual way. I modified the rtrmon script in four places to allow use of the new version of pinglist.

I have tested adding and removing clients on all four parts of page 7 and everything seems to work in near real time.

I can post the new version and the modifications to rtrmon if anyone is interest. Viktor, maybe?
 
So to try to solve the try to solve the problem of disconnected vlan clients still showing up on page 7 I modified the pinglist script to make a copy of a client list file with unreachable clients left out. rtrmon then operates on the copy in the usual way. I modified the rtrmon script in four places to allow use of the new version of pinglist.

I have tested adding and removing clients on all four parts of page 7 and everything seems to work in near real time.

I can post the new version and the modifications to rtrmon if anyone is interest. Viktor, maybe?
Please feel free to do that, @DrDog. I appreciate your contribution with this. I hope to start working on RTRMON mods tonight and tomorrow. 🙂
 
Here is the new version of pinglist and a .patch file for the rtrmon script.

Cheers!
Thanks for copying these over @DrDog ... I'm not seeing an easy way to merge this patch. It may be easier for you to submit these changes directly to the develop branch located here, and that would allow me to get better eyes on this and test this out?


Also, instead of building this separate pinglist.sh file, it may be better to just create a function out of it, and include it in the main program?
 
Yes, the function idea seems the way to go. I will spend some time on that and the development branch upload in the next day or two. I have never contributed code at GitHub before so that should be an interesting twist. I may have questions if I get stuck.
 
Yes, the function idea seems the way to go. I will spend some time on that and the development branch upload in the next day or two. I have never contributed code at GitHub before so that should be an interesting twist. I may have questions if I get stuck.
No worries... I will work on getting these changes in... though it's manual, I found a way to easier see what's changed or added. I'll point you to the file once I'm done... ;)

**UPDATE**

OK... I was successfully able to work in your changes, however, after playing with it, I think there are some serious concerns here. While you might be seeing some success by pinging your clients to help clear up your list, I unfortunately am not seeing the same results.

For me, the list of devices across the board has drastically reduced, even though these devices are all active on my network. I'm pretty sure the reasoning is because certain devices aren't responding to a ping, and are getting removed from the list based on the logic you provided.

I'm going to keep a copy that you can try out here, but at this point, this unfortunately isn't something that is workable on my end. :(

Definitely open to suggestions...
 
Last edited:
@Viktor Jaep and @DrDog - I have tried as well over the years to do network scans using ping…
A few ideas/suggestions.
Some IoT devices tend to sleep. I have found it more effective to try to increase the ping packet count and wait time a little:
From -c 1 -W 1 to -c 2 (or 3) and -W 2

Another idea on waking up these devices using ping - do a ping broadcast first, then cycle through the list. Something like:

ping -b -c 2 -W 2 192.168.1.255 (or whatever the broadcast address is)
BTW, this assumes the device will respond to a ping…that’s another issue.
 
@Viktor Jaep and @DrDog - I have tried as well over the years to do network scans using ping…
A few ideas/suggestions.
Some IoT devices tend to sleep. I have found it more effective to try to increase the ping packet count and wait time a little:
From -c 1 -W 1 to -c 2 (or 3) and -W 2

Another idea on waking up these devices using ping - do a ping broadcast first, then cycle through the list. Something like:

ping -b -c 2 -W 2 192.168.1.255 (or whatever the broadcast address is)
BTW, this assumes the device will respond to a ping…that’s another issue.
Thanks for the suggestion @JGrana ... yeah, the downside with this is that it will increase the length of time to draw that page as it cycles through all the devices. Which in some cases with some of the people using this, is in the many dozens upon dozens of devices. Like you said, whether they respond is another question. I think polling the list(s) that the router is maintaining is probably still the way to go, as these devices will drop off after a certain amount of time. Accuracy is nice, but as with almost every stat that RTRMON provides, it's always just a very close guesstimate.
 
Thanks for the suggestion @JGrana ... yeah, the downside with this is that it will increase the length of time to draw that page as it cycles through all the devices. Which in some cases with some of the people using this, is in the many dozens upon dozens of devices. Like you said, whether they respond is another question. I think polling the list(s) that the router is maintaining is probably still the way to go, as these devices will drop off after a certain amount of time. Accuracy is nice, but as with almost every stat that RTRMON provides, it's always just a very close guesstimate.
I hear you, as you probably know I have tried all kinds of way to scan the network. Pings, nmap, arp/arp cache….I never found the balance of scan time versus accuracy.

One more idea. Maybe a quick ping broadcast with a low count and timer. Just to try to wake any sleeping clients. You might not catch them but it would probably assist the routers discovery/list.

I might try this today. A simple one line cron that runs every 10 mins.
 
Yeah, the sleeping IOT device thing is something I worried about. And also firewall settings on the devices themselves. And I wonder what is actually going on with Viktor losing so many active devices from the list. Maybe everything is sleepy at his house? 😉
 
Yeah, the sleeping IOT device thing is something I worried about. And also firewall settings on the devices themselves. And I wonder what is actually going on with Viktor losing so many active devices from the list. Maybe everything is sleepy at his house? 😉
Yeah, I'm not sure. But I think the safe bet is to just rely on the lists that the router provides, and use that as your baseline. I think weeding things out whether they ping back or not might just be a wee bit too aggressive. ;)
 
Yeah, I'm not sure. But I think the safe bet is to just rely on the lists that the router provides, and use that as your baseline. I think weeding things out whether they ping back or not might just be a wee bit too aggressive. ;)
I just tried your 2.1.6b1 version and it works well. I am not seeing any clients dropped off from or added to the lists incorrectly. My network only has 15 clients or so, a mix of 2.4g and 5g wifi, a vlan, and several wired ones on the main subnet.

In your network can you ping the ones that were incorrectly dropped off? If so maybe something other than my changes are causing it.

When I first started working on this I noticed some of the clients in my lists showed unknown names. I named all those with the Merlin web ui. Could name-unknown clients be a problem here?
 
I just tried your 2.1.6b1 version and it works well. I am not seeing any clients dropped off from or added to the lists incorrectly. My network only has 15 clients or so, a mix of 2.4g and 5g wifi, a vlan, and several wired ones on the main subnet.

In your network can you ping the ones that were incorrectly dropped off? If so maybe something other than my changes are causing it.

When I first started working on this I noticed some of the clients in my lists showed unknown names. I named all those with the Merlin web ui. Could name-unknown clients be a problem here?
I don't think names are a problem, since we're pinging physical IP addresses. For me, it's basically all my servers, routers, laptops/workstations, and some higher end devices that probably all use their own firewall. They don't ping back.
 

Similar threads

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!
Back
Top