[svlug] how to ping a dead system

Ray Olszewski ray at comarre.com
Mon May 1 11:20:32 PDT 2000


Well ... when I do the same thing in perl, I use this line:

        $isitthere = system ("ping -c 2 $ipaddress >/dev/null")   ;

It works for both successful and unsuccessful pings, returning (into
$isitthere) 0 for success, non-zero (I haven't checked the actual return
code) for failure. So your problem is probably in the details, and since you
(obviously) didn't quote the exact line you use in the script, we can't spot
a detail error.

At 10:57 AM 5/1/00 -0700, HvR wrote:
>i want to create a script that pings all my favourite
>machines and when one of them has died it should send
>an email to me. 
>
>so i send a ping -c1 xxx.xxx.xxx
>BUT if the system is dead this ping just does not seem
>to terminate. Any tips on what my script should do to
>catch this?

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA           	 	         ray at comarre.com        
----------------------------------------------------------------






More information about the svlug mailing list