Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Perl ICMP ping multiple servers connect availability check simultaneously

by aladdin123 (Initiate)
on Sep 24, 2014 at 07:13 UTC ( #1101750=perlquestion: print w/replies, xml ) Need Help??

aladdin123 has asked for the wisdom of the Perl Monks concerning the following question:

After searching around CPAN and PerlMonk, I can hardly find some matching answer of my network monitoring requirements.

There are 500 machines, we need to "PING" (or ICMP packet sending and receiving) from one node to every other node, in a very short interval (like 1 second).

So we need to fire a bunch of ICMP packets simultaneously to 499 servers, and receive response within a timeout period (like 1 second).

Gurus please advise some possible programming methods, which can do this "continuously" network monitor.

Thanks!

  • Comment on Perl ICMP ping multiple servers connect availability check simultaneously

Replies are listed 'Best First'.
Re: Perl ICMP ping multiple servers connect availability check simultaneously
by Corion (Patriarch) on Sep 24, 2014 at 07:28 UTC
Re: Perl ICMP ping multiple servers connect availability check simultaneously
by salva (Canon) on Sep 24, 2014 at 07:20 UTC

      nmap even has XML output, and there is Nmap::Parser, which consumes the output of nmap and provides it as a Perl data structure.

Re: Perl ICMP ping multiple servers connect availability check simultaneously
by thargas (Deacon) on Sep 24, 2014 at 13:02 UTC

    You might also want to consider the (not uncommon) case where enough of the networking stack is still working that the host will respond to ICMP, but it's still non-functional. Monitoring the "upness" of a host is non-trivial. I ended up doing asynchronous SNMP queries for uptime as this also told me if the host had rebooted since last time I asked.

Re: Perl ICMP ping multiple servers connect availability check simultaneously
by thospel (Hermit) on Sep 29, 2014 at 09:34 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1101750]
Approved by davies
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2022-05-17 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?