Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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 pingsweep_pm.pl isn't pinging Thoughts?


Comment on Re^4: Ping sweep with reporting

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2014-08-30 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls