How to ping multiple hosts via a script

D

Dana

Hi all.
I have some T1's that go over copper and Microwave.
I have devices that have both a copper span and a microwave span.
Our present tools have no capability for watching our T1's so in order to
try to identify if it is copper spans, or microwave spans, I am looking to
periodically ping my devices over a long period of time(say 6 hours or more)
and have the results sent to a file I can review to see which ports did not
respond to ping requests.
These errors are very intermittant hence the need for a long period of
testing.
I would also like to know if it is possible to not send a continuous ping
for this time, but say once every 3 to 5 minutes I send out 4 pig requests
for the test.
Thanks
 
H

Herb Martin

We encourage REASONABLE Crossposting of a single message
and although to a casual observer your collection of groups might
seem excessive, most of those groups are fairly low volume and so
this makes perfect sense to those who read them regularly.

Dana said:
Hi all.
I have some T1's that go over copper and Microwave.
I have devices that have both a copper span and a microwave span.
Our present tools have no capability for watching our T1's so in order to
try to identify if it is copper spans, or microwave spans, I am looking to
periodically ping my devices over a long period of time(say 6 hours or
more) and have the results sent to a file I can review to see which ports
did not respond to ping requests.

"Ports" are not used by ping requests. Ping is an ICMP protocol.

You will need to either create, download, or buy something that will
monitor on a per port basis if that is your goal.

There are many such utilities already on the net. You can use a scripted
command line "telnet" or better NetCat (which is a free download) to
control this much more effectively.

But there are pre-built utilities for determining "server up" status,
complete
with email or other notification capabilities.
These errors are very intermittant hence the need for a long period of
testing.
I would also like to know if it is possible to not send a continuous ping
for this time, but say once every 3 to 5 minutes I send out 4 pig requests
for the test.

Sure. Ping once, if successful, sleep for 300 seconds, else send an alert
or email.

More complicated scripting can require some number of continuous failures
before the warning is sent.

Ping 1-5 times, if more than half fail notify., else wait 180 seconds.

Notice that ping is commonly blocked by many firewalls* and only tests the
"box" not a particular service.

You can do something similar with telnet or NetCat however on any particular
port -- with NetCat you can test both TCP (web, ftp) and UDP (DNS etc)
 
R

Richard Mueller [MVP]

Herb Martin said:
We encourage REASONABLE Crossposting of a single message
and although to a casual observer your collection of groups might
seem excessive, most of those groups are fairly low volume and so
this makes perfect sense to those who read them regularly.



"Ports" are not used by ping requests. Ping is an ICMP protocol.

You will need to either create, download, or buy something that will
monitor on a per port basis if that is your goal.

There are many such utilities already on the net. You can use a scripted
command line "telnet" or better NetCat (which is a free download) to
control this much more effectively.

But there are pre-built utilities for determining "server up" status,
complete
with email or other notification capabilities.


Sure. Ping once, if successful, sleep for 300 seconds, else send an alert
or email.

More complicated scripting can require some number of continuous failures
before the warning is sent.

Ping 1-5 times, if more than half fail notify., else wait 180 seconds.

Notice that ping is commonly blocked by many firewalls* and only tests the
"box" not a particular service.

You can do something similar with telnet or NetCat however on any
particular
port -- with NetCat you can test both TCP (web, ftp) and UDP (DNS etc)

If it helps, I have 3 example VBScript functions to ping remote computers
linked here:

http://www.rlmueller.net/PingComputers.htm

The method you used depends on your OS and version of WSH. You can specify
number of pings and timeout value. As suggested, you could use a loop with
Wscript.Sleep.
 
D

Dana

Herb Martin said:
We encourage REASONABLE Crossposting of a single message
and although to a casual observer your collection of groups might
seem excessive, most of those groups are fairly low volume and so
this makes perfect sense to those who read them regularly.



"Ports" are not used by ping requests. Ping is an ICMP protocol.

Ports as used described are the physical ports on my telco equipment where
my t1 attaches. Each blade has an IP for that port.
You will need to either create, download, or buy something that will
monitor on a per port basis if that is your goal.

There are many such utilities already on the net. You can use a scripted
command line "telnet" or better NetCat (which is a free download) to
control this much more effectively.

Thanks for the net cat ref.
But there are pre-built utilities for determining "server up" status,
complete
with email or other notification capabilities.

Wastes to much resources, and the ones I have seen are not very modifiable
Sure. Ping once, if successful, sleep for 300 seconds, else send an alert
or email.

More complicated scripting can require some number of continuous failures
before the warning is sent.

Ping 1-5 times, if more than half fail notify., else wait 180 seconds.

