Audiable Alarm
Derek Martin
ddm@mclinux.com
Wed, 19 Apr 2000 18:26:09 -0400 (EDT)
On Wed, 19 Apr 2000, Kirk Lawson wrote:
>
> Just started experimenting with the heartbeat package. Seems real nice.
>
> Question: How could I make the failover node generate an audiable alarm
> (say with the system speaker) every second or so when it's in failover
> mode? For instance, maybe add a script that reapeats a 'wall "Failover"'
> or 'printf "\a"' every second when the node is in failover and then
> terminates it when it's returned the IP.
For a very basic solution, when failover happens, you can have it call
this simple script (in the background most probably):
====================================
#!/bin/sh
while true; do
echo -e "^G"
sleep 1
done
=====================================
Note that that is a litteral ctrl-g -- you will probably need to use some
keystroke or editor command to get it in there based on whatever editor
you're using. In vi for example, you would type ctrl-v ctrl-g to insert
the litteral ctrl-g.
--
Derek Martin
System Administrator
Mission Critical Linux
martin@MissionCriticalLinux.com