[ILUG] Sound Alerts
Niall O Broin
niall at magicgoeshere.com
Mon Sep 4 23:41:08 IST 2000
On Mon, Sep 04, 2000 at 06:00:40PM +0000, Subba Rao wrote:
> Has anyone tried to setup this type of alert system? If you succeeded, please
> let me know how you did it. I do wish to be notified for each alert on this
> system. I would like our busy sys admins, know what is happening on this system
> while they are working on neighbouring systems.
I haven't done this :-) but one solution immediately comes to mind - instead
of the alerting processes trying to play the sounds, you need to implement a
producer-consumer system. Producers are the alerting processes, and
they put alerts into a queue. There's a single consumer, which looks at
the queue and plays the first entry whenever it's not empty.
Implementation is left as an exercise for the reader - there are lots of
ways of implementing the queue - FIFO, file (locking issues to be taken care
of), directory. You might also need to pay attention to priority e.g. for
some reason the system is generating a large number of relatively
unimportant alerts and then an "Oh fsck - the disk's are on fire" alert is
posted. You'd probably like to hear this first :-)
Hope this has been of some assistance.
More information about the ILUG