Kaseya Community

Test Internet connectivity and speed!!

  • HA! My first cool script! (At least to meWink )
    =============================

    Script Name: Internet Connection Check
    Script Description: Test Internet connection using PING, DNS Check and TRACERT if necessary

    IF True
    THEN
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : agentTemp
    OS Type : 0
    Write File
    Parameter 1 : #agentTemp#\iCheckConnection.exe
    Parameter 2 : VSASharedFiles\iCheckConnection.exe
    OS Type : 0
    Execute Shell Command
    Parameter 1 : #agentTemp#\iCheckConnection.exe >> inetresults.txt
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 1
    Parameter 2 : inetresults.txt
    Parameter 3 : Inetresults
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Internet test results #inetresults#
    OS Type : 0
    ELSE

    ===========================================

    Downlaod the program "iCheckConnection.exe" at http://www.pcpitstop.com/internet/iCheckConnection.asp and put it in your shared file store on the Kaseya server.

    The results in the script log are similar to the following:

    Internet test results PC Pitstop Connection Checker 1.2 Copyright (c) 2004 PC Pitstop LLC. All rights reserved. DNS is working Ping www.pcpitstop.com (64.29.201.21) 32 bytes 49 49 50 50 51 http://www.pcpitstop.com returned 29767 bytes in 0.25 seconds (950 Kb/s)
    There are more variables that can be used as well! I'll write a couple other scripts for this great tool!

    Gavin

    Legacy Forum Name: Test Internet connectivity and speed!!,
    Legacy Posted By Username: Interprom
  • Very handy, thanks!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Coldfirex
  • AWesome! I love being of value Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Interprom
  • Coldfirex
    Very handy, thanks!
    +1 Good to know!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Resistance2Fly
  • thanks for that.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: VNET
  • Thank You!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: dfenn
  • I have yet to try the script, but does it provide both the upload and download?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: GrantB
  • No, the software that does the test will perform a ping test and download the file/webpage you tell it to. It only shows download speeds. If the server you ask it to check cannot be pinged, it performs a tracert to see where the connection falls down.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: arobar
  • I might be being stupid here but, assuming the client isn't on the same LAN as the K server, doesn't the fact that the it can connect to the server to be able to run this script make the script redundant?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: richardprice
  • I'm pretty sure he means the target test server and not the Kaseya server. Then again, that raises another question: If there is a failure to reach the target test server, then would it matter where the fault is located? If its in your network or the network of the client machine, then it wouldn't be able to check in. If its someone elses problem, it doesn't matter unless it directly effects the client site.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: genix-tyler
  • Interprom
    Execute Shell Command
    Parameter 1 : #agentTemp#\iCheckConnection.exe >> inetresults.txt


    Gavin,

    Thanks for finding the application and posting the link here! Here's a suggestion: If you want to graph the results over time consider replacing the line above with:

    for /f %x in (#agentTemp#\urls.txt) do for /f "usebackq tokens=1,8,9 delims=() " %a in (`#agentTemp#\icheckconnection %1 ^| find "returned" `) do echo %date%,%time%,%a,%b,%c >>#agentTemp#\speedtest.csv

    You'll need to create a "urls.txt" file that contains a list of urls you want to run the test against. Schedule the script to run as often as you think necessary. The comma-delimited results will be piped into "speedtest.csv" which you can import into Excel and graph.

    Jim Lancaster
    Sagiss, LLC
    Dallas, TX

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: jlancaster@sagiss.com
  • thanks! really useful!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: kennyho
  • Very nice lancaster - never thought of making a CSV on the fly like that - makes sense

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: chris@busy.co.nz
  • But where do I find the results?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: strategicmicro