Computing.Net > Forums > Programming > Mass ping bat file using hostnames

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Mass ping bat file using hostnames

Reply to Message Icon

Name: addicted
Date: March 13, 2009 at 11:55:02 Pacific
OS: Server 2003
Subcategory: Batch
Comment:

I was asked to clean up an SMS server and I've noticed a lot of the computers on the list are not reporting as contactable. Its not likely that these are all offline as we've had some problems with the local SMS client on these desktops. To save me some time I'd like to create the following.

I'd like to create a BAT file that will:

1. Ping a workstation based off the desktops hostname for a minimum of 8 tries but no more then 20

2. Report only the computers that reply in a text file


Honestly my knowledge with scripting is horrible and I don't know how to do this. The server is Win2003 and I'm pinging WinXP boxes. If anyone can help me with this it is appreciated greatly. Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: March 13, 2009 at 19:24:02 Pacific
Reply:

How many machines are you talking about here?

It can be quite slow to ping with the timeouts involved and that needs multiplied over the number of machines. There are ways of speeding things up by using multiple threads, machines or both.

Also when you say 8-20 tries do you mean one attempt after another of staggered over a period of time?

Is this over lan or internet connections, fast or slow?

Are third party tools an option? There might be something out there that can pick up your list and do the job for you.

It is certainly possible, but without the details it is a little hard to say which direction is best.


0

Response Number 2
Name: reno
Date: March 13, 2009 at 21:15:02 Pacific
Reply:

i think the ping time can be reduced like this:
1. ping once only on each host
2. if host reply, move on to another host, if host does not reply, do another ping, eg ping -n 5 hostname.

i am also wondering why ping 8-20 times???


0

Response Number 3
Name: addicted
Date: March 14, 2009 at 14:28:25 Pacific
Reply:

>>>>>>It is certainly possible, but without the details it is a little hard to say which direction is best.

No worries I got something that will work yesterday. Thanks for the reply. This looks like a great community!


0

Response Number 4
Name: addicted
Date: March 14, 2009 at 14:30:22 Pacific
Reply:

>>>>>>>>i am also wondering why ping 8-20 times???

I was dealing with multiple domains across several states and one overseas. 8 tries would be better then 4. Thanks for the reply


0

Response Number 5
Name: cessna5041e
Date: April 25, 2009 at 10:44:17 Pacific
Reply:

Addicted- what did you end up using for your .bat file?


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Mass ping bat file using hostnames

ping bat file www.computing.net/answers/programming/ping-bat-file/16605.html

Append tags in XML using a BAT file www.computing.net/answers/programming/append-tags-in-xml-using-a-bat-file/16992.html

.BAT To use FTP and find first file in folder www.computing.net/answers/programming/bat-to-use-ftp-and-find-first-file-in-folder/19566.html