Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: Ping sweep with reporting

by StarkRavingCalm (Sexton)
on May 17, 2007 at 20:14 UTC ( #616104=note: print w/ replies, xml ) Need Help??

in reply to Re^3: Ping sweep with reporting
in thread Ping sweep with reporting

Ok, here's what I have: <code> #!/usr/bin/perl use strict; use warnings; my $ping = "/bin/ping"; while (<DATA>) { chomp; my $ping_out = `$ping $_ 2> /dev/null`; chomp ($ping_out); if ($ping_out !~ /bytes from/) { print "$_ isn't pinging\n"; } else { print "$_ is up\n"; } } __DATA__ myserver02 <code/> And here's the output: root@stewie ~# perl isn't pinging Thoughts?

Comment on Re^4: Ping sweep with reporting

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616104]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2015-11-28 10:05 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (741 votes), past polls