Perl Ping

2014-08-24 Thread Matt
Looking at ping in perl. http://perldoc.perl.org/Net/Ping.html Ii do not see a way to ping with a pattern the way it is allowed under shell with -p. http://linux.about.com/od/commands/l/blcmdl8_ping.htm Is there a way to use pattern without resorting to shell?

RE: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread David Christensen
Amit Saxena wrote: > I want a perl ping script (console based) to monitor server up/down state. Here's something I wrote ~2000 FWIW. It looks like I was still on dial-up, and wanted to ping an Internet host every ~10 seconds or so to prevent my connection from being dropped due to in

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
Hi Bob, It seems there is some confusion. I just want to monitor remote server connectivity (either through ping or something else) but I don't want to call my programs every few intervals etc. What I want is a daemon sort of a thing in Perl running either on the source system (preferably)

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
Thanks Thomas, I will surely look at mon to know about how to write monitoring code in Perl. Thanks & Regards, Amit Saxena On Tue, Jul 21, 2009 at 5:25 AM, Thomas Bätzler wrote: > Amit Saxena wrote: > > Hi Thomas, > > > > Thanks for the response. > > > > The client for which I am working will

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread PANG J.
Amit Saxena : Hi all, I want a perl ping script (console based) to monitor server up/down state. I once made that a subroutine based on Net::Ping: use Net::Ping; sub pinghost { my $host = shift; my $type = shift || 'icmp'; my $port = shift || 7; # for syn pi

RE: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Bob McConnell
install this one? They have to learn how be reasonable before you will be able to do much for them. Ping will only tell you that the target computer is up, still connected to the network and reachable from your workstation. It won't tell you if the particular service[*] you want to monit

AW: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Thomas Bätzler
Amit Saxena wrote: > Hi Thomas, > > Thanks for the response. > > The client for which I am working will not allow any external utility / > modules to be installed on their development / production environments. > Moreover they want the solution implemented using Perl only. Actually, mon ist pure

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Eric Veith
Subject:Re: How to implement ping script to monitor server up/down state in perl ? Hi Thomas, Thanks for the response. The client for which I am w

Re: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
9 at 4:43 AM, Thomas Bätzler wrote: > Amit Saxena asked: > > I want a perl ping script (console based) to monitor server up/down > > state. > > Why re-invent the wheel when there's already stuff like mon ( > http://mon.wiki.kernel.org/index.php/Main_Page) or

AW: How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Thomas Bätzler
Amit Saxena asked: > I want a perl ping script (console based) to monitor server up/down > state. Why re-invent the wheel when there's already stuff like mon (http://mon.wiki.kernel.org/index.php/Main_Page) or nagios (http://www.nagios.org/)? HTH, Thomas -- To unsubscribe, e-mail

How to implement ping script to monitor server up/down state in perl ?

2009-07-21 Thread Amit Saxena
Hi all, I want a perl ping script (console based) to monitor server up/down state. So far I have tried two different approaches, though none of them were successful. *First Approach* Call the operating system "ping" command from the Perl program and get the server up/down state.

Re: How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-12 Thread Amit Saxena
agement with it and, of course, perl:) > > -Original Message- > From: kevin liu [mailto:lwtben...@gmail.com] > Sent: Friday, April 10, 2009 10:13 > To: Amit Saxena > Cc: Perl Beginners > Subject: Re: How to login from one system (A) into remote system (B) and > do a

RE: How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-09 Thread Zhao, Bingfeng
[mailto:lwtben...@gmail.com] Sent: Friday, April 10, 2009 10:13 To: Amit Saxena Cc: Perl Beginners Subject: Re: How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI ! I think this depends on what kind of OS you are using. If you are

Re: How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-09 Thread kevin liu
to login from one system (A) into remote > system (B) and do a ping to the third system (C). > > As of now, I have successfully written the code in Perl CGI to Ping any > host > / IP using built it Perl Net::Ping module. > > However I am not sure how to login (preferably usi

How to login from one system (A) into remote system (B) and do a ping to the third system (C) with Perl and CGI !

2009-04-01 Thread Amit Saxena
Hello everybody, I need to write a Perl CGI script to login from one system (A) into remote system (B) and do a ping to the third system (C). As of now, I have successfully written the code in Perl CGI to Ping any host / IP using built it Perl Net::Ping module. However I am not sure how to

Re: AW: Net::Ping Bug found?

2007-05-21 Thread John W. Krahn
Angerstein wrote: > Ethereal would do, too. They've changed the name from Ethereal to Wireshark. John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

AW: Net::Ping Bug found?

2007-05-20 Thread Angerstein
traffic. Thanks, Bastian -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Tom Phoenix Gesendet: Mittwoch, 16. Mai 2007 23:12 An: Angerstein Cc: beginners@perl.org Betreff: Re: Net::Ping Bug found? On 5/16/07, Angerstein <[EMAIL PROTECTED]>

Re: Net::Ping Bug found?

2007-05-16 Thread Tom Phoenix
On 5/16/07, Angerstein <[EMAIL PROTECTED]> wrote: Start iptrace with Machine #1: Doesn't have iptrace. OpenBSD 4.0 system. Machine #2: Doesn't have iptrace. MacOS X 10.4.9. I hope that other testers have better results for you! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-ma

AW: Net::Ping Bug found?

2007-05-16 Thread Angerstein
I can hand my Routine to you people. Use: Start iptrace with iptrace -i en1 -S 1500 -P ICMP /tmp/trace.bin (when you kill iptrace use kill -15 important!!!) Use this code # use Net::Ping; my $p; # Ping Objekt my $r = 127.0.0.1; # Give any IP address

Re: applying a regular expression on the continuous output of ping command

2007-05-16 Thread Goran
Something like this: ping geekcrossing.net | perl -nle 'print $1 if /time=(\d+\.\d+)/' HTH Goran -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Net::Ping Bug found?

2007-05-16 Thread Tom Phoenix
On 5/16/07, Angerstein <[EMAIL PROTECTED]> wrote: So Please: Could somebody verify this on her/his own System? I'm sure that many people will be glad to help you. Could you please supply a small program that testers could run and send you the output? Good luck with your project! --Tom Phoeni

Net::Ping Bug found?

2007-05-16 Thread Angerstein
Hi there! I am using Net::Ping on AIX (here 5.2) and I noticed a strange behaviour concerning the ICMP Payload Data Field. If I do a typical default ping with $p = new Net::Ping('icmp', $ping_timeout); I will get a EthernetII-IP-ICMP-Package (so far so good), but this package does not

Re: applying a regular expression on the continuous output of ping command

2007-05-16 Thread Chas Owens
On 5/16/07, Srinivainputs <[EMAIL PROTECTED]> wrote: Hi, ping geekcrossing.net|perl -le "m/time=(\d+)/;print $1"; Can some one help me with the above command Add an n to the perl arguments to get it loop over stdin and use single quotes to prevent shell from trying to inter

applying a regular expression on the continuous output of ping command

2007-05-16 Thread Srinivas
Hi, ping geekcrossing.net|perl -le "m/time=(\d+)/;print $1"; Can some one help me with the above command -srini -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

overcome "ping requires root privilege" when running as a cgi script

2006-09-19 Thread ubergoonz
Hi, I wonder if anyone have a solution to the subject problem when using Net::Ping ? -- Best Regards, ubergoonz

RE: catching output from ping

2005-09-09 Thread Thomas Bätzler
Hi, Christopher Spears <[EMAIL PROTECTED]> wrote: > I've decided to rework my Perl script that pings a blade and > checks for nrnode: > > my @bladeNumbers = @ARGV; > > if (scalar @bladeNumbers == 0) { > print "No blades entered!\n"; > exit; > } if( my @bladeNumbers = @ARGV ){ ## cod

Re: catching output from ping

2005-09-09 Thread Jeff Pan
if (`ping $blade` =~ /$badPing/) {print "$blade: $badPing\n";} change to: my @results=`ping -c1 $blade`; print "$blade:$badPing\n" if grep /$badPing/,@results; On Fri, 9 Sep 2005 01:41:19 -0700 (PDT), "Christopher Spears" <[EMAIL PROTECTED]> said: >

Re: catching output from ping

2005-09-09 Thread John Doe
in scalar context when used in a condition) > { > print "No blades entered!\n"; > exit; > } > foreach $_(@bladeNumbers) { foreach (@bladeNumbers) { ($_ is implicitly used) >my $blade = "blade-".$_; >print "$blade\n"; >

catching output from ping

2005-09-09 Thread Christopher Spears
uot;; my $badPing = "Destination Host Unreachable"; if (`ping $blade` =~ /$badPing/) {print "$blade: $badPing\n";} my $nrnode = `ssh $blade ps aux | grep nrnode`; if ($nrnode =~ /nrnode/) {print "Found nrnode for $blade!\n";} } The problem line is: if (`ping

using ping on Net module

2005-07-28 Thread arjun.mallik
Hi , I have to verify whether the servers [windows , Linux ] which are integrated to my Unix machine are alive or not . I am using Net::Ping. Problem i am facing is , i am able to verify all Unix machines integrated . And not the Windows & Linux machines which integrated to my UNIX

using ping on Net module

2005-07-28 Thread arjun.mallik
Hi , I have to verify whether the servers [windows , Linux ] which are integrated to my Unix machine are alive or not . I am using Net::Ping. Problem i am facing is , i am able to verify all Unix machines integrated . And not the Windows & Linux machines which integrated to my UNIX box. pl

RE: printing output of ping command -- New question at bottom.

2005-02-24 Thread Tyson Sommer
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 2:50 PM > To: Perl Beginners > Subject: Re: printing output of ping command -- New question > at bottom. > > Tyson Sommer wrote: > > > > Th

RE: printing output of ping command -- New question at bottom.

2005-02-24 Thread Tyson Sommer
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 1:18 PM > To: Tyson Sommer > Cc: 'Perl Beginners List' > Subject: Re: printing output of ping command -- New question > at bottom. > > On

Re: printing output of ping command -- New question at bottom.

2005-02-23 Thread John W. Krahn
Tyson Sommer wrote: This might be a question for beginners-cgi, but since it was mentioned here... I tried to use Net::Ping in a CGI script and it said I didn't have permissions to run ping. I can execute the section of the CGI script with the call to Net::Ping just fine from the cmd line

Re: printing output of ping command -- New question at bottom.

2005-02-23 Thread Chris Devers
ies? Instead of my $pinger = Net::Ping->new("icmp") || die; Why not use my $pinger = Net::Ping->new("icmp") || die "Can't make pinger: $!"; This might at least give you a more descriptive error message... Also, are you having CGI::Carp us

printing output of ping command -- New question at bottom.

2005-02-23 Thread Tyson Sommer
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 23, 2005 10:14 AM > To: TapasranjanMohapatra > Cc: Perl Beginners List > Subject: Re: printing output of ping command > > On Wed, 23 Feb 2005, TapasranjanMohapatr

Re: printing output of ping command

2005-02-23 Thread Chris Devers
On Wed, 23 Feb 2005, TapasranjanMohapatra wrote: > I have a script as follows > > my $host = shift; > my $count = shift; > my $result = `ping -c $count $host`; > if($result =~ m/$count packets transmitted, $count packets received/) > { > $

Re: printing output of ping command

2005-02-23 Thread Ankur Gupta
TapasranjanMohapatra wrote: Hi All, I have a script as follows my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print "$res

Re: printing output of ping command

2005-02-23 Thread radhika
This works: #!/usr/bin/perl use strict; use diagnostics; my $host = "www.netbsd.org"; my $count = 0; system("ping -c 5 $host"); = thx, Radhika > Hi All, > I have a script as follows > > my $host = shift; > my $cou

printing output of ping command

2005-02-23 Thread TapasranjanMohapatra
Hi All, I have a script as follows my $host = shift; my $count = shift; my $result = `ping -c $count $host`; if($result =~ m/$count packets transmitted, $count packets received/) { $success = 1; } print "$result\n"; Now, when

Re: qx{} and ping problem.

2004-09-09 Thread Gary Stainburn
On Thursday 09 Sep 2004 12:20 pm, Flemming Greve Skovengaard wrote: [snip] > > Don't you mean 'ping -n -c 50 10.1.1.31' instead of 'ping -n 50 > 10.1.1.31'. Else read the man page for ping. Thanks for that, missed the obvious. -- Gary Stainburn This

Re: qx{} and ping problem.

2004-09-09 Thread Flemming Greve Skovengaard
Gary Stainburn wrote: Hi folks. Got the simplest of small scripts that runs ping and shows the summary. However, although the ping command works at the shell, it doesn't work in the perl script. any ideas? #!/usr/bin/perl -w while(1) { my @lines=qx{ping -n 50 10.1.1.31}; my $time

qx{} and ping problem.

2004-09-09 Thread Gary Stainburn
Hi folks. Got the simplest of small scripts that runs ping and shows the summary. However, although the ping command works at the shell, it doesn't work in the perl script. any ideas? #!/usr/bin/perl -w while(1) { my @lines=qx{ping -n 50 10.1.1.31}; my $times=pop @lines; my $c

Re: Recording Ping responses in perl part 2

2004-08-24 Thread Ben Crane
Prasanna Kothari, Excellent, I've seen the mistake I made with my program now thanx to yours! Cheers. One more thing, Is there any module that allows you to log network errors whilst the program is pinging?? Thanx Ben ___ Do you Yahoo!? Win 1 of 4,0

RE: Recording Ping responses in perl

2004-08-23 Thread Bob Showalter
Ben Crane wrote: > Hi all, > > I need to set the ping command running for a few hours > on my machine, and record (the exact time/date) then > the ping function fails. > > I have tried putting a script together but no joy. > Does anyone have a script like this that I cou

Re: Recording Ping responses in perl

2004-08-23 Thread Prasanna Kothari
hi, Have a look at the module Net::Ping for more options. here's a sample script that pings a host once and prints the result. #!/usr/bin/perl -w use strict; use English; use Net::Ping; my $host = ""; my $p = Net::Ping->new("icmp"); my $val = $p->ping($host); if(!(

Recording Ping responses in perl

2004-08-23 Thread Ben Crane
Hi all, I need to set the ping command running for a few hours on my machine, and record (the exact time/date) then the ping function fails. I have tried putting a script together but no joy. Does anyone have a script like this that I could please "borrow"?? I need to run the c

Re: :Ping Cannot redirect output !

2003-03-31 Thread Scott R. Godin
mmented out. > > > > non-existent? since when? > > > > perldoc Net::Ping > > > >$p->bind($local_addr); > >Sets the source address from which pings will be sent. This must [snip] > >ping() for that object. > > Y

Re: :Ping Cannot redirect output !

2003-03-30 Thread R. Joseph Newton
Rob Dixon wrote: > I am running with Net::Ping 2.02, which was the version that came with my > Perl version 5.6.1. It doesn't appear to be dated, apart from a (c) 1996, Curiouser and curiouser... NAME Net::Ping - check a remote host for reachability $Id: Ping.pm,v 1.6 2002/

Re: :Ping Cannot redirect output !

2003-03-30 Thread Rob Dixon
R. Joseph Newton wrote: > "Scott R. Godin" wrote: > > > > Without debating the possible usefulness of it when set improperly by > > inexperienced coders, In Net::Ping 2.28 which I have installed here, and > > which appears to be the most recent version ava

Re: :Ping Cannot redirect output !

2003-03-30 Thread R. Joseph Newton
l to the non-existent > > > > bind() function was commented out. > > > > > > non-existent? since when? > > > > > > perldoc Net::Ping > > > > > >$p->bind($local_addr); > > >Sets the source address from w

Re: :Ping Cannot redirect output !

2003-03-30 Thread R. Joseph Newton
"Scott R. Godin" wrote: > I think it probably would be better to quote the entire parameter > > list for perl, but it did run fine once the call to the non-existent > > bind() function was commented out. > > non-existent? since when? > > perldoc Net:

Re: :Ping Cannot redirect output !

2003-03-30 Thread Scott R. Godin
R. Joseph Newton wrote: > "Bakken, Luke" wrote: > >> > $!=1; >> >> $! contains error text, if I remember correctly off the top of my head. >> >> Use $| = 1 instead for autoflush. This shouldn't cause redirect >> problems, tho. >>

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
Rob Dixon wrote: > R. Joseph Newton wrote: > > > > > $p->bind("192.168.2.211"); # Specify source interface of pings [with no my or > > > our] > > But it's a method call on an existing object ;-) Oops, my bad. cited the wrong line--should h

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread Rob Dixon
R. Joseph Newton wrote: > > > $p->bind("192.168.2.211"); # Specify source interface of pings [with no my or our] But it's a method call on an existing object ;-) /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: :Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
"Bakken, Luke" wrote: > > $!=1; > > $! contains error text, if I remember correctly off the top of my head. > > Use $| = 1 instead for autoflush. This shouldn't cause redirect > problems, tho. > > > use Net::Ping; > > @host_array = ; > >

Re: Net::Ping Cannot redirect output !

2003-03-29 Thread R. Joseph Newton
Ramprasad wrote: > I cant beleive this , it seems so impossible can anyone help me I can. You ae not using strict. > ... > @host_array = ; # no my > $p = Net::Ping->new("icmp"); # no my > $p->bind("192.168.2.211"); # Speci

Re: Net::Ping Cannot redirect output !

2003-03-28 Thread Ramprasad
; autoflush STDOUT; use Net::Ping; @host_array = ; $p = Net::Ping->new("icmp"); $p->bind("192.168.2.211"); # Specify source interface of pings I don't know of a 'bind' method for this module. I may be new, of course. foreach $host (@host_array) { chomp(

Re: Net::Ping Cannot redirect output !

2003-03-28 Thread Rob Dixon
dle; autoflush STDOUT; > use Net::Ping; > @host_array = ; > $p = Net::Ping->new("icmp"); > $p->bind("192.168.2.211"); # Specify source interface of pings I don't know of a 'bind' method for this module. I may be new, of course. > foreach $h

RE: :Ping Cannot redirect output !

2003-03-28 Thread Bakken, Luke
> $!=1; $! contains error text, if I remember correctly off the top of my head. Use $| = 1 instead for autoflush. This shouldn't cause redirect problems, tho. > use Net::Ping; > @host_array = ; > $p = Net::Ping->new("icmp"); > $p->bind("192.168.2.2

Net::Ping Cannot redirect output !

2003-03-28 Thread Ramprasad
I have written a simple script that runs file when I run on command line but fails when I redirect its output I cant beleive this , it seems so impossible can anyone help me $!=1; use Net::Ping; @host_array = ; $p = Net::Ping->new("icmp"); $p->bind("192.168.2.211"); # S

Net::POP3 ping method Help

2002-09-27 Thread Steve Gilbert
Does anyone have any experience using the ping method from Net::POP3? I've included the following code, after running I get "Cannot get ping stats:" #/usr/bin/perl -w use Net::POP3; $pop = Net::POP3->new($mail_server) or die "Can't connect $!\n"; defined (

Re: Problem with Net::Ping

2002-07-31 Thread Sudarshan Raghavan
On Tue, 30 Jul 2002, drieux wrote: > I was somewhat surprised that the ping("tcp") method 'failed' > on an unvarnished linux box... You are right, I got confused between the stream echo server and the tcp one. The tcp echo requests do get replied to without having t

AW:AW: Problem with Net::Ping

2002-07-30 Thread Angerstein
package is generated. Maybe a problem between perl, ping.pm and my OS : AIX 4.3.3. Thanks > -Ursprüngliche Nachricht- > Von: Sudarshan Raghavan [mailto:[EMAIL PROTECTED]] > Gesendet am: Dienstag, 30. Juli 2002 22:47 > An: Perl beginners > Betreff: Re: Problem with Net::Ping

Re: Problem with Net::Ping

2002-07-30 Thread drieux
oth these > cases the application service if running handles the request unlike ICMP > where the protocol provides for this facility. [..] good point... cf: http://www.wetware.com/drieux/pbl/Sys/Admin/netPing.txt I was somewhat surprised that the ping("tcp") method 'faile

Re: Problem with Net::Ping

2002-07-30 Thread drieux
On Tuesday, July 30, 2002, at 09:18 , Jean-Luc BEAUDET wrote: [..] > Yu have to be aware that, generally, if yu go out the local network > FireWall > block ICMP packets... > > The ping statement is not a good evidence test... excuse me while I giggle... a bit here. I have n

Re: Problem with Net::Ping

2002-07-30 Thread Sudarshan Raghavan
On Tue, 30 Jul 2002, drieux wrote: > > On Tuesday, July 30, 2002, at 01:31 , Sudarshan Raghavan wrote: > [..] > > The system ping command sends ICMP echo packets and by default Net::Ping > > sends udp packets. This will work only if the machine you are pinging > >

Re: Problem with Net::Ping

2002-07-30 Thread drieux
On Tuesday, July 30, 2002, at 01:31 , Sudarshan Raghavan wrote: [..] > The system ping command sends ICMP echo packets and by default Net::Ping > sends udp packets. This will work only if the machine you are pinging > supports udp echo requests. For compatibility with system pin

Re: Problem with Net::Ping

2002-07-30 Thread Sudarshan Raghavan
On Tue, 30 Jul 2002, Angerstein wrote: > Hello, > I wrote a big skript which uses net::ping (ping.pm) (and tk). > I noticed that the resultes of Net::Ping are not identical to the system > commad ping. > Much more Items are not reachable over Net::Ping then they are over the &

Problem with Net::Ping

2002-07-30 Thread Angerstein
Hello, I wrote a big skript which uses net::ping (ping.pm) (and tk). I noticed that the resultes of Net::Ping are not identical to the system commad ping. Much more Items are not reachable over Net::Ping then they are over the system command. I can´t explain why. (Even after rewriting 500 lines

Re: Trouble with Net::Ping

2002-03-01 Thread Joseph Bajin
Hmmm. I tried putting in the icmp instead, but because I am not root I am unable to run it. I don't understand why I can ping it from the command line just fine but not in this program. Any more ideas. [EMAIL PROTECTED] wrote: >Try changing the line below to: > >$t = Net::P

Re: Trouble with Net::Ping

2002-03-01 Thread Jan Gruber
Hi, Joseph && list ! On Friday 01 March 2002 02:44 pm, you wrote: > I am appearing to have some > troubles. It appears that it can not reach the hosts specified, but when I > try it manually it works just fine. # use TCP if we're not root, ICMP if we are my $pong = Net:

RE: Trouble with Net::Ping

2002-03-01 Thread Timothy Johnson
Try changing the line below to: $t = Net::Ping->new('icmp'); by default Net::Ping uses UDP packets, but not all hosts will respond to this. -Original Message- From: Joseph Bajin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 8:43 AM To: [EMAIL PROTE

Trouble with Net::Ping

2002-03-01 Thread jbajin
I am appearing to have some troubles. It appears that it can not reach the hosts specified, but when I try it manually it works just fine. Here is what I have for my code: #!/usr/bin/perl -w use strict; use Net::Ping; Initalize Variables# my @hosts= qw(au

Trouble with Net::Ping

2002-02-27 Thread Joseph Bajin
I am appearing to have some troubles. Here is what I have for my code: #!/usr/bin/perl -w use strict; use Net::Ping; Initalize Variables# my @hosts= qw(au); my $t; my @lines; my $hostname; my %status; #while(1){ $t = Net::Ping->new(); fore

Re: ping

2002-02-26 Thread Peter Scott
IL PROTECTED]">news:[EMAIL PROTECTED]... > > At 09:19 AM 2/22/02 +, Lanceo wrote: > > >Hi, > > > > > >I am having difficulty getting the Net::Ping module to work properly. I >am > > >using ActivePerl 5.6.1.631 on a win32 platform. I can ping a s

RE: ping

2002-02-26 Thread Timothy Johnson
I was referring to the other suggestions offered in this thread, but if the servers are yours then you should be able to get around the ping problem I was talking about. -Original Message- From: Lanceo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 7:31 AM To: [EMAIL

Re: ping

2002-02-26 Thread Lanceo
What other methods? I am trying to see if a server is alive and reachable. Often our servers will respond to a ping, but IIS has fallen over or there is some problem that stops pages from being served. So right now I have two tools to use - Ping, and fetching a page from the server and

Re: ping

2002-02-26 Thread Lanceo
> > >I am having difficulty getting the Net::Ping module to work properly. I am > >using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a > >dos prompt ok, but when I try to get the Perl Net::Ping to work it always > >returns a failure. It seems to po

RE: ping

2002-02-22 Thread Timothy Johnson
I had the same problem at first, but I've found that if you want the Net::Ping module to work on a Win32 platform, you might have better luck sticking to the ICMP protocol (which is what your command-line ping is using). Something like this usually works for me: my $p = Net::Ping->n

Re: ping

2002-02-22 Thread Peter Scott
At 09:19 AM 2/22/02 +, Lanceo wrote: >Hi, > >I am having difficulty getting the Net::Ping module to work properly. I am >using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a >dos prompt ok, but when I try to get the Perl Net::Ping to work it always >

Re: ping

2002-02-22 Thread Chris
Lanceo wrote: > Hi, > > I am having difficulty getting the Net::Ping module to work properly. I am > using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a > dos prompt ok, but when I try to get the Perl Net::Ping to work it always > returns a failure.

Re: ping

2002-02-22 Thread Johan H
On Fri, 2002-02-22 at 15:18, insomniak wrote: > Hi > If you are looking to find out is a host is alive try this bit of code. > > $host = www.google.com; > $ip=join ".",unpack("C4",(gethostbyname($host))[4]); > > $ip will be empty if host is dead > > from command line > > perl -e "print join \"

Re: ping

2002-02-22 Thread insomniak
gethostbyname(@ARGV[0]))[4]);" www.google.com hope this helps Regards Mark - Original Message - From: "Tanton Gibbs" <[EMAIL PROTECTED]> To: "Lanceo" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 10:27 AM Subject: Re:

Re: ping

2002-02-22 Thread Tanton Gibbs
anyone know why alarm is unimplemented in my version? Also, what can I do to add it? Thanks! Tanton - Original Message - From: "Lanceo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 4:19 AM Subject: ping > Hi, > > I am having d

ping

2002-02-22 Thread Lanceo
Hi, I am having difficulty getting the Net::Ping module to work properly. I am using ActivePerl 5.6.1.631 on a win32 platform. I can ping a server in a dos prompt ok, but when I try to get the Perl Net::Ping to work it always returns a failure. It seems to ponder over pinging the host for a

Re: Simple Perl Ping Sweep (Windoze)

2002-02-20 Thread Johnathan Kupferer
Ted Lee wrote: >Hey guys, > >I've been playing with Perl, and I've built a simple ICMP Ping sweep program >that accepts start and end IP, and pings every host in between. > >Question I have is, I want to reduce the time it takes to do so, I was >considering spawn

Simple Perl Ping Sweep (Windoze)

2002-02-20 Thread Ted Lee
Hey guys, I've been playing with Perl, and I've built a simple ICMP Ping sweep program that accepts start and end IP, and pings every host in between. Question I have is, I want to reduce the time it takes to do so, I was considering spawning a processes for X number of hosts to ping

RE: Net::Ping

2001-10-23 Thread Peter Scott
n that case, I'd need to see the error message. >However, per >the docs, you have to be root to use ICMP. Does this then mean that when run >as "not-root" the ICMP parameter is ignored and defaults to TCP? That might >explain this. I don't think so: % perl -MNet::

RE: Net::Ping

2001-10-23 Thread Gary L. Armstrong
defaults to TCP? That might explain this. -=GLA=- -Original Message- From: Peter Scott [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 1:52 AM To: Daniel Falkenberg; [EMAIL PROTECTED] Subject: Re: Net::Ping At 11:28 AM 10/23/01 +0930, Daniel Falkenberg wrote: >Firstly. I h

Re: Net::Ping

2001-10-22 Thread Peter Scott
At 11:28 AM 10/23/01 +0930, Daniel Falkenberg wrote: >Firstly. I have a host using a 56k modem connection. When I ping these >servers using the ping object > >$p = Net::Ping->new("icmp"); > >If the server that is being pinged doesn't respond it gen

Net::Ping

2001-10-22 Thread Daniel Falkenberg
Hi all, I have just been playing with Net::Ping recently and have a few questions that I need clarifing if any one has the time. Firstly. I have a host using a 56k modem connection. When I ping these servers using the ping object $p = Net::Ping->new("icmp"); If the s

Re: Version question - Comment on ping script

2001-08-18 Thread smoot
> Kevin der Kinderen <[EMAIL PROTECTED]> said: > Thanks for the comments Smoot. > > I thought "while (<>) {...}" was the same as "foreach (<>) {...}". Is this > because foreach provides a list context to the file being read and while > provides scalar context? I read this in the camel book but

Re: Version question - Comment on ping script

2001-08-18 Thread Kevin der Kinderen
> > I usually add a "-V" or --version option to the code which displays the > current version number. Take a look at Getopt::Std or Getopt ::Long > for option processing. > > > For those who might want to comment - here's the code... (be kind - I'm > &g

Re: Version question - Comment on ping script

2001-08-18 Thread smoot
ent version number. Take a look at Getopt::Std or Getopt ::Long for option processing. > For those who might want to comment - here's the code... (be kind - I'm > new at this). > > ./live > #!/usr/bin/perl -w > > use strict; > use warnings; >

Version question - Comment on ping script

2001-08-18 Thread Kevin der Kinderen
I'd appreciate any comments on the code below. I run it like this: ./live new("icmp"); foreach (<>) { chomp; if ($_ eq "") { print STDERR "\nDone\n"; exit(0); } print "$_ is

Re: Re:Net::Ping

2001-07-17 Thread Robert Graham
Hi Jorge You can define the host name as a string eg. $host = "hostname"; where hostname represents the host name on your network, and then refer to the string in the ping command: unless ($p->ping($host)) Hope this helps Robert Graham > Hi I have the following code: > &g

Re:Net::Ping

2001-07-17 Thread Jorge Goncalvez
- Begin Forwarded Message - Date: Mon, 16 Jul 2001 17:48:29 +0200 (MEST) From: Jorge Goncalvez Subject: Re:Retrieve host To: [EMAIL PROTECTED] Mime-Version: 1.0 Content-MD5: wPL9znYmDeTyzQcXNKmp1Q== Hi I have the following code: use Net::Ping; $p = Net::Ping

RE: perl ping script using cgi

2001-06-02 Thread boumans
Dave Palmer <[EMAIL PROTECTED]>: > > open PINGRESULTS, ">/tmp/pingresults.$$" or die $!; > > open PING, "-|" or exec "/usr/sbin/ping", "-sRv", "-I", "1", > > $pnode, 64, 5); > > while () { print P

RE: perl ping script using cgi

2001-06-02 Thread boumans
ess. You just need to know how to do it without opening a > > shell. The > > given example: > > > > : > system "(/usr/sbin/ping -sRv -I 1 $pnode 64 > 5)>/tmp/pingresults.$$"; > > > > is bad bad bad because it opens a shell to run the command. (Hi

  1   2   >