Linux Server - Alert to sound!?!?

Questions and Answers : Unix/Linux : Linux Server - Alert to sound!?!?
Message board moderation

To post messages, you must log in.

AuthorMessage
DanHansen@Denmark
Volunteer tester
Avatar

Send message
Joined: 14 Nov 12
Posts: 194
Credit: 5,881,465
RAC: 0
Denmark
Message 1592706 - Posted: 27 Oct 2014, 2:21:50 UTC

Hi,


Any of you Linux guys who knows a way to make a shell-script to run a sound-file??? I'm using shell-scripts to watch temperatures and in case of things getting too hot, a warning email is send. But, I would like to be able to run a warning using sound as well. This because I decided to "dump" the hardware temperature sensor/fan controller. The differences between the measured temperatures were to large.

If you have an idea, please let me know ;)

Kind Regards,
Dan
Project Headless CLI Linux Multiple GPU Boinc Servers
Ubuntu Server 14.04.1 64bit
Kernel 3.13.0-32-generic
CPU's i5-4690K
GPU's GT640/GTX750TI
Nvidia v.340.29
BOINC v.7.2.42

ID: 1592706 · Report as offensive
OTS
Volunteer tester

Send message
Joined: 6 Jan 08
Posts: 369
Credit: 20,533,537
RAC: 0
United States
Message 1602833 - Posted: 20 Nov 2014, 1:57:17 UTC - in response to Message 1592706.  

There is not much going on in “Number Crunching” so I was poking around and found this unanswered.

I use a utility called “beep” that doesn’t even require speakers or a sound card since it uses the PC speaker. It works great and I use it for several scripts. The nice thing about it is that you can vary the pitch, the length of the beep, the number of beeps, and the time between beeps. The script I depend the most on a day to day basis is a script that checks the maillog every minute and beeps a particular pattern of beeps depending on the sender, e.g. 4 beeps for my brother, 3 for a good friend, 5 series of 2 beeps if a script on a remote server detects somebody logged in and sends an email etc.

I run my servers on Slackware and their link for beep is

http://ftp.slackware.org.uk/slacky/slackware-12.2/utilities/beep/1.2.2/src/

but if you do a search for “beep-1.2.2” in Google I think you will find it in other distributions as well.

As additional information I found that when I first installed it, it didn’t work. It turns out that you have to add the pcspkr module to the kernel. In Slackware that means uncommenting “/sbin/modprobe pcspkr” in /etc/rc.d/rc.modules. I also found that since the PC speaker is now a transducer more than an actual speaker that it produces one tone much louder than the others higher or lower in frequency. For a warning tone you might want to try different frequencies to find where that sweet spot is for maximum volume.

YMMV but I hope this helps.
ID: 1602833 · Report as offensive
DanHansen@Denmark
Volunteer tester
Avatar

Send message
Joined: 14 Nov 12
Posts: 194
Credit: 5,881,465
RAC: 0
Denmark
Message 1611861 - Posted: 10 Dec 2014, 19:56:02 UTC

Hi SDH ;)


Sorry for the late answer... I haven't noticed this before this very second. Sorry for that!

Thanks! I've been trying to solve this problem a long time now. I've just not made it a priority but I would very much like to make this work. It's a little "thing" I want my system to do ;)

So thanks for that! I'll look at the links and see if I can come up with a solution to the issue ;)

Have a very nice day ;)

Kind Regard
D
Project Headless CLI Linux Multiple GPU Boinc Servers
Ubuntu Server 14.04.1 64bit
Kernel 3.13.0-32-generic
CPU's i5-4690K
GPU's GT640/GTX750TI
Nvidia v.340.29
BOINC v.7.2.42

ID: 1611861 · Report as offensive

Questions and Answers : Unix/Linux : Linux Server - Alert to sound!?!?


 
©2024 University of California
 
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.