1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

connmon - Internet connection monitoring

Discussion in 'Asuswrt-Merlin' started by Jack Yaz, Apr 17, 2019.

  1. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    v1.1.0
    Updated 2019-05-11

    Monitor latency, jitter and packet loss for your internet connection. Graphs available on the Tools page of the WebUI. Runs every 5 minutes via cron, for 30s.

    connmon is free to use under the GNU General Public License version 3 (GPL 3.0).

    This project is hosted on GitHub

    Love the script and want to support future development? Any and all donations gratefully received! PayPal donation

    [​IMG]

    Supported Models
    Models
    All modes supported by Asuswrt-Merlin. Models confirmed to work are below:
    • RT-AC68U
    • RT-AC86U
    • RT-AC3100
    Firmware versions
    You must be running firmware no older than:
    Installation
    Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:
    Code:
    /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/connmon/master/connmon.sh" -o "/jffs/scripts/connmon" && chmod 0755 /jffs/scripts/connmon && /jffs/scripts/connmon install
    
    Usage
    To launch the connmon menu after installation, use:
    Code:
    connmon
    If this does not work, you will need to use the full path:
    Code:
    /jffs/scripts/connmon
    
    Updating
    Launch connmon and select option u
     
    Last edited: May 11, 2019
    Seamaster, Centrifuge, eclp and 9 others like this.
  2. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    Sample graphs
    [​IMG]
     
    Last edited: Apr 17, 2019
  3. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    5,435
    Location:
    Switzerland
    Are you retired, jobless, won the lottery or did your wife leave you?
    :D:D:D
     
  4. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    Looking for ways to supplement the income to get the wife a ticket to MCM Comic Con :p (she loves Misha Collins and he's a guest)

    (not to mention moving costs due to landlord selling the place I'm renting :( )
     
    il2, rk8531, Vexira and 1 other person like this.
  5. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,105
    Jack Yaz, I had to try this on my RT-AC86U. :)

    It installed no problem. It even ran the initial tests, but there is nothing showing in the graphs yet (I'm assuming I need to let it run a while, no problem).

    The only little niggle I see is that the Run Ping Test Now button doesn't respond. Almost, like it is clicking/clicked, if you know what I mean? Maybe this needs some time too?

    Thanks again for another great script to be able to play with. :)

    Edit: Oh, I'm running 384.11 Alpha 3, btw. ;)
     
  6. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    First data should be graphed within 5-10 minutes (due to data points in the rrd)

    Ah yes...forgot that bug....wait 30s and the page will refresh automagically :D (I need to patch in the Loading.... bit)
     
    Kingp1n and L&LD like this.
  7. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    Should be fixed, run u in the menu

    EDIT: also run
    Code:
    connmon startup
    after updating
     
    L&LD likes this.
  8. joe scian

    joe scian Senior Member

    Joined:
    Apr 22, 2018
    Messages:
    239
    running great on an RT-AC-5300 thanks Jack
     
    Jack Yaz likes this.
  9. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    And more importantly, it's fun :D
     
    Seamaster, Gitsum, QuikSilver and 5 others like this.
  10. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,105
    Confirmed fixed. Thank you!
     
    Kingp1n and Jack Yaz like this.
  11. joe scian

    joe scian Senior Member

    Joined:
    Apr 22, 2018
    Messages:
    239
    Jack are the results posted to syslog and are the results printed on graphs in a message as per speedtest? Im not seeing either at present when I press Run ping test now button.

    PS - what time do the tests run please?
     
  12. Jack Yaz

    Jack Yaz Part of the Furniture

    Joined:
    Apr 20, 2017
    Messages:
    2,108
    No to both currently. Due to the 5 minute frequency I didn't want to flood syslog. Showing the last result in the UI I can do though

    Graphs should get new data points every 5 minutes now
     
    joe scian likes this.
  13. Butterfly Bones

    Butterfly Bones Very Senior Member

    Joined:
    Apr 10, 2017
    Messages:
    763
    Location:
    California central coast
    Hmmmm, shows in my syslog (until I get it filtered with Scribe syslog-ng that is).
    Code:
    Apr 17 16:32:57 RT-AC86U-4608 connmon[4950]: Welcome to connmon v1.0.0, a script by JackYaz
    Apr 17 16:32:58 RT-AC86U-4608 connmon[4957]: Checking your router meets the requirements for connmon
    Apr 17 16:35:01 RT-AC86U-4608 connmon[6127]: Lock file found (age: 1 seconds) - stopping to prevent duplicate runs
    Apr 17 16:35:11 RT-AC86U-4608 connmon[6182]: Lock file found (age: 11 seconds) - stopping to prevent duplicate runs
    Apr 17 16:35:27 RT-AC86U-4608 connmon[6197]: Lock file found (age: 27 seconds) - stopping to prevent duplicate runs
    Apr 17 16:35:45 RT-AC86U-4608 connmon[6909]: No new version - latest is v1.0.0
    Apr 17 16:41:46 RT-AC86U-4608 connmon[9043]: Downloading latest version (v1.0.0) of connmon
    Apr 17 16:41:47 RT-AC86U-4608 connmon[9071]: connmon successfully updated
    Apr 17 16:45:30 RT-AC86U-4608 rc_service[32063]: httpds 32063:notify_rc start_connmon
    Apr 17 16:45:30 RT-AC86U-4608 custom_script[1]: Running /jffs/scripts/service-event (args: start connmon) - max timeout = 120s
    Apr 17 16:45:30 RT-AC86U-4608 connmon[9740]: Lock file found (age: 30 seconds) - stopping to prevent duplicate runs
    
     
  14. joe scian

    joe scian Senior Member

    Joined:
    Apr 22, 2018
    Messages:
    239
    I was referring to the ping jitter and line quality metrics
     
    Butterfly Bones likes this.
  15. Butterfly Bones

    Butterfly Bones Very Senior Member

    Joined:
    Apr 10, 2017
    Messages:
    763
    Location:
    California central coast
    Ah, I see, my bad. :oops:
     
  16. Swistheater

    Swistheater Very Senior Member

    Joined:
    Jul 8, 2017
    Messages:
    795
    Location:
    Florida
    when i use connmon it tells me there is a lock file and will not open the menu, but when i type in the long way it opens the menu....
     
  17. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,105
    This is repeatable? I didn't notice this aspect.

    Maybe you're just impatient? Or, it was running a test in the background as it does? ;)
     
  18. Butterfly Bones

    Butterfly Bones Very Senior Member

    Joined:
    Apr 10, 2017
    Messages:
    763
    Location:
    California central coast
    Oh, yeah!
    Code:
    connmon[6127]: Lock file found (age: 1 seconds) - stopping to prevent duplicate runs
    connmon[6182]: Lock file found (age: 11 seconds) - stopping to prevent duplicate runs
    connmon[6197]: Lock file found (age: 27 seconds) - stopping to prevent duplicate runs
    
     
  19. Swistheater

    Swistheater Very Senior Member

    Joined:
    Jul 8, 2017
    Messages:
    795
    Location:
    Florida
    I figured I just wanted a second opinion other than my own:rolleyes:.
     
    L&LD likes this.
  20. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    9,105
    To be clear here, I did notice that myself on the first install. :)

    But what I was asking here; is this repeatable 'on command' when using the connmon vs. /jffs/scripts/connmon commands?

    As I said, I've used both but did not find this behavior, it seems consistent for me (and I made sure I was within the scheduled runs too).
     
    Swistheater likes this.