Home All Groups Group Topic Archive Search About

How to ping multiple hosts via a script



Author
21 Apr 2007 4:14 PM
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

Author
21 Apr 2007 4:43 PM
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" <raff***@yahoo.com> wrote in message
news:9b2c4$462a3828$944e306e$484@STARBAND.NET...
> 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)


--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)
Author
21 Apr 2007 4:55 PM
Richard Mueller [MVP]
Show quote
"Herb Martin" <n***@learnquick.com> wrote in message
news:OV9Q%23QDhHHA.4924@TK2MSFTNGP06.phx.gbl...
>
> 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" <raff***@yahoo.com> wrote in message
> news:9b2c4$462a3828$944e306e$484@STARBAND.NET...
>> 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)
>
>
> --
> Herb Martin, MCSE, MVP
> http://www.LearnQuick.Com
> (phone on web site)
>
>

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.

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Author
21 Apr 2007 9:14 PM
Dana
Show quote
"Richard Mueller [MVP]" <rlmueller-nospam@ameritech.nospam.net> wrote in
message news:OpKpoXDhHHA.3852@TK2MSFTNGP04.phx.gbl...
>
> "Herb Martin" <n***@learnquick.com> wrote in message
> news:OV9Q%23QDhHHA.4924@TK2MSFTNGP06.phx.gbl...
>>
>> 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" <raff***@yahoo.com> wrote in message
>> news:9b2c4$462a3828$944e306e$484@STARBAND.NET...
>>> 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)
>>
>>
>> --
>> Herb Martin, MCSE, MVP
>> http://www.LearnQuick.Com
>> (phone on web site)
>>
>>
>
> 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.

Thanks. Pretty much what I was looking for.
Show quote
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
Author
21 Apr 2007 9:04 PM
Dana
Show quote
"Herb Martin" <n***@learnquick.com> wrote in message
news:OV9Q%23QDhHHA.4924@TK2MSFTNGP06.phx.gbl...
>
> 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" <raff***@yahoo.com> wrote in message
> news:9b2c4$462a3828$944e306e$484@STARBAND.NET...
>> 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.

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
Show quote
>
>> 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.

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.
Show quote
>
> --
> Herb Martin, MCSE, MVP
> http://www.LearnQuick.Com
> (phone on web site)
>
>
Author
21 Apr 2007 9:23 PM
Herb Martin
"Dana" <raff***@yahoo.com> wrote in message
news:5082e$462a7c20$944e306e$2070@STARBAND.NET...
>

> 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.)


--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)
Author
22 Apr 2007 4:11 AM
Dana
Show quote
"Herb Martin" <n***@learnquick.com> wrote in message
news:e7OIPtFhHHA.4772@TK2MSFTNGP05.phx.gbl...
>
> "Dana" <raff***@yahoo.com> wrote in message
> news:5082e$462a7c20$944e306e$2070@STARBAND.NET...
>>
>
>> 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.

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.
Show quote
>
>
> --
> Herb Martin, MCSE, MVP
> http://www.LearnQuick.Com
> (phone on web site)
>
Author
22 Apr 2007 9:36 PM
gene martinez
Show quote
"Dana" <raff***@yahoo.com> wrote:

>
>"Herb Martin" <n***@learnquick.com> wrote in message
>news:e7OIPtFhHHA.4772@TK2MSFTNGP05.phx.gbl...
>>
>> "Dana" <raff***@yahoo.com> wrote in message
>> news:5082e$462a7c20$944e306e$2070@STARBAND.NET...
>>>
>>
>>> 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.
>
>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.
>>

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...



Show quote
>> --
>> Herb Martin, MCSE, MVP
>> http://www.LearnQuick.Com
>> (phone on web site)
>>
>
>
Author
23 Apr 2007 5:01 AM
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.


..


Show quote
"Dana" <raff***@yahoo.com> wrote in message
news:9b2c4$462a3828$944e306e$484@STARBAND.NET...
> 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
>

AddThis Social Bookmark Button