Notice that ping is commonly blocked by many firewalls* and only tests the
"box" not a particular service.

Not a concern here, as It is our telco network, and we can work
around/permit those devices to reply
You can do something similar with telnet or NetCat however on any
particular
port -- with NetCat you can test both TCP (web, ftp) and UDP (DNS etc)

Being these are all telco devices hooked up by T1's I am only concerned with
latency and responses to ensure my T1 link is up.
 
H

Herb Martin

Ports as used described are the physical ports on my telco equipment where
my t1 attaches. Each blade has an IP for that port.
Not a concern here, as It is our telco network, and we can work
around/permit those devices to reply
Being these are all telco devices hooked up by T1's I am only concerned
with latency and responses to ensure my T1 link is up.

You are now making me believe you actually using the word "port"
in a different way which is also unrelated to ping etc.

You can only ping things with an IP address. Such hardward "ports"
frequently don't have an IP and are not NICs in this sense we think
of this for things with an IP.

Telco equipment (CSU/DSU or equivalents, bridges, and some switches)
just don't always have IP addresses, and you may have to depend on
hardware features to loopback or test them.

Or you have to Ping THROUGH them to something on the "other side"
which although it really doesn't test the "port" effectively proves when it
IS WORKING. (As opposed to proving that it has failed since the
device with the IP or something else might be the problem.)
 
D

Dana

Herb Martin said:
You are now making me believe you actually using the word "port"
in a different way which is also unrelated to ping etc.

In the telco world. Port is a physical connection. Can be fiber, copper, ip,
etc
Since telco is moving to an IP infrastructure, many of our devices have IP
addresses.
I am not talking about the tcp port numbers, I know what they are used for.
You can only ping things with an IP address. Such hardward "ports"
frequently don't have an IP and are not NICs in this sense we think
of this for things with an IP.

On one blade which has an IP address, I have 4 t1 port connections possible.
I use two, one over a microwave shot, and one over copper.
Other locations have all 4 ports being used, and of course you can have
multiple blades that support T1 connections.
What I am trying to do is some of my equipment does not have IPs but does
have better T1 stats I can look at. My devices that can be pinged will help
me in identifying where my T1 problems are coming from, a common class 5
switch, my cable plant, or my microwave shot.
We are a small telco, hence we do not have the test equipment budget of
larger telcos, hence using do with what is available for testing is all we
can do. Hence I can see if my links are going down to my equipment that are
ip addressable by using the ping command. As I am only concerned with the
physical T1 links, using ping is a way to verify my t1 connection is still
up if I can ping the device.
Trying to talk the boss into getting a solar winds type product for our IP
addressed equipment for monitoring, but he is shying away from the price.
Or you have to Ping THROUGH them to something on the "other side"
which although it really doesn't test the "port" effectively proves when
it
IS WORKING. (As opposed to proving that it has failed since the
device with the IP or something else might be the problem.)

Not so much concerned about the port on the equipment, but the physical link
between my equipment, which is carried over both cable and microwave.
 
G

gene martinez

Dana said:
In the telco world. Port is a physical connection. Can be fiber, copper, ip,
etc
Since telco is moving to an IP infrastructure, many of our devices have IP
addresses.
I am not talking about the tcp port numbers, I know what they are used for.

On one blade which has an IP address, I have 4 t1 port connections possible.
I use two, one over a microwave shot, and one over copper.
Other locations have all 4 ports being used, and of course you can have
multiple blades that support T1 connections.
What I am trying to do is some of my equipment does not have IPs but does
have better T1 stats I can look at. My devices that can be pinged will help
me in identifying where my T1 problems are coming from, a common class 5
switch, my cable plant, or my microwave shot.
We are a small telco, hence we do not have the test equipment budget of
larger telcos, hence using do with what is available for testing is all we
can do. Hence I can see if my links are going down to my equipment that are
ip addressable by using the ping command. As I am only concerned with the
physical T1 links, using ping is a way to verify my t1 connection is still
up if I can ping the device.
Trying to talk the boss into getting a solar winds type product for our IP
addressed equipment for monitoring, but he is shying away from the price.

Not so much concerned about the port on the equipment, but the physical link
between my equipment, which is carried over both cable and microwave.

Take a look at ServersAlive at Woodstone.nu. Great little program.
Does all you want and much more that you haven't even thought of...
 
A

asdf

What you are referring to is the heartbeat of a machine.

You need not use the 'final' equipment to monitor this.


------------------------------------


Be subltle, do not have your ISP sending yo a letter for port scanning etc.

-----------------------------------------------------------------------------------------------------


Do NOT deploy eaqipment, that may microwave humans, for god's sake.


..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top