playing short tune via beep
John Heim
jheim at math.wisc.edu
Wed Mar 12 16:51:43 UTC 2008
----- Original Message -----
From: "Andor Demarteau" <andor at nl.linux.org>
To: "Linux for blind general discussion" <blinux-list at redhat.com>
Sent: Tuesday, March 11, 2008 3:11 PM
Subject: Re: playing short tune via beep
> On Tue, 11 Mar 2008, Geoff Shang wrote:
>
> > Andor Demarteau wrote:
> >
> > > a central C is 440hz so you could calculate the rest and play a trye
> > > melodie like you could do in gwbasic zo long ago :)
> >
> > 440Hz is A, not C. It is the A above middle C on a piano.
> ofcourse, how stupid of me :(
Wow... It's amazing how long this thread has survived. Every few weeks, it
comes back.
I was hoping somebody would already have some tunes they'd written with
beep. But I eventually put together some tunes by just experimenting with
parameters. And it works really well, In fact, my beep-alarm on my computer
at home went off at 3:00 AM this morning. I had configured my linux box at
home to trigger an alarm if it couldn't get status info from the apache
server at work. As it turned out, it was just that my ISP had changed my IP
address in the middle of the night and the status page on the apache server
is restricted by IP. When the apache server rejected the request for status
info because it came from an unrecognized IP, that triggered the alarm.
It was kind of a pain but I was gratified to know the system is working.
The tunes I wrote are supposed to sound like bird songs. The first 3 notes
of a robin song "cheer-e-o" signals trouble. The first 2 notes of a cardinal
song, "right here!", signals a recovery. And the 4 notes of a white throated
sparrow, "oh canada", mean unknown error.
The status checks are done via a package called nagios. I wrote a plug-in
for nagios to download the server-status document from an apache server and
parse it. So with this plug-in, you can configure nagios to trigger an alarm
if the number of apache sub-processes goes over some limit. This could
indicate that the server is close to being over loaded. Of course, the alarm
would also go off if it can't get the status info at all.
Nagios is really cool though. I will have to configure it so it doesn't
check between 11 PM and 6 AM. There is nothing I can do if there is a
problem during those hours anyway.
More information about the Blinux-list
mailing list