I want to have a configuration in my Ubuntu system so that if the cpu processing exceeds 90% it gives a beep sound. Is this possible?
Yes. I wrote a script that plays a notification sound when CPU load average exceeds 90% (accounting for all cores).
The system speaker is, by default, disabled on Ubuntu systems, hence using one of the standard notification sound seems a better choice for this.
To run it, simply download the script (save it as notify-highload.sh
), and copy to your home directory. Then, from a terminal, run chmod +x ./notify-highload.sh
, followed by ./notify-highload.sh -ag &
.
If you want it to run every time on start up, add the script to your Startup Applications
.
Also, where else can this beep sound be used? like can it be used if the Hard Disk space exceeds 80%.
Yes, it can. I wrote a script available here.
I will add a few more later on.
set
command here? why use it? Thanks – Tarun Sep 26 '13 at 08:10list
. Also, I have extended the script by adding lots of customization options. I will write a similar utility for hard drive utilisation later today. You can find detailed instructions and the next script here. – asheeshr Sep 28 '13 at 06:03paplay
(line 92) and perhaps you could include a comment about the source of the sound file. For example, I have/usr/share/sounds/alsa
and/usr/share/sounds/freedesktop/stereo
but I don't have/usr/share/sounds/ubuntu/...
. – Oct 09 '13 at 05:07paplay
is the frontend for Pulse Audio which is a almost a POSIX standard audio server running on all POSIX compliant distros. Its unlikely that any distro wont have it. – asheeshr Oct 09 '13 at 10:27