Net::Ping WON'T WORK!!!!! 
Author Message
 Net::Ping WON'T WORK!!!!!

I've tried to use Net::Ping in my programs, but I can't seem to get it
to work right! For some reason, no matter what protocol I use, the
server never responds (yes, I've tried MANY different servers) . I am
using the sample script given in the module itself, not one of my own
design, so there's no reason why it shouldn't work. I tried running it
on both MacPerl and Unix. On MacPerl, no response from server, on Unix,
it gives an error regarding Socket.pm and how some arguement should have
the value 16 rather than 0.

If anyone has had success with this module, I'd greatly appreciate
seeing the source or getting some input as to how to get it to work.




Sat, 31 Mar 2001 03:00:00 GMT  
 Net::Ping WON'T WORK!!!!!

Peter,

   I've never had any problems with this module... i presume from your mention
of protocols that you are using the most recent version of Net::Ping. Can you not
just use
the (old) pingecho method...? Some thing like this should work fine:

use Net::Ping;
my $node = 'xyz';
if (pingecho($node, 2)) {
  print "$node is responding\n";

Quote:
}

else {
  print "$node is NOT responding...\n";

Quote:
}

     What was the exact error message you were getting, also which version of perl

are you running?

alex.
_________________________________________________________________________


Texas Instruments Limited,
800 Pavillion Drive,                   Tel (work):  01604 663450
Brackmills Industrial Estate,              (home):  01604 764961
Northampton, NN4 7YL.
U.K.

Quote:

> I've tried to use Net::Ping in my programs, but I can't seem to get it
> to work right! For some reason, no matter what protocol I use, the
> server never responds (yes, I've tried MANY different servers) . I am
> using the sample script given in the module itself, not one of my own
> design, so there's no reason why it shouldn't work. I tried running it
> on both MacPerl and Unix. On MacPerl, no response from server, on Unix,
> it gives an error regarding Socket.pm and how some arguement should have
> the value 16 rather than 0.

> If anyone has had success with this module, I'd greatly appreciate
> seeing the source or getting some input as to how to get it to work.





Sun, 01 Apr 2001 03:00:00 GMT  
 Net::Ping WON'T WORK!!!!!

Quote:

>I am having a similar problem with the Net::Ping module. I am using version
>5.004_04 on a Linux system. It does not work when trying to ping Linux or
>Windows systems from a Linux machine. It does work, however, when pinging
>Solaris X86 and HP/UX machines. Very strang indeed. I tried various timeouts
>without success. All of these machines are actually up and pingable from the
>command line. Any help would be greatly appreciated.

>Here is my short script:



>$timeout)) {  print "$hosts is alive\n";  }else{  print "$hosts is down\n";
>open MAIL, '|mail -s "WARNING, system is not responding" matt';  print MAIL
>"$hosts is down";  close MAIL;    }; };

pingecho uses tcp rather than icmp, so you're relying on a different
mechanism.  To see if the machineis responding on the tcp echo port you
might try

telnet firebird echo

and if you're connected it should echo data back at you, if you don't get
connected or it just sinks your data then pingecho will think the machine
is down.

To use icmp you need to read the Net::Ping docs and be running as root to
have a sporting chance.

Hope this helps,

Mike
--

http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41



Mon, 02 Apr 2001 03:00:00 GMT  
 Net::Ping WON'T WORK!!!!!

Quote:

>  It does not work when trying to ping Linux or
> > >Windows systems from a Linux machine. It does work, however, when pinging
> > >Solaris X86 and HP/UX machines.

I had same probs on the latest perl version. if you ever know the solution, feel
free to tell me.

Jester



Thu, 12 Apr 2001 02:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Net::Ping won't ICMP ping under W32

2. Net::Ping doesn't work with printers

3. net use won't work in perl

4. Net::Ping works on my linux but not on my NT

5. Net::Ping::Wont::Sodding::Work::Help!::

6. Net::Ping not working..

7. ts: ts: Remove files in a PERL sript

8. ts: ts: how to parse embedded commas

9. Net::Ping causing a die when trying to ping

10. Net::Ping - ping Linux host problem

11. my gif's won't work after copying them

12. Net::Telnet & Net::Ping

 

 
Powered by phpBB® Forum Software