Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Redirect Question

by phydeauxarff (Priest)
on Sep 15, 2003 at 18:04 UTC ( #291621=note: print w/replies, xml ) Need Help??

in reply to Redirect Question

On another note, why not go ahead and just add Net::Ping to your script so it will have the functionality instead of requiring you to pipe in output from ping?

use Net::Ping; my $ping = new Net::Ping ("icmp"); my $PING_TIMEOUT = 2; my $IP=$_; if ($ping->ping($IP, $PING_TIMEOUT)) { print "Ping Succeeded \n"; } else { print "Ping failed\n";} $ping->close();

Then you can just run your script with your IP as an argument...this would even make it easy to automate automate the script to run a list of IP's on a regular basis.

Replies are listed 'Best First'.
Re: Re: Redirect Question
by jbaribeault (Novice) on Sep 15, 2003 at 18:45 UTC
    Thanks all!
    The script is just a quick-and-dirty capture to quantify some outage times for a customer. Since I knew I could just grok the output from a ping -s on solaris, that is what I did - simple. Thanks for the ideas though, and I will use Net:Ping if I ever need to do this again.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://291621]
Discipulus sometimes i'm here alone with you, bony brother
[Discipulus]: ok a Perl one: how approach the task of getting all distinct paths from the edge to a node of a pascal triangle (nobackwards)?
[Discipulus]: each node has 2 descendants only: can i just compose hash keys usinng coords?
[karlgoethebier]: Discipulus: you shouldn't smoke turkish spices before noon
[Discipulus]: karl you says the same of my mom: in your place I'd been
[Discipulus]: preoccupied.. ;=)
Discipulus stopped with turkisk spices anyway.. but better hashes than arrays!

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2018-03-19 10:55 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.