Jump to content
Compatible Support Forums
Sign in to follow this  
JohnDG

ping testing

Recommended Posts

I have a need to ping multiple devices in multiple sites on a daily basis. I also need to record the results, so we can tell if equipment is on-line and if response times are deteriorating. Can anyone tell me how to set up a script or file to do them all at once from a command prompt in Windows?

(Go easy on me, I'm not an expert at command prompt issues)

 

Thanks. John

Share this post


Link to post

you can use "ping host >test.txt"(without the quotes of course)

 

The results of the command will be printed on the file named test.txt

 

For multiple files create a batch file (.bat) and write as many ping commands you want like the one up followed by carriage return.e.g.

"ping host1 >test1.txt"

"ping host2 >test2.txt"

"ping host3 >test3.txt"

 

Then all you have to do is run the batch file from the command prompt and you're done.

 

The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten).

 

I'll ask some guru's at work and i might come up with the answer soon!

Share this post


Link to post

you can use "ping host >test.txt"(without the quotes of course)

 

The results of the command will be printed on the file named test.txt

 

For multiple files create a batch file (.bat) and write as many ping commands you want like the one up followed by carriage return.e.g.

"ping host1 >test1.txt"

"ping host2 >test2.txt"

"ping host3 >test3.txt"

 

Then all you have to do is run the batch file from the command prompt and you're done.

 

The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten).

 

I'll ask some guru's at work and i might come up with the answer soon!

Share this post


Link to post

Originally posted by thymios:

Quote:
The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten).

 

I'll ask some guru's at work and i might come up with the answer soon!

 

You just need to add a second > like so:

 

ping -n 5 xxx.xxx.xxx.xxx >> C:\ping.txt

 

 

That will keep adding to the log without overwriting it.

 

- Lotus

 

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×