Closed ddu17 closed 5 months ago
+1
We can get many more information there:
root@jupiter:~# smartctl -a /dev/sdc
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.2.6-1-pve] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.11
Device Model: ST31500341AS
Serial Number: 9LS4LC32
LU WWN Device Id: 5 000c50 02ca3beee
Firmware Version: CC1H
User Capacity: 1,500,301,910,016 bytes [1.50 TB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 7200 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Sat Jan 23 17:16:05 2016 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
See vendor-specific Attribute list for marginal Attributes.
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 609) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 292) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x103f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 119 099 006 Pre-fail Always - 213019430
3 Spin_Up_Time 0x0003 097 092 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 157
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 2
7 Seek_Error_Rate 0x000f 081 060 030 Pre-fail Always - 133413225
9 Power_On_Hours 0x0032 049 049 000 Old_age Always - 45088
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 4
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 61
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 099 000 Old_age Always - 65537
189 High_Fly_Writes 0x003a 091 091 000 Old_age Always - 9
190 Airflow_Temperature_Cel 0x0022 052 036 045 Old_age Always In_the_past 48 (Min/Max 44/48 #3950)
194 Temperature_Celsius 0x0022 048 064 000 Old_age Always - 48 (0 7 0 0 0)
195 Hardware_ECC_Recovered 0x001a 028 015 000 Old_age Always - 213019430
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 45087 (172 153 0)
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 723654821
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 709026093
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed without error 00% 24398 -
# 2 Extended offline Aborted by host 90% 24393 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Show Power_On_Hours, Temperature_Celsius and more, that mean deep debugging and analyzing for harddisks, i think if centreon-plugins can go that deep... That would be a great advantage over all the other monitoring scripts and tools ;)
some open data here : https://www.backblaze.com/b2/hard-drive-test-data.html
A plugin centreon could be interesting for Linux Appliances. Example a nagios plugin https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_smartmon/details
Proxmox server with a physical disk
./check_smartmon.py -h Usage: check_smartmon.py [options] device
Options: --version show program's version number and exit -h, --help show this help message and exit -d DEVICE, --device=DEVICE device to check -v LEVEL, --verbosity=LEVEL set verbosity level to LEVEL; defaults to 0 (quiet), possible values go up to 3 -w TEMP, --warning-threshold=TEMP set temperature warning threshold to given temperature (defaults to 55) -c TEMP, --critical-threshold=TEMP set temperature critical threshold to given temperature (defaults to 60)
./check_smartmon.py -d /dev/sda OK: device is functional and stable (temperature: 40)
./check_smartmon.py -d /dev/sda -v 1 Device: /dev/sda Path to smartctl: /usr/sbin/smartctl OK: device is functional and stable (temperature: 40)
./check_smartmon.py -d /dev/sda -v 3 Get device name Device: /dev/sda Check device Check if /dev/sda does exist and can be read Check if /usr/sbin/smartctl does exist and can be read Path to smartctl: /usr/sbin/smartctl Call smartctl Get device health status: /usr/sbin/smartctl -H /dev/sda Get device temperature: /usr/sbin/smartctl -A /dev/sda Parse smartctl output Health status: PASSED Temperature: 40 Generate return information OK: device is functional and stable (temperature: 40)
Hello :)
This issue seems particularly old so let me close it. If the enhancement request is still current, please address it here to be take into account and vote on. Thank you for your understanding.
Hello dev team,
It will be useful to have a plugin able to check health disks using smartmontools. This tool is very efficient to prevent disks issues.
For more inspiration, you should see this tweet : https://twitter.com/nixcraft/status/673830742275690496?s=03
Best regards.