Audible warning when HDD goes bad

Kernels & Hardware, configuring network, installing services

Audible warning when HDD goes bad

Postby djevlen » 2020-03-24 11:19

Hi

How to configure hdd monitoring so when hdd is about to fail or S.M.A.R.T. is logging errors, the motherboard onboard speaker will give audible warnings ?

OS : Debian 10 buster
Mobo : Supermicro X7SPE-HF

All other similar questions are how to send email ...
Im not interested in emails...Server is at home and so am i... Audible warning will draw my attention must faster.

Any help would be greatly appreciated.
Thanx
djevlen
 
Posts: 14
Joined: 2013-02-06 20:08

Re: Audible warning when HDD goes bad

Postby pylkko » 2020-03-24 12:23

I don't think that there is a ready-made solution for this, but I may be wrong. However, you could in theory use beep

https://manpages.debian.org/buster/beep/beep.1.en.html

for example, in a script which polls the SMART data. This means that you would need to decide an interval at which to check the data (once a day? Once every hour?) and then check that a value is not exceeded (which ever value you are interested) and then have that script make the sound.

However, you must realize that hard drives many times fail without warning or that the indicator of detrimental change is not a necessarily a number, but how quickly the number changes. SO in this kind of case you would need a more sophisticated decision marker than a simple cutoff (like keep a history of some sort)

Also, this kind of thing might already be programmed into the firmware/UEFI/BIOS, so check that.
User avatar
pylkko
 
Posts: 1650
Joined: 2014-11-06 19:02

Re: Audible warning when HDD goes bad

Postby djevlen » 2020-03-26 12:54

hi

i know it should be something like this DEVICESCAN [...other...options...] -m <nomailer> -M exec /path/to/your/script

The problem is that i have no idea how to make scripts....

installed beep, but it only wants to run as root....

Strange no one else asked for this feature before.....

Hope some one will sooner or later see this thread and post a simple how to do...
djevlen
 
Posts: 14
Joined: 2013-02-06 20:08

Re: Audible warning when HDD goes bad

Postby pylkko » 2020-03-28 21:04

What are you saying? When you say "i know it should be something like this", in that sentence what is "it"? How do you know this? and why should something be something? Do you have previous experience with a software of this type.

If you do not have this option in your firmware, and you do not want to specify what you want to monitor (why do you not answer at least this, there is no way anyone can come here and reply to you unless you do). Then one thing you could do is run smartctl, which return as 0 if all is ok:

https://linux.die.net/man/8/smartctl

So, then your script would be something like do "beep" if smartctl returns something else than zero.
How often would you like to do this beep? For ever? or a short beep every certain minute/second?
User avatar
pylkko
 
Posts: 1650
Joined: 2014-11-06 19:02


Return to System configuration

Who is online

Users browsing this forum: Huecuva and 2 guests

fashionable