LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-13-2014, 05:52 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 531

Rep: Reputation: Disabled
Automatic HDD health check?


Hello,

this command returns disk health status:
Code:
smartctl -a /dev/sda
like:
Quote:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 140 140 054 Pre-fail Offline - 68
3 Spin_Up_Time 0x0007 100 100 024 Pre-fail Always - 0
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 3
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 124 124 020 Pre-fail Offline - 33
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 870
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 3
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 7
193 Load_Cycle_Count 0x0012 100 100 000 Old_age Always - 7
194 Temperature_Celsius 0x0002 214 214 000 Old_age Always - 28 (Min/Max 21/30)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
I want to ask how i can automate smartctl so i get notiffied by email that disk health status is unacceptable?

Is there any script for that?

============
found this in /etc/smartd.conf
# /dev/hdc -a -I 194 -W 4,45,55 -R 5 -m admin@example.com
# /dev/hdc -H -C 0 -U 0 -m admin@example.com[/code]

Please when i uncomment the first line, how can i veriffy these checks really running and can i relly on it i will be notiffied? (how frequently run)
/dev/hdc dont exist, and /dev/sda returns "-bash: /dev/hdc: No such file or directory" (when i run that line in command line)

Also there are more scripts:
http://nixcraft.com/showthread.php/1...ll=1#post33371
http://hotfortech.wikispaces.com/HD+monitor+script
http://rhau.se/2012/11/08/disk-check-script/
https://help.ubuntu.com/community/Smartmontools (on the bottom)
http://csidiropoulos.wordpress.com/2...mail-on-error/

Last edited by postcd; 04-13-2014 at 06:53 AM.
 
Old 04-13-2014, 06:38 AM   #2
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
well for slackware use the cron script http://docs.slackware.com/slackware:beginners_guide scroll down to cron.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Hardware health check abohmeed Linux - Hardware 5 04-22-2012 07:35 AM
how to check raid health rajiv.patil82 Linux - Hardware 1 04-06-2010 05:34 AM
check the health of a drive? genmaicha Linux - General 3 08-28-2009 06:57 PM
Health Check / Server Completion Check Software? tells Linux - Enterprise 0 04-20-2006 12:03 PM
Sparc5, no peripherals, health-check? Tinkster Solaris / OpenSolaris 4 12-05-2005 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration