[svlug] how to ping a dead system

HvR hvrietsc at yahoo.com
Mon May 1 11:24:34 PDT 2000


try $ ping -c 1 10.1.1.1

(or any other non reachable system) and all i get is
the ping command just sits there and sits there and
sits there ...). all i can do is terminate it with ^C
(not really very scriptable).

Hvr

--- Ray Olszewski <ray at comarre.com> wrote:
> 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 
>       
>
----------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/mailman/listinfo/svlug
> 

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/





More information about the svlug mailing list