From: Kemal YILDIRIM (kemalhy@gmail.com)
Date: Tue Sep 26 2006 - 15:54:12 ART
Hi John,
You can use the perl script below. If you install Active Perl, you can use
it on Windows also.
You have to change the line below in the original library file
perl\lib\net\ping\ping.pm
$def_proto = "tcp"; # Default protocol to use for pinging
#save this script as pingall.pm, and run from cli.
#default protocol must be changed from 'tcp' to 'icmp'
use Net::Ping;
$timeout= 2;
@branch=('branch1','branch2','branch3');
@ip=(6,34,35);
while() {
$i= 0;
while ($i <= 3) {
if (pingecho ('10.1.1.'.$ip[$i], $timeout)) {print "$ip[$i]
$branch[$i]\tUP\n";}
else {print "$ip[$i] $branch[$i]\tDOWN\n";}
$i++;
}
print "\n\n";
sleep 10;
}
HTH
Kemal
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of John
Matus
Sent: Tuesday, September 26, 2006 9:26 PM
To: Edouard Zorrilla
Cc: ccielab@groupstudy.com; Ivan
Subject: Re: ping script of redhat
well,
i'm actually trying to ping network devices from a redhat box........not a
router....that's why. i'm on a production network and can't just do this
from a router.
Regards,
John D. Matus
Technical Support / PAS
Fujitsu Consulting
626-568-7716
John.Matus@tokiom.com
"Edouard
Zorrilla"
<ezorrilla@tsf.co To
m.pe> "Ivan" <ivan@iip.net>,
<ccielab@groupstudy.com>, "John
09/26/2006 06:26 Matus" <John.Matus@tokiom.com>
AM cc
Subject
Re: ping script of redhat
Hello Sir,
I do not understand why you need this script. I mean, It should be inside
the router rather than inside a linux machine, am I right ?
Regards
----- Original Message -----
From: "Ivan" <ivan@iip.net>
To: <ccielab@groupstudy.com>; "John Matus" <John.Matus@tokiom.com>
Sent: Tuesday, September 26, 2006 2:36 AM
Subject: Re: ping script of redhat
> [ivan@ivan trash]$ more tcl.sh
> #!/usr/bin/tclsh
>
> global money_transfer
> global card_to
>
> set card_to 13
> set money_transfer 3
>
> set card_to [expr $card_to-$money_transfer]
>
> puts "card $card_to"
> puts "money $money_transfer"
> puts "card and money $card_to"
>
> On Tuesday 26 September 2006 02:08, John Matus wrote:
>> does anyone know how to execute a ping script of redhat?
>> i enter tcl>
>> and get =>
>> then i enter the ip's
>> and get =>=>=>
>> i put in } and get nada................
>>
>>
>> Regards,
>>
>> John D. Matus
>> Technical Support / PAS
>> Fujitsu Consulting
>> 626-568-7716
>> John.Matus@tokiom.com
>>
>>
>> ---------------------------------------------------------------------
>> - This e-mail is intended solely for the individual to whom it is
>> addressed.
>> The information contained in this transmission contains confidential
>> and/or proprietary information or is otherwise privileged. If the
>> reader of this message is not the intended recipient, please be
>> advised that any dissemination, distribution or copying of this
>> transmission is strictly prohibited. If you have received this e-mail
>> in error, please notify us immediately by returning it to the sender
>> and deleting this copy from your system. Thank you for your
>> cooperation.
>>
>> _____________________________________________________________________
>> __ Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>
> --
> Ivan
>
> ______________________________________________________________________
> _ Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
----------------------------------------------------------------------
This e-mail is intended solely for the individual to whom it is addressed.
The information contained in this transmission contains confidential and/or
proprietary information or is otherwise privileged. If the reader of this
message is not the intended recipient, please be advised that any
dissemination, distribution or copying of this transmission is strictly
prohibited. If you have received this e-mail in error, please notify us
immediately by returning it to the sender and deleting this copy from your
system. Thank you for your cooperation.
This archive was generated by hypermail 2.1.4 : Sun Oct 01 2006 - 16:55:41 ART