Jump to content

Featured Replies

Posted

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/

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...