Browse Source

First bunch of code and tests

master
Johann Schmitz 5 years ago
parent
commit
31ab8671e6
9 changed files with 646 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +9
    -0
      Makefile
  3. +2
    -0
      src/smartcheck/__init__.py
  4. +114
    -0
      src/smartcheck/check.py
  5. +20
    -0
      src/smartcheck/main.py
  6. +11
    -0
      tests/__main__.py
  7. +81
    -0
      tests/parsing.py
  8. +204
    -0
      tests/samples/seagate-barracuda-broken1.txt
  9. +204
    -0
      tests/samples/seagate-barracuda-broken2.txt

+ 1
- 0
.gitignore View File

@ -1,3 +1,4 @@
.idea
*.pyc
*.pyo
.coverage

+ 9
- 0
Makefile View File

@ -0,0 +1,9 @@
TARGET?=tests
test:
PYTHONPATH=".:./src" python tests/
coverage:
coverage erase
PYTHONPATH=".:./src" coverage run --source='src' --omit='src/test.py' --branch tests/__main__.py
coverage report -m

+ 2
- 0
src/smartcheck/__init__.py View File

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-

+ 114
- 0
src/smartcheck/check.py View File

@ -0,0 +1,114 @@
# -*- coding: utf-8 -*-
import re
INFORMATION_SECTION_START = '=== START OF INFORMATION SECTION ==='
DATA_SECTION_START = '=== START OF READ SMART DATA SECTION ==='
TESTS_SECTION_START = 'SMART Self-test log structure revision number'
INFORMATION_RE = [
("model_family", re.compile('Model Family: (.*)', re.UNICODE)),
("device_model", re.compile("Device Model: (.*)", re.UNICODE)),
("serial", re.compile("Serial Number: (.*)", re.UNICODE)),
("firmware_version", re.compile("Firmware version: (.*)", re.UNICODE)),
("ata_version", re.compile("ATA Version is: (.*)", re.UNICODE)),
("sata_version", re.compile("SATA Version is: (.*)", re.UNICODE)),
]
DATA_RE = [
('overall_health_status', re.compile('SMART overall-health self-assessment test result: (.*)', re.UNICODE)),
]
DATA_ATTRIBUTES_RE = re.compile(r"\s*(\d+)\s+([\w\d_\-]+)\s+([0-9a-fx]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+([\w\d_\-]+)\s+([\w\d]+)\s+([\w\d_\-]+)\s+(.*)", re.UNICODE)
TEST_RESULT_RE = re.compile(r"#\s*(\d+)\s+(.*?)\s{2,}(.*?)\s{2,}\s+([\d%]+)\s+(\d+)\s+(\d+|-)", re.UNICODE)
class SMARTCheck(object):
def __init__(self, file_or_stream):
self.raw = file_or_stream.read()
self.parsed_sections = None
@property
def information(self):
return self.parsed.get('information', {})
@property
def smart_data(self):
return self.parsed.get('data', {})
@property
def self_tests(self):
return self.parsed.get('self_tests', {})
@property
def parsed(self):
if not self.parsed_sections:
self.parsed_sections = self.parse()
return self.parsed_sections
def parse(self):
return {
'information': self.parse_information_section(self.raw),
'data': self.parse_data_section(self.raw),
'self_tests': self.parse_tests_section(self.raw),
}
def parse_information_section(self, s):
start = s.index(INFORMATION_SECTION_START)
end = s.index(DATA_SECTION_START)
if end < 0:
end = len(s)
if start < 0:
return {}
information_text = s[start:end]
d = {}
for k, regex in INFORMATION_RE:
m = regex.search(information_text)
if m:
d[k] = m.group(1).strip() if m.group(1) else ''
return d
def parse_data_section(self, s):
start = s.index(DATA_SECTION_START)
end = len(s) #s.index(DATA_SECTION_START)
if end < 0:
end = len(s)
if start < 0:
return {}
data_text = s[start:end]
#print(data_text)
d = {}
for k, regex in DATA_RE:
m = regex.search(data_text)
if m:
d[k] = m.group(1).strip() if m.group(1) else ''
d['attributes'] = DATA_ATTRIBUTES_RE.findall(s)
return d
def parse_tests_section(self, s):
start = s.index(TESTS_SECTION_START)
end = s.index('\n\n', start+1)
if end < 0:
end = len(s)
if start < 0:
return {}
tests_text = s[start:end]
return {
'test_results': TEST_RESULT_RE.findall(tests_text)
}

+ 20
- 0
src/smartcheck/main.py View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from argparse import ArgumentParser
import os
from smartcheck.check import SMARTCheck
DEFAULT_DATA_FILE=os.path.join(os.path.dirname(__file__), 'disks.json')
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument('--data-file', default=DEFAULT_DATA_FILE)
parser.add_argument('-f', '--file', help="Use S.M.A.R.T. report from file instead of calling smartctl")
args = parser.parse_args()
check = SMARTCheck(open(args.file, 'r'))
import pprint
#pprint.pprint(check.information)
pprint.pprint(check.smart_data)
#pprint.pprint(check.self_tests)

+ 11
- 0
tests/__main__.py View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
try:
import unittest2 as unittest
except ImportError:
import unittest
from parsing import *
if __name__ == '__main__':
unittest.main()

+ 81
- 0
tests/parsing.py View File

@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
import os
import unittest
from smartcheck.check import SMARTCheck
class InformationBlockParsingTest(unittest.TestCase):
def test_parsing(self):
samples_path = os.path.dirname(__file__)
for filename, expected_data in [
('samples/seagate-barracuda-broken1.txt', {
'ata_version': 'ATA8-ACS T13/1699-D revision 4',
'device_model': 'ST3000DM001-1CH166',
'model_family': 'Seagate Barracuda 7200.14 (AF)',
'sata_version': 'SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)',
'serial': 'Z1F220RJ'
}),
('samples/seagate-barracuda-broken2.txt', {
'ata_version': 'ATA8-ACS T13/1699-D revision 4',
'device_model': 'ST3000DM001-1CH166',
'model_family': 'Seagate Barracuda 7200.14 (AF)',
'sata_version': 'SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)',
'serial': 'Z1F23HW0'
}),
]:
check = SMARTCheck(open(os.path.join(samples_path, filename)))
self.assertDictEqual(check.information, expected_data)
class SMARTDataParsingTest(unittest.TestCase):
def test_parsing(self):
samples_path = os.path.dirname(__file__)
for filename, overall_health, attributes in [
('samples/seagate-barracuda-broken1.txt', 'PASSED', [
('1', 'Raw_Read_Error_Rate', '0x000f', '103', '099', '006', 'Pre-fail', 'Always', '-', '5845168'),
('3', 'Spin_Up_Time', '0x0003', '095', '095', '000', 'Pre-fail', 'Always', '-', '0'),
('4', 'Start_Stop_Count', '0x0032', '100', '100', '020', 'Old_age', 'Always', '-', '7'),
('5', 'Reallocated_Sector_Ct', '0x0033', '100', '100', '010', 'Pre-fail', 'Always', '-', '0'),
('7', 'Seek_Error_Rate', '0x000f', '087', '055', '030', 'Pre-fail', 'Always', '-', '643382224'),
('9', 'Power_On_Hours', '0x0032', '074', '074', '000', 'Old_age', 'Always', '-', '23115'),
('10', 'Spin_Retry_Count', '0x0013', '100', '100', '097', 'Pre-fail', 'Always', '-', '0'),
('12', 'Power_Cycle_Count', '0x0032', '100', '100', '020', 'Old_age', 'Always', '-', '7'),
('183', 'Runtime_Bad_Block', '0x0032', '100', '100', '000', 'Old_age', 'Always', '-', '0'),
('184', 'End-to-End_Error', '0x0032', '100', '100', '099', 'Old_age', 'Always', '-', '0'),
('187', 'Reported_Uncorrect', '0x0032', '092', '092', '000', 'Old_age', 'Always', '-', '8'),
('188', 'Command_Timeout', '0x0032', '100', '100', '000', 'Old_age', 'Always', '-', '0 0 0'),
('189', 'High_Fly_Writes', '0x003a', '100', '100', '000', 'Old_age', 'Always', '-', '0'),
('190', 'Airflow_Temperature_Cel', '0x0022', '071', '064', '045', 'Old_age', 'Always', '-', '29 (Min/Max 24/32)'),
('191', 'G-Sense_Error_Rate', '0x0032', '100', '100', '000', 'Old_age', 'Always', '-', '0'),
('192', 'Power-Off_Retract_Count', '0x0032', '100', '100', '000', 'Old_age', 'Always', '-', '5'),
('193', 'Load_Cycle_Count', '0x0032', '100', '100', '000', 'Old_age', 'Always', '-', '1574'),
('194', 'Temperature_Celsius', '0x0022', '029', '040', '000', 'Old_age', 'Always', '-', '29 (0 22 0 0 0)'),
('197', 'Current_Pending_Sector', '0x0012', '100', '100', '000', 'Old_age', 'Always', '-', '24'),
('198', 'Offline_Uncorrectable', '0x0010', '100', '100', '000', 'Old_age', 'Offline', '-', '24'),
('199', 'UDMA_CRC_Error_Count', '0x003e', '200', '200', '000', 'Old_age', 'Always', '-', '0'),
('240', 'Head_Flying_Hours', '0x0000', '100', '253', '000', 'Old_age', 'Offline', '-', '23044h+44m+28.078s'),
('241', 'Total_LBAs_Written', '0x0000', '100', '253', '000', 'Old_age', 'Offline', '-', '161370349869'),
('242', 'Total_LBAs_Read', '0x0000', '100', '253', '000', 'Old_age', 'Offline', '-', '78560290534'),
])
]:
check = SMARTCheck(open(os.path.join(samples_path, filename)))
self.assertEqual(check.smart_data['overall_health_status'], overall_health)
self.assertEqual(check.smart_data['attributes'], attributes)
class SelfTestParsingTest(unittest.TestCase):
def test_parsing(self):
samples_path = os.path.dirname(__file__)
for filename, tests in [
('samples/seagate-barracuda-broken1.txt', [
('1', 'Extended offline', 'Completed: read failure', '80%', '23113', '1737376544'),
('2', 'Extended offline', 'Completed: read failure', '80%', '23000', '1737376544'),
('3', 'Extended offline', 'Interrupted (host reset)', '80%', '22998', '-'),
('4', 'Extended offline', 'Completed without error', '00%', '5', '-'),
])
]:
check = SMARTCheck(open(os.path.join(samples_path, filename)))
self.assertEqual(check.self_tests['test_results'], tests)

+ 204
- 0
tests/samples/seagate-barracuda-broken1.txt View File

@ -0,0 +1,204 @@
smartctl 6.1 2013-03-16 r3800 [x86_64-linux-4.0.5-gentoo] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.14 (AF)
Device Model: ST3000DM001-1CH166
Serial Number: Z1F220RJ
LU WWN Device Id: 5 000c50 04f692485
Firmware Version: CC24
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes 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 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Sat Oct 10 14:03:18 2015 CEST
==> WARNING: A firmware update for this drive may be available,
see the following Seagate web pages:
http://knowledge.seagate.com/articles/en_US/FAQ/207931en
http://knowledge.seagate.com/articles/en_US/FAQ/223651en
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
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 120) The previous self-test completed having
the read element of the test failed.
Total time to complete Offline
data collection: ( 584) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No 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: ( 341) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x3085) SCT Status 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 103 099 006 Pre-fail Always - 5845168
3 Spin_Up_Time 0x0003 095 095 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 7
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 087 055 030 Pre-fail Always - 643382224
9 Power_On_Hours 0x0032 074 074 000 Old_age Always - 23115
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 7
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 092 092 000 Old_age Always - 8
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 0 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 071 064 045 Old_age Always - 29 (Min/Max 24/32)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 5
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 1574
194 Temperature_Celsius 0x0022 029 040 000 Old_age Always - 29 (0 22 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 24
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 24
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 23044h+44m+28.078s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 161370349869
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 78560290534
SMART Error Log Version: 1
ATA Error Count: 8 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 8 occurred at disk power-on lifetime: 22998 hours (958 days + 6 hours)
When the command that caused the error occurred, the device was doing SMART Offline or Self-test.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 80 ff ff ff 4f 00 30d+10:46:19.905 READ FPDMA QUEUED
60 00 00 ff ff ff 4f 00 30d+10:46:19.891 READ FPDMA QUEUED
60 00 80 ff ff ff 4f 00 30d+10:46:19.890 READ FPDMA QUEUED
ea 00 00 00 00 00 a0 00 30d+10:46:19.859 FLUSH CACHE EXT
60 00 80 ff ff ff 4f 00 30d+10:46:19.857 READ FPDMA QUEUED
Error 7 occurred at disk power-on lifetime: 18768 hours (782 days + 0 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 08 ff ff ff 4f 00 3d+07:06:33.203 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:33.203 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:33.203 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:33.203 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:33.203 READ FPDMA QUEUED
Error 6 occurred at disk power-on lifetime: 18768 hours (782 days + 0 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 f0 ff ff ff 4f 00 3d+07:06:30.038 READ FPDMA QUEUED
60 00 e8 ff ff ff 4f 00 3d+07:06:30.038 READ FPDMA QUEUED
60 00 40 ff ff ff 4f 00 3d+07:06:30.037 READ FPDMA QUEUED
60 00 28 ff ff ff 4f 00 3d+07:06:30.037 READ FPDMA QUEUED
60 00 28 ff ff ff 4f 00 3d+07:06:30.037 READ FPDMA QUEUED
Error 5 occurred at disk power-on lifetime: 18768 hours (782 days + 0 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 08 ff ff ff 4f 00 3d+07:06:15.769 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:15.769 READ FPDMA QUEUED
61 00 08 ff ff ff 4f 00 3d+07:06:15.769 WRITE FPDMA QUEUED
61 00 20 f8 65 05 41 00 3d+07:06:15.762 WRITE FPDMA QUEUED
61 00 08 28 b3 4b 40 00 3d+07:06:15.761 WRITE FPDMA QUEUED
Error 4 occurred at disk power-on lifetime: 18768 hours (782 days + 0 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 08 ff ff ff 4f 00 3d+07:06:12.772 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:12.771 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:12.771 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 3d+07:06:12.715 READ FPDMA QUEUED
61 00 08 ff ff ff 4f 00 3d+07:06:12.708 WRITE FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 80% 23113 1737376544
# 2 Extended offline Completed: read failure 80% 23000 1737376544
# 3 Extended offline Interrupted (host reset) 80% 22998 -
# 4 Extended offline Completed without error 00% 5 -
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.

+ 204
- 0
tests/samples/seagate-barracuda-broken2.txt View File

@ -0,0 +1,204 @@
smartctl 6.1 2013-03-16 r3800 [x86_64-linux-4.0.5-gentoo] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.14 (AF)
Device Model: ST3000DM001-1CH166
Serial Number: Z1F23HW0
LU WWN Device Id: 5 000c50 04f84f15e
Firmware Version: CC24
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes 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 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Oct 13 18:31:58 2015 CEST
==> WARNING: A firmware update for this drive may be available,
see the following Seagate web pages:
http://knowledge.seagate.com/articles/en_US/FAQ/207931en
http://knowledge.seagate.com/articles/en_US/FAQ/223651en
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
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
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: ( 592) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No 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: ( 342) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x3085) SCT Status 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 111 099 006 Pre-fail Always - 36133480
3 Spin_Up_Time 0x0003 094 094 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 8
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 087 055 030 Pre-fail Always - 554924299
9 Power_On_Hours 0x0032 074 074 000 Old_age Always - 23192
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 8
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 048 048 000 Old_age Always - 52
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0 0 0
189 High_Fly_Writes 0x003a 099 099 000 Old_age Always - 1
190 Airflow_Temperature_Cel 0x0022 056 053 045 Old_age Always - 44 (Min/Max 28/47)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 6
193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always - 1587
194 Temperature_Celsius 0x0022 044 047 000 Old_age Always - 44 (0 21 0 0 0)
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 - 23120h+47m+35.910s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 168403847415
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 32580907663
SMART Error Log Version: 1
ATA Error Count: 52 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 52 occurred at disk power-on lifetime: 23135 hours (963 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: WP at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
61 00 08 ff ff ff 4f 00 19:47:35.468 WRITE FPDMA QUEUED
60 00 08 ff ff ff 4f 00 19:47:35.468 READ FPDMA QUEUED
61 00 20 ff ff ff 4f 00 19:47:35.467 WRITE FPDMA QUEUED
61 00 08 ff ff ff 4f 00 19:47:35.467 WRITE FPDMA QUEUED
61 00 10 ff ff ff 4f 00 19:47:35.467 WRITE FPDMA QUEUED
Error 51 occurred at disk power-on lifetime: 23135 hours (963 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: WP at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
61 00 10 ff ff ff 4f 00 19:47:33.366 WRITE FPDMA QUEUED
61 00 28 ff ff ff 4f 00 19:47:33.366 WRITE FPDMA QUEUED
61 00 30 ff ff ff 4f 00 19:47:33.366 WRITE FPDMA QUEUED
61 00 30 ff ff ff 4f 00 19:47:33.366 WRITE FPDMA QUEUED
61 00 20 ff ff ff 4f 00 19:47:32.353 WRITE FPDMA QUEUED
Error 50 occurred at disk power-on lifetime: 23135 hours (963 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 00 ff ff ff 4f 00 19:47:28.814 READ FPDMA QUEUED
60 00 00 ff ff ff 4f 00 19:47:28.813 READ FPDMA QUEUED
60 00 00 ff ff ff 4f 00 19:47:28.813 READ FPDMA QUEUED
61 00 08 ff ff ff 4f 00 19:47:28.813 WRITE FPDMA QUEUED
61 00 10 ff ff ff 4f 00 19:47:28.813 WRITE FPDMA QUEUED
Error 49 occurred at disk power-on lifetime: 23135 hours (963 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 08 ff ff ff 4f 00 19:42:28.695 READ FPDMA QUEUED
60 00 00 00 6f a4 4d 00 19:42:28.695 READ FPDMA QUEUED
60 00 00 00 74 a4 4d 00 19:42:28.694 READ FPDMA QUEUED
60 00 80 80 6e a4 4d 00 19:42:28.694 READ FPDMA QUEUED
61 00 18 ff ff ff 4f 00 19:42:28.694 WRITE FPDMA QUEUED
Error 48 occurred at disk power-on lifetime: 23135 hours (963 days + 23 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 00 00 74 a4 4d 00 19:42:26.798 READ FPDMA QUEUED
60 00 00 00 6f a4 4d 00 19:42:26.798 READ FPDMA QUEUED
61 00 a8 ff ff ff 4f 00 19:42:26.714 WRITE FPDMA QUEUED
60 00 20 ff ff ff 4f 00 19:42:26.714 READ FPDMA QUEUED
61 00 18 ff ff ff 4f 00 19:42:26.713 WRITE FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Extended offline Completed: read failure 70% 23001 1988770936
# 2 Extended offline Interrupted (host reset) 80% 22998 -
# 3 Extended offline Completed without error 00% 5 -
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.

Loading…
Cancel
Save