[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201104152211.46180@tux.boltz.de.vu>
Date: Fri, 15 Apr 2011 22:11:45 +0200
From: Christian Boltz <netdev-vger-kernel.org@...ltz.de>
To: Randy Dunlap <rdunlap@...otime.net>, netdev@...r.kernel.org
Subject: Re: Feature request: "inverted" ping -a (beep on failure)
Hello,
Am Freitag, 15. April 2011 schrieb Randy Dunlap:
> On Fri, 15 Apr 2011 21:35:32 +0200 Christian Boltz wrote:
> > I'd like to have the exact opposite of it: beep when pinging fails.
[...]
> Couldn't you look for exit code (status) 1 and then do a bell/beep
> (or play a sound file :)?
That would require that I know in advance when exactly the server is
unreachable - but in this case, I wouldn't need to ping it ;-)
To have this working, ping would need an option "exit on error", which
it doesn't have AFAIK.
A workaround is to run ping -c1 in a loop:
while true ; do
ping -c1 $server || beep
sleep 1
done
but I'd prefer to have something like this directly in ping ;-)
> Or do you want ping to beep and then continue running?
Yes, that's exactly what I want.
Gruß
Christian Boltz
--
> Ich moechte gern einige User die ihre Mails ueber einen Mailserver
> (sendmail bevorzugt, postfix auch moeglich) scannen.
Dafür reicht ein Kopierer. Hosen runter, User draufsetzen und "Copy"
drücken! [> Ralf Thomas und Sandy Drobic in suse-linux]
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists