Kaseya Community

ISP path data collection.

  • Here's a script for collecting data for your ISP for troubleshooting. The command used is available from win2k+, so no downloading or any muss. This script will basically run the test and add it to a logfile, then upload the logfile. Schedule it to recur as needed, and of course, adjust what servers you're connecting to. There's timestamps in it as well, and it's all append, so delete the logfile manually (or with another script) to purge it. The get file at the end overwrites without warning, since this is basically an append script.

    The command takes about 5 mins to run for a single trace, and this full script ran for almost 20 mins on my machine, so plan accordingly (test it before you schedule it, if it's a lot of hops and lots of sites, you're looking at a really long run time, potentially over an hour).

    If you wanted, you could have the script call itself endlessly if you want a scheduled


    Script Name: PATH PING
    Script Description: Each iteration takes about 5 minutes per path tested. The current incarnation is intended to specifically test a Shaw subscriber connection to link2voip.

    Records current time, then runs the pathping command.
    Currently set to test the path to www.shaw.ca, www.google.ca, www.yahoo.ca, sip.ca1.link2voip.com, and sip.ca2.link2voip.com. The latter two are directly peered with Shaw, Telus, and MTS Allstream.

    The pathping command needs to be run as system for UAC enable machines.

    An absolute path in the root is used as the command is expected to be interrupted unexpectedly, and to facilitate easy extraction. Use a parent script to purge the logfile if desired.

    IF True
    THEN
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : pathping www.shaw.ca >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : pathping www.google.ca >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : pathping www.yahoo.ca >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : pathping sip.ca1.link2voip.com >>>> c:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : net time \\%computername% |find "Current time" >>>> C:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Execute Shell Command
    Parameter 1 : pathping sip.ca2.link2voip.com >>>> c:\pathping.txt
    Parameter 2 : 1
    OS Type : 0
    Get File
    Parameter 1 : C:\pathping.txt
    Parameter 2 :
    Parameter 3 : 1
    OS Type : 0
    ELSE



    This is what I'm using now, to track a flaky Shaw connection, and link2voip is the primary service that we're concerned about, so we're looking at that.

    Adjust as needed, and remember to make sure any new paths you check are running the pathping command as system, or it won't work on a UAC enable machine.

    Share and Enjoy!

    Legacy Forum Name: ISP path data collection.,
    Legacy Posted By Username: dwujcik
  • Seems there's an error in the last step, don't forget to add the filename to save to on the kserver.

    I'd like to point out that this doesn't seem to work with cable modems, seems the modem itself has an IP, decrements the TTL, but doesn't send the echo. It's like a brick wall to pathping, which gives up when it doesn't get any response. (Yes, the modem does have an internal IP, a technician let that slip.)

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