![]() |
|
![]() |
AutoMate Discussion | ![]() |
help :
faq :
home
|
||
Latest News:
|
latest topics : statistics |
Topic Title: ping & tracert Topic Summary: Created On: 01/09/2013 06:27 AM Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
||||
Hello,
I am looking for some advice on how to proceed with the development of a workflow that will do the following: 1) Ping an IP address. 2) If the Ping succeeds, end the task. If the Ping fails, perform a 'tracert' command on the IP address in order to see the path it takes (hops). 3) Parse the results of the tracert command. (From what I understand, the tracert command will need to be performed via a "run" action, which basically just runs inside of a CMD window. What I mean by "parse" is that I'd like to store the results of each hop in a file or a database. Would this require some sort of custom VB solution? So far I've been able to store the raw output in a text file, but I'd like to have the data saved as a data-set or in a temporary table.) Please let me know your thoughts.
|
||||
|
||||
![]() |
||||
Matthew, a command like
C:\windows\system32>tracert 91.121.85.65 >c:\temp\tracert.txt results in a txt file containing something like Détermination de l'itinéraire vers www.ville-saint-ay.fr [91.121.85.65] avec un maximum de 30 sauts : 1 1 ms 1 ms 1 ms livebox.home [192.168.1.1] 2 18 ms 16 ms 17 ms AOrleans-156-1-41-1.w86-221.abo.wanadoo.fr [86.2 21.160.1] 3 19 ms 17 ms 17 ms 10.125.146.202 4 18 ms 18 ms 23 ms xe-3-3-0-0.ncorl201.Orleans.francetelecom.net [1 93.253.83.82] 5 20 ms 23 ms 22 ms bundle-ether45.ntpst101.Paris.francetelecom.net [193.252.98.22] 6 25 ms 26 ms 30 ms lag-1.nopst601.Paris.francetelecom.net [193.252. 98.14] 7 31 ms * 147 ms th2-5-6k.fr.eu [91.121.131.109] 8 20 ms 19 ms 19 ms th2-g1-a9.fr.eu [213.186.32.202] 9 247 ms 204 ms 105 ms rbx-g1-a9.fr.eu [91.121.215.133] 10 38 ms * 132 ms rbx-2-6k.fr.eu [213.186.32.234] 11 155 ms 204 ms 101 ms rbx-23-m1.fr.eu [213.251.191.192] 12 50 ms 35 ms 36 ms ns352656.ovh.net [91.121.85.65] Itinéraire déterminé. that you could parse, eliminating the 3 top and 2 bottom lines trimming each line to remove leading spaces replacing all multiple space sequences by a single , which results in a csv file then sql the file to make a dataset.
------------------------- Jean Delfosse - Automate Beta Tester Win7 Pro 64 bits -Win XP Pro SP3 32 bits - AM8, AM7, BPA10, BPA9, BPA8, BPA7, AM6 Enterprise, AM4 ![]() |
||||
|
||||
![]() |
||||
Thanks Jean, I will give this a shot.
|
||||
|
FuseTalk Enterprise Edition v4.0 - © 1999-2021 FuseTalk Inc. All rights reserved.