From a1c34483571584105e013ec801b1027d157f0181 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Tue, 7 Nov 2023 22:58:28 -0800 Subject: [PATCH] feat: add JSON testing data - Add README about test data. - Add script to redact sensitive fields. - Add JSON testing data collected from many systems, with redaction of sensitive fields. The initial corpus includes: - NVME drives - SAS drives - HDD only, no SSD - SCSI drives - HDD only, no SSD - SATA drives - SSD & HDD Signed-off-by: Robin H. Johnson --- redact_fake_json.py | 65 ++ testdata/.gitignore | 1 + testdata/HGST_HUS724020ALE640_28.json | 860 ++++++++++++++++++++ testdata/HITACHI_H109060SESUN600G_10.json | 120 +++ testdata/HITACHI_H109060SESUN600G_9.json | 122 +++ testdata/HP_73.4G_MAS3735NC_25.json | 101 +++ testdata/Hitachi_HUA722020ALA330_29.json | 481 +++++++++++ testdata/INTEL_SSDPE2KX080T8_1.json | 90 ++ testdata/INTEL_SSDPE2KX080T8_3.json | 90 ++ testdata/INTEL_SSDPE2KX080T8_4.json | 90 ++ testdata/INTEL_SSDPE2KX080T8_5.json | 90 ++ testdata/INTEL_SSDPE2KX080T8_6.json | 90 ++ testdata/INTEL_SSDPE2KX080T8_7.json | 90 ++ testdata/KXG60ZNV512G_TOSHIBA_2.json | 120 +++ testdata/KXG60ZNV512G_TOSHIBA_8.json | 120 +++ testdata/MB0500EBNCR_13.json | 612 ++++++++++++++ testdata/MB0500EBNCR_14.json | 612 ++++++++++++++ testdata/README.md | 11 + testdata/SAMSUNG_MZ7WD240HAFV-00003_21.json | 485 +++++++++++ testdata/SAMSUNG_MZ7WD240HAFV-00003_22.json | 485 +++++++++++ testdata/SAMSUNG_MZQLB1T9HAJR-00007_19.json | 118 +++ testdata/SAMSUNG_MZQLB1T9HAJR-00007_20.json | 118 +++ testdata/SAMSUNG_MZVL21T0HCLR-00B00_23.json | 121 +++ testdata/SAMSUNG_MZVL21T0HCLR-00B00_24.json | 121 +++ testdata/SEAGATE_ST373453LC_26.json | 98 +++ testdata/SEAGATE_ST373453LC_27.json | 107 +++ testdata/ST3200820AS_15.json | 481 +++++++++++ testdata/ST3200820AS_16.json | 849 +++++++++++++++++++ testdata/ST3500418AS_11.json | 587 +++++++++++++ testdata/ST3500418AS_12.json | 587 +++++++++++++ testdata/WDC_WD20EFRX-68EUZN0_17.json | 483 +++++++++++ testdata/WDC_WD20EFRX-68EUZN0_18.json | 483 +++++++++++ 32 files changed, 8888 insertions(+) create mode 100755 redact_fake_json.py create mode 100644 testdata/.gitignore create mode 100644 testdata/HGST_HUS724020ALE640_28.json create mode 100644 testdata/HITACHI_H109060SESUN600G_10.json create mode 100644 testdata/HITACHI_H109060SESUN600G_9.json create mode 100644 testdata/HP_73.4G_MAS3735NC_25.json create mode 100644 testdata/Hitachi_HUA722020ALA330_29.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_1.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_3.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_4.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_5.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_6.json create mode 100644 testdata/INTEL_SSDPE2KX080T8_7.json create mode 100644 testdata/KXG60ZNV512G_TOSHIBA_2.json create mode 100644 testdata/KXG60ZNV512G_TOSHIBA_8.json create mode 100644 testdata/MB0500EBNCR_13.json create mode 100644 testdata/MB0500EBNCR_14.json create mode 100644 testdata/README.md create mode 100644 testdata/SAMSUNG_MZ7WD240HAFV-00003_21.json create mode 100644 testdata/SAMSUNG_MZ7WD240HAFV-00003_22.json create mode 100644 testdata/SAMSUNG_MZQLB1T9HAJR-00007_19.json create mode 100644 testdata/SAMSUNG_MZQLB1T9HAJR-00007_20.json create mode 100644 testdata/SAMSUNG_MZVL21T0HCLR-00B00_23.json create mode 100644 testdata/SAMSUNG_MZVL21T0HCLR-00B00_24.json create mode 100644 testdata/SEAGATE_ST373453LC_26.json create mode 100644 testdata/SEAGATE_ST373453LC_27.json create mode 100644 testdata/ST3200820AS_15.json create mode 100644 testdata/ST3200820AS_16.json create mode 100644 testdata/ST3500418AS_11.json create mode 100644 testdata/ST3500418AS_12.json create mode 100644 testdata/WDC_WD20EFRX-68EUZN0_17.json create mode 100644 testdata/WDC_WD20EFRX-68EUZN0_18.json diff --git a/redact_fake_json.py b/redact_fake_json.py new file mode 100755 index 0000000..c172c15 --- /dev/null +++ b/redact_fake_json.py @@ -0,0 +1,65 @@ +#! /usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +# Redact potentially sensitive information in smartctl JSON files +# This script does an in-place modification. +import json +import sys +import copy +import os + +def main(): + for arg in sys.argv[1:]: + print(arg) + redact_one_file(arg) + +def redact_one_file(filename): + data = None + tmpname = filename+".new" + with open(filename, "r") as jsonFile: + data = json.load(jsonFile) + + newdata = redact_data(data) + + with open(tmpname, "w") as jsonFile: + json.dump(newdata, jsonFile, indent="\t", sort_keys=True) + + os.rename(tmpname, filename) + +def mutate_nested_dict(d, keys, newvalue, if_present=False): + # if_present=True: only mutate if the full key path exists. + if len(keys) == 1: + if not if_present or keys[0] in d: + d[keys[0]] = newvalue + else: + k = keys[0] + if k in d: + mutate_nested_dict(d[k], keys[1:], newvalue, if_present=if_present) + +REDACTED_STRING = 'REDACTED' +REDACTED_TIME_T = 1234567890 +REDACTED_ASCTIME = "Fri Feb 13 23:31:30 2009 UTC" # TODO: generate from TIME_T, with UTC +REDACTED_HEX16_STR = '0x1234567890abcdef' +REDACTED_UINT32 = 1234567890 + +REDACT_FIELDS = [ + {'k': ['smartctl','platform_info'], 'v': REDACTED_STRING}, + {'k': ['smartctl','build_info'], 'v': REDACTED_STRING}, + {'k': ['serial_number'], 'v': REDACTED_STRING}, + {'k': ['firmware_version'], 'v': REDACTED_STRING}, + {'k': ['local_time', 'time_t'], 'v': REDACTED_TIME_T}, + {'k': ['local_time', 'asctime'], 'v': REDACTED_ASCTIME}, + {'k': ['logical_unit_id'], 'v': REDACTED_HEX16_STR}, + {'k': ['wwn','id'], 'v': REDACTED_UINT32}, + # TODO: how to redact /dev/sdX /dev/nvmeN ?? +] + +def redact_data(data): + newdata = copy.deepcopy(data) + for f in REDACT_FIELDS: + #newval = str(f['v'])+str(f['k']) # for debugging + newval = f['v'] + mutate_nested_dict(newdata, f['k'], newval, if_present=True) + return newdata + +if __name__ == '__main__': + main() diff --git a/testdata/.gitignore b/testdata/.gitignore new file mode 100644 index 0000000..0521c5f --- /dev/null +++ b/testdata/.gitignore @@ -0,0 +1 @@ +!*.json diff --git a/testdata/HGST_HUS724020ALE640_28.json b/testdata/HGST_HUS724020ALE640_28.json new file mode 100644 index 0000000..20ae33d --- /dev/null +++ b/testdata/HGST_HUS724020ALE640_28.json @@ -0,0 +1,860 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO-R-- ", + "updated_online": true, + "value": 11 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 16, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "P-S--- ", + "updated_online": false, + "value": 5 + }, + "id": 2, + "name": "Throughput_Performance", + "raw": { + "string": "84", + "value": 84 + }, + "thresh": 54, + "value": 135, + "when_failed": "", + "worst": 135 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--- ", + "updated_online": true, + "value": 7 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "423 (Average 428)", + "value": 38682755495 + }, + "thresh": 24, + "value": 146, + "when_failed": "", + "worst": 146 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "81", + "value": 81 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 5, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO-R-- ", + "updated_online": true, + "value": 11 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 67, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "P-S--- ", + "updated_online": false, + "value": 5 + }, + "id": 8, + "name": "Seek_Time_Performance", + "raw": { + "string": "33", + "value": 33 + }, + "thresh": 20, + "value": 124, + "when_failed": "", + "worst": 124 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "83425", + "value": 83425 + }, + "thresh": 0, + "value": 89, + "when_failed": "", + "worst": 89 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 60, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "81", + "value": 81 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "2539", + "value": 2539 + }, + "thresh": 0, + "value": 98, + "when_failed": "", + "worst": 98 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "2539", + "value": 2539 + }, + "thresh": 0, + "value": 98, + "when_failed": "", + "worst": 98 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---- ", + "updated_online": true, + "value": 2 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "26 (Min/Max 13/41)", + "value": 176094511130 + }, + "thresh": 0, + "value": 230, + "when_failed": "", + "worst": 230 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O-R-- ", + "updated_online": true, + "value": 10 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "12", + "value": 12 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 12, + "logged_count": 5, + "revision": 1, + "table": [ + { + "completion_registers": { + "count": 25, + "device": 7, + "error": 132, + "lba": 16755303, + "status": 81 + }, + "error_description": "Error: ICRC, ABRT at LBA = 0x07ffaa67 = 134195815", + "error_number": 12, + "lifetime_hours": 15760, + "previous_commands": [ + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1677902, + "registers": { + "command": 97, + "count": 8, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 16755328 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1677902, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 16755200 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1677902, + "registers": { + "command": 97, + "count": 8, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 16754944 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1677902, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 16754816 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1677901, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 16754688 + } + } + ] + }, + { + "completion_registers": { + "count": 103, + "device": 1, + "error": 132, + "lba": 14470041, + "status": 81 + }, + "error_description": "Error: ICRC, ABRT at LBA = 0x01dccb99 = 31247257", + "error_number": 11, + "lifetime_hours": 15759, + "previous_commands": [ + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1257504, + "registers": { + "command": 97, + "count": 136, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14482816 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1257504, + "registers": { + "command": 97, + "count": 128, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14482688 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1257504, + "registers": { + "command": 97, + "count": 120, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14482432 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1257503, + "registers": { + "command": 97, + "count": 112, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14482304 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 1257503, + "registers": { + "command": 97, + "count": 104, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14482048 + } + } + ] + }, + { + "completion_registers": { + "count": 63, + "device": 10, + "error": 132, + "lba": 14442561, + "status": 81 + }, + "error_description": "Error: ICRC, ABRT at LBA = 0x0adc6041 = 182214721", + "error_number": 10, + "lifetime_hours": 15730, + "previous_commands": [ + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 76434464, + "registers": { + "command": 97, + "count": 16, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14442624 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 76434464, + "registers": { + "command": 97, + "count": 8, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14442496 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 76434464, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14442240 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 76434463, + "registers": { + "command": 97, + "count": 32, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14442112 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 76434462, + "registers": { + "command": 97, + "count": 48, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 14441856 + } + } + ] + }, + { + "completion_registers": { + "count": 9, + "device": 6, + "error": 132, + "lba": 11005815, + "status": 81 + }, + "error_description": "Error: ICRC, ABRT at LBA = 0x06a7ef77 = 111669111", + "error_number": 9, + "lifetime_hours": 15728, + "previous_commands": [ + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69748928, + "registers": { + "command": 97, + "count": 96, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 11011456 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69748928, + "registers": { + "command": 97, + "count": 88, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 11011328 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69748927, + "registers": { + "command": 97, + "count": 80, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 11011072 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69748927, + "registers": { + "command": 97, + "count": 72, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 11010944 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69748926, + "registers": { + "command": 97, + "count": 64, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 11010688 + } + } + ] + }, + { + "completion_registers": { + "count": 91, + "device": 6, + "error": 132, + "lba": 9944741, + "status": 81 + }, + "error_description": "Error: ICRC, ABRT at LBA = 0x0697bea5 = 110608037", + "error_number": 8, + "lifetime_hours": 15728, + "previous_commands": [ + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69184742, + "registers": { + "command": 97, + "count": 8, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 9945088 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69184741, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 9944832 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69184740, + "registers": { + "command": 97, + "count": 16, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 9944704 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69184740, + "registers": { + "command": 97, + "count": 8, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 9944448 + } + }, + { + "command_name": "WRITE FPDMA QUEUED", + "powerup_milliseconds": 69184740, + "registers": { + "command": 97, + "count": 0, + "device": 64, + "device_control": 0, + "features": 128, + "lba": 9944320 + } + } + ] + } + ] + } + }, + "ata_version": { + "major_value": 508, + "minor_value": 41, + "string": "ATA8-ACS T13/1699-D revision 4" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "form_factor": { + "ata_value": 2, + "name": "3.5 inches" + }, + "in_smartctl_database": true, + "interface_speed": { + "current": { + "bits_per_unit": 100000000, + "sata_value": 2, + "string": "3.0 Gb/s", + "units_per_second": 30 + }, + "max": { + "bits_per_unit": 100000000, + "sata_value": 14, + "string": "6.0 Gb/s", + "units_per_second": 60 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Hitachi/HGST Ultrastar 7K4000", + "model_name": "HGST HUS724020ALE640", + "physical_block_size": 4096, + "power_cycle_count": 81, + "power_on_time": { + "hours": 83425 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 3.0", + "value": 63 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 64, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 26 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 3907029168, + "bytes": 2000398934016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 3274 + } +} \ No newline at end of file diff --git a/testdata/HITACHI_H109060SESUN600G_10.json b/testdata/HITACHI_H109060SESUN600G_10.json new file mode 100644 index 0000000..a413a9c --- /dev/null +++ b/testdata/HITACHI_H109060SESUN600G_10.json @@ -0,0 +1,120 @@ +{ + "device": { + "info_name": "/dev/sdb", + "name": "/dev/sdb", + "protocol": "SCSI", + "type": "scsi" + }, + "device_type": { + "name": "disk", + "scsi_terminology": "Peripheral Device Type [PDT]", + "scsi_value": 0 + }, + "form_factor": { + "name": "2.5 inches", + "scsi_value": 3 + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "logical_unit_id": "0x1234567890abcdef", + "power_on_time": { + "hours": 22364, + "minutes": 52 + }, + "rotation_rate": 10020, + "scsi_error_counter_log": { + "read": { + "correction_algorithm_invocations": 304122, + "errors_corrected_by_eccdelayed": 40247, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "162438.759", + "total_errors_corrected": 40247, + "total_uncorrected_errors": 0 + }, + "verify": { + "correction_algorithm_invocations": 838388, + "errors_corrected_by_eccdelayed": 87, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "1.525", + "total_errors_corrected": 87, + "total_uncorrected_errors": 0 + }, + "write": { + "correction_algorithm_invocations": 4187545, + "errors_corrected_by_eccdelayed": 26762907, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "127551.260", + "total_errors_corrected": 26762907, + "total_uncorrected_errors": 0 + } + }, + "scsi_grown_defect_list": 0, + "scsi_model_name": "HITACHI H109060SESUN600G", + "scsi_product": "H109060SESUN600G", + "scsi_revision": "A31A", + "scsi_start_stop_cycle_counter": { + "accumulated_load_unload_cycles": 3472, + "accumulated_start_stop_cycles": 70, + "specified_cycle_count_over_device_lifetime": 50000, + "specified_load_unload_count_over_device_lifetime": 600000, + "week_of_manufacture": "05", + "year_of_manufacture": "2013" + }, + "scsi_transport_protocol": { + "name": "SAS (SPL-4)", + "value": 6 + }, + "scsi_vendor": "HITACHI", + "scsi_version": "SPC-4", + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 26, + "drive_trip": 85 + }, + "temperature_warning": { + "enabled": true + }, + "user_capacity": { + "blocks": 1172123568, + "bytes": 600127266816 + } +} \ No newline at end of file diff --git a/testdata/HITACHI_H109060SESUN600G_9.json b/testdata/HITACHI_H109060SESUN600G_9.json new file mode 100644 index 0000000..84dc889 --- /dev/null +++ b/testdata/HITACHI_H109060SESUN600G_9.json @@ -0,0 +1,122 @@ +{ + "device": { + "info_name": "/dev/sda", + "name": "/dev/sda", + "protocol": "SCSI", + "type": "scsi" + }, + "device_type": { + "name": "disk", + "scsi_terminology": "Peripheral Device Type [PDT]", + "scsi_value": 0 + }, + "form_factor": { + "name": "2.5 inches", + "scsi_value": 3 + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "logical_unit_id": "0x1234567890abcdef", + "power_on_time": { + "hours": 982, + "minutes": 1 + }, + "rotation_rate": 10020, + "scsi_error_counter_log": { + "read": { + "correction_algorithm_invocations": 2272755, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "111593.179", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + }, + "verify": { + "correction_algorithm_invocations": 274134, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "0.000", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + }, + "write": { + "correction_algorithm_invocations": 4882199, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "292086.584", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + } + }, + "scsi_grown_defect_list": 0, + "scsi_model_name": "HITACHI H109060SESUN600G", + "scsi_product": "H109060SESUN600G", + "scsi_protection_interval_bytes_per_lb": 8, + "scsi_protection_type": 1, + "scsi_revision": "A690", + "scsi_start_stop_cycle_counter": { + "accumulated_load_unload_cycles": 2227, + "accumulated_start_stop_cycles": 45, + "specified_cycle_count_over_device_lifetime": 50000, + "specified_load_unload_count_over_device_lifetime": 600000, + "week_of_manufacture": "28", + "year_of_manufacture": "2014" + }, + "scsi_transport_protocol": { + "name": "SAS (SPL-4)", + "value": 6 + }, + "scsi_vendor": "HITACHI", + "scsi_version": "SPC-4", + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 27, + "drive_trip": 85 + }, + "temperature_warning": { + "enabled": true + }, + "user_capacity": { + "blocks": 1172123568, + "bytes": 600127266816 + } +} \ No newline at end of file diff --git a/testdata/HP_73.4G_MAS3735NC_25.json b/testdata/HP_73.4G_MAS3735NC_25.json new file mode 100644 index 0000000..4221c52 --- /dev/null +++ b/testdata/HP_73.4G_MAS3735NC_25.json @@ -0,0 +1,101 @@ +{ + "device": { + "info_name": "/dev/sdc", + "name": "/dev/sdc", + "protocol": "SCSI", + "type": "scsi" + }, + "device_type": { + "name": "disk", + "scsi_terminology": "Peripheral Device Type [PDT]", + "scsi_value": 0 + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "logical_unit_id": "0x1234567890abcdef", + "rotation_rate": 15000, + "scsi_error_counter_log": { + "read": { + "correction_algorithm_invocations": 0, + "errors_corrected_by_eccdelayed": 1020, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "64396.534", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + }, + "write": { + "correction_algorithm_invocations": 0, + "errors_corrected_by_eccdelayed": 338, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "28837.334", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + } + }, + "scsi_grown_defect_list": 0, + "scsi_model_name": "HP 73.4G MAS3735NC", + "scsi_product": "MAS3735NC", + "scsi_revision": "HPC3", + "scsi_start_stop_cycle_counter": { + "accumulated_start_stop_cycles": 184, + "specified_cycle_count_over_device_lifetime": 10000, + "week_of_manufacture": "25", + "year_of_manufacture": "2004" + }, + "scsi_transport_protocol": { + "name": "Parallel SCSI (SPI-4)", + "value": 1 + }, + "scsi_vendor": "HP 73.4G", + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdc" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "pre_release": false, + "svn_revision": "5530", + "version": [ + 7, + 4 + ] + }, + "temperature": { + "current": 28, + "drive_trip": 65 + }, + "temperature_warning": { + "enabled": true + }, + "user_capacity": { + "blocks": 143374738, + "bytes": 73407865856 + } +} \ No newline at end of file diff --git a/testdata/Hitachi_HUA722020ALA330_29.json b/testdata/Hitachi_HUA722020ALA330_29.json new file mode 100644 index 0000000..be55efd --- /dev/null +++ b/testdata/Hitachi_HUA722020ALA330_29.json @@ -0,0 +1,481 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO-R-- ", + "updated_online": true, + "value": 11 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 16, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "P-S--- ", + "updated_online": false, + "value": 5 + }, + "id": 2, + "name": "Throughput_Performance", + "raw": { + "string": "100", + "value": 100 + }, + "thresh": 54, + "value": 133, + "when_failed": "", + "worst": 133 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--- ", + "updated_online": true, + "value": 7 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "650 (Average 533)", + "value": 51574538890 + }, + "thresh": 24, + "value": 122, + "when_failed": "", + "worst": 122 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "32", + "value": 32 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 5, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO-R-- ", + "updated_online": true, + "value": 11 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 67, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "P-S--- ", + "updated_online": false, + "value": 5 + }, + "id": 8, + "name": "Seek_Time_Performance", + "raw": { + "string": "34", + "value": 34 + }, + "thresh": 20, + "value": 123, + "when_failed": "", + "worst": 123 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "78405", + "value": 78405 + }, + "thresh": 0, + "value": 89, + "when_failed": "", + "worst": 89 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 60, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "32", + "value": 32 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "496", + "value": 496 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "496", + "value": 496 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---- ", + "updated_online": true, + "value": 2 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "28 (Min/Max 18/45)", + "value": 193274707996 + }, + "thresh": 0, + "value": 214, + "when_failed": "", + "worst": 214 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O-R-- ", + "updated_online": true, + "value": 10 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 0 + } + }, + "ata_version": { + "major_value": 508, + "minor_value": 41, + "string": "ATA8-ACS T13/1699-D revision 4" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "form_factor": { + "ata_value": 2, + "name": "3.5 inches" + }, + "in_smartctl_database": true, + "interface_speed": { + "max": { + "bits_per_unit": 100000000, + "sata_value": 6, + "string": "3.0 Gb/s", + "units_per_second": 30 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Hitachi Ultrastar A7K2000", + "model_name": "Hitachi HUA722020ALA330", + "physical_block_size": 512, + "power_cycle_count": 32, + "power_on_time": { + "hours": 78405 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 2.6", + "value": 31 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 28 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 3907029168, + "bytes": 2000398934016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 3274 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_1.json b/testdata/INTEL_SSDPE2KX080T8_1.json new file mode 100644 index 0000000..f657d3d --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_1.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme0", + "name": "/dev/nvme0", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 165, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 20126802, + "data_units_written": 184919244, + "host_reads": 134106494, + "host_writes": 4922206599, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 22, + "power_on_hours": 12164, + "temperature": 29, + "unsafe_shutdowns": 8, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 22, + "power_on_time": { + "hours": 12164 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme0" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 29 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_3.json b/testdata/INTEL_SSDPE2KX080T8_3.json new file mode 100644 index 0000000..3b00d6d --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_3.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme1", + "name": "/dev/nvme1", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 99, + "available_spare_threshold": 10, + "controller_busy_time": 142, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 22727998, + "data_units_written": 147215516, + "host_reads": 158059977, + "host_writes": 4104714523, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 22, + "power_on_hours": 12164, + "temperature": 30, + "unsafe_shutdowns": 8, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 22, + "power_on_time": { + "hours": 12164 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme1" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 30 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_4.json b/testdata/INTEL_SSDPE2KX080T8_4.json new file mode 100644 index 0000000..e1d1dba --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_4.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme3", + "name": "/dev/nvme3", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 85, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 20145988, + "data_units_written": 103902180, + "host_reads": 128169692, + "host_writes": 1929265106, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 22, + "power_on_hours": 12164, + "temperature": 29, + "unsafe_shutdowns": 8, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 22, + "power_on_time": { + "hours": 12164 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme3" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 29 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_5.json b/testdata/INTEL_SSDPE2KX080T8_5.json new file mode 100644 index 0000000..40201c1 --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_5.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme1", + "name": "/dev/nvme1", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 99, + "available_spare_threshold": 10, + "controller_busy_time": 148, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 22744236, + "data_units_written": 157616049, + "host_reads": 289697433, + "host_writes": 3162427130, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 39, + "power_on_hours": 12671, + "temperature": 30, + "unsafe_shutdowns": 16, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 39, + "power_on_time": { + "hours": 12671 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme1" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 30 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_6.json b/testdata/INTEL_SSDPE2KX080T8_6.json new file mode 100644 index 0000000..db96037 --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_6.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme0", + "name": "/dev/nvme0", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 225, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 23399403, + "data_units_written": 223891595, + "host_reads": 381125334, + "host_writes": 6242030453, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 39, + "power_on_hours": 12671, + "temperature": 30, + "unsafe_shutdowns": 16, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 39, + "power_on_time": { + "hours": 12671 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme0" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 30 + } +} \ No newline at end of file diff --git a/testdata/INTEL_SSDPE2KX080T8_7.json b/testdata/INTEL_SSDPE2KX080T8_7.json new file mode 100644 index 0000000..343af93 --- /dev/null +++ b/testdata/INTEL_SSDPE2KX080T8_7.json @@ -0,0 +1,90 @@ +{ + "device": { + "info_name": "/dev/nvme3", + "name": "/dev/nvme3", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "model_name": "INTEL SSDPE2KX080T8", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 6083300, + "nvme_number_of_namespaces": 128, + "nvme_pci_vendor": { + "id": 32902, + "subsystem_id": 32902 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 181, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 17419632, + "data_units_written": 171147998, + "host_reads": 188762875, + "host_writes": 4953155968, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 0, + "power_cycles": 39, + "power_on_hours": 12671, + "temperature": 31, + "unsafe_shutdowns": 16, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 8001563222016, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 39, + "power_on_time": { + "hours": 12671 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme3" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 31 + } +} \ No newline at end of file diff --git a/testdata/KXG60ZNV512G_TOSHIBA_2.json b/testdata/KXG60ZNV512G_TOSHIBA_2.json new file mode 100644 index 0000000..226cb1c --- /dev/null +++ b/testdata/KXG60ZNV512G_TOSHIBA_2.json @@ -0,0 +1,120 @@ +{ + "device": { + "info_name": "/dev/nvme2", + "name": "/dev/nvme2", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 4096, + "model_name": "KXG60ZNV512G TOSHIBA", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 9233294, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 125026902, + "bytes": 512110190592 + }, + "eui64": { + "ext_id": 21483710645, + "oui": 9233294 + }, + "formatted_lba_size": 4096, + "id": 1, + "size": { + "blocks": 125026902, + "bytes": 512110190592 + }, + "utilization": { + "blocks": 125026902, + "bytes": 512110190592 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 4473, + "subsystem_id": 4473 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 463, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 15794760, + "data_units_written": 3861802, + "host_reads": 97929810, + "host_writes": 99025670, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 1, + "power_cycles": 30, + "power_on_hours": 12173, + "temperature": 37, + "temperature_sensors": [ + 37 + ], + "unsafe_shutdowns": 15, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 512110190592, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.3", + "value": 66304 + }, + "power_cycle_count": 30, + "power_on_time": { + "hours": 12173 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme2" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 37 + }, + "user_capacity": { + "blocks": 125026902, + "bytes": 512110190592 + } +} \ No newline at end of file diff --git a/testdata/KXG60ZNV512G_TOSHIBA_8.json b/testdata/KXG60ZNV512G_TOSHIBA_8.json new file mode 100644 index 0000000..82d1dc9 --- /dev/null +++ b/testdata/KXG60ZNV512G_TOSHIBA_8.json @@ -0,0 +1,120 @@ +{ + "device": { + "info_name": "/dev/nvme2", + "name": "/dev/nvme2", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "KXG60ZNV512G TOSHIBA", + "nvme_controller_id": 0, + "nvme_ieee_oui_identifier": 9233294, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 1000215216, + "bytes": 512110190592 + }, + "eui64": { + "ext_id": 4295713919, + "oui": 9233294 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 1000215216, + "bytes": 512110190592 + }, + "utilization": { + "blocks": 1000215216, + "bytes": 512110190592 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 4473, + "subsystem_id": 4473 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 594, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 10480864, + "data_units_written": 5578530, + "host_reads": 141510981, + "host_writes": 206619338, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 4, + "power_cycles": 52, + "power_on_hours": 12728, + "temperature": 35, + "temperature_sensors": [ + 35 + ], + "unsafe_shutdowns": 28, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 512110190592, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.3", + "value": 66304 + }, + "power_cycle_count": 52, + "power_on_time": { + "hours": 12728 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme2" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 35 + }, + "user_capacity": { + "blocks": 1000215216, + "bytes": 512110190592 + } +} \ No newline at end of file diff --git a/testdata/MB0500EBNCR_13.json b/testdata/MB0500EBNCR_13.json new file mode 100644 index 0000000..95c6a2d --- /dev/null +++ b/testdata/MB0500EBNCR_13.json @@ -0,0 +1,612 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "341", + "value": 341 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--K ", + "updated_online": true, + "value": 39 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "2283", + "value": 2283 + }, + "thresh": 21, + "value": 174, + "when_failed": "", + "worst": 174 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "50", + "value": 50 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 140, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "89214", + "value": 89214 + }, + "thresh": 0, + "value": 1, + "when_failed": "", + "worst": 1 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 11, + "name": "Calibration_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "48", + "value": 48 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 180, + "name": "Unknown_HDD_Attribute", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 100, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 188, + "name": "Command_Timeout", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "26", + "value": 26 + }, + "thresh": 45, + "value": 74, + "when_failed": "", + "worst": 59 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "42", + "value": 42 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "7", + "value": 7 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "26", + "value": 26 + }, + "thresh": 0, + "value": 117, + "when_failed": "", + "worst": 102 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OS-CK ", + "updated_online": true, + "value": 54 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----CK ", + "updated_online": false, + "value": 48 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "4", + "value": 4 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 510, + "minor_value": 40, + "string": "ATA8-ACS T13/1699-D revision 6" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "form_factor": { + "ata_value": 2, + "name": "3.5 inches" + }, + "in_smartctl_database": false, + "interface_speed": { + "max": { + "bits_per_unit": 100000000, + "sata_value": 6, + "string": "3.0 Gb/s", + "units_per_second": 30 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "MB0500EBNCR", + "physical_block_size": 512, + "power_cycle_count": 48, + "power_on_time": { + "hours": 89214 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 2.6", + "value": 30 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 26 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 976773168, + "bytes": 500107862016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 5358 + } +} \ No newline at end of file diff --git a/testdata/MB0500EBNCR_14.json b/testdata/MB0500EBNCR_14.json new file mode 100644 index 0000000..d423f27 --- /dev/null +++ b/testdata/MB0500EBNCR_14.json @@ -0,0 +1,612 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--K ", + "updated_online": true, + "value": 39 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "2358", + "value": 2358 + }, + "thresh": 21, + "value": 172, + "when_failed": "", + "worst": 172 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "50", + "value": 50 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 140, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "89180", + "value": 89180 + }, + "thresh": 0, + "value": 1, + "when_failed": "", + "worst": 1 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 11, + "name": "Calibration_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 51, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "48", + "value": 48 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 180, + "name": "Unknown_HDD_Attribute", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 100, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 188, + "name": "Command_Timeout", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "27", + "value": 27 + }, + "thresh": 45, + "value": 73, + "when_failed": "", + "worst": 60 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "42", + "value": 42 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "7", + "value": 7 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "27", + "value": 27 + }, + "thresh": 0, + "value": 116, + "when_failed": "", + "worst": 103 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OS-CK ", + "updated_online": true, + "value": 54 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----CK ", + "updated_online": false, + "value": 48 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 510, + "minor_value": 40, + "string": "ATA8-ACS T13/1699-D revision 6" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "form_factor": { + "ata_value": 2, + "name": "3.5 inches" + }, + "in_smartctl_database": false, + "interface_speed": { + "max": { + "bits_per_unit": 100000000, + "sata_value": 6, + "string": "3.0 Gb/s", + "units_per_second": 30 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "MB0500EBNCR", + "physical_block_size": 512, + "power_cycle_count": 48, + "power_on_time": { + "hours": 89180 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 2.6", + "value": 30 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 27 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 976773168, + "bytes": 500107862016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 5358 + } +} \ No newline at end of file diff --git a/testdata/README.md b/testdata/README.md new file mode 100644 index 0000000..6470cec --- /dev/null +++ b/testdata/README.md @@ -0,0 +1,11 @@ +This directory contains JSON testing data for parsing validation. + +New data can be collected with the `collect_fake_json.sh` script. + +Sensitive information should been redacted using the `redact_fake_json.py` +script. + +TODO: what is a good naming scheme for files in this directory? For first-pass, +it has been either of `model_name` or `scsi_model_name`, followed by an +identifier. Why multiple drives of the same model? Testing where one drive has +fields not present on others, e.g. error counts. diff --git a/testdata/SAMSUNG_MZ7WD240HAFV-00003_21.json b/testdata/SAMSUNG_MZ7WD240HAFV-00003_21.json new file mode 100644 index 0000000..0361321 --- /dev/null +++ b/testdata/SAMSUNG_MZ7WD240HAFV-00003_21.json @@ -0,0 +1,485 @@ +{ + "ata_smart_attributes": { + "revision": 1, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "84619", + "value": 84619 + }, + "thresh": 0, + "value": 83, + "when_failed": "", + "worst": 83 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "6", + "value": 6 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 177, + "name": "Wear_Leveling_Count", + "raw": { + "string": "1661", + "value": 1661 + }, + "thresh": 5, + "value": 91, + "when_failed": "", + "worst": 91 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 179, + "name": "Used_Rsvd_Blk_Cnt_Tot", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 180, + "name": "Unused_Rsvd_Blk_Cnt_Tot", + "raw": { + "string": "5248", + "value": 5248 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 181, + "name": "Program_Fail_Cnt_Total", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 182, + "name": "Erase_Fail_Count_Total", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 183, + "name": "Runtime_Bad_Block", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Uncorrectable_Error_Cnt", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "27", + "value": 27 + }, + "thresh": 0, + "value": 73, + "when_failed": "", + "worst": 59 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "ECC_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 202, + "name": "Exception_Mode_Status", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 235, + "name": "POR_Recovery_Count", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 241, + "name": "Total_LBAs_Written", + "raw": { + "string": "216456537880", + "value": 216456537880 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 1020, + "minor_value": 57, + "string": "ACS-2, ATA8-ACS T13/1699-D revision 4c" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "current": { + "bits_per_unit": 100000000, + "sata_value": 3, + "string": "6.0 Gb/s", + "units_per_second": 60 + }, + "max": { + "bits_per_unit": 100000000, + "sata_value": 14, + "string": "6.0 Gb/s", + "units_per_second": 60 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Samsung based SSDs", + "model_name": "SAMSUNG MZ7WD240HAFV-00003", + "physical_block_size": 512, + "power_cycle_count": 6, + "power_on_time": { + "hours": 84619 + }, + "rotation_rate": 0, + "sata_version": { + "string": "SATA 3.1", + "value": 127 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 27 + }, + "trim": { + "deterministic": true, + "supported": true, + "zeroed": true + }, + "user_capacity": { + "blocks": 468862128, + "bytes": 240057409536 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 9528 + } +} \ No newline at end of file diff --git a/testdata/SAMSUNG_MZ7WD240HAFV-00003_22.json b/testdata/SAMSUNG_MZ7WD240HAFV-00003_22.json new file mode 100644 index 0000000..8fe7c68 --- /dev/null +++ b/testdata/SAMSUNG_MZ7WD240HAFV-00003_22.json @@ -0,0 +1,485 @@ +{ + "ata_smart_attributes": { + "revision": 1, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "84620", + "value": 84620 + }, + "thresh": 0, + "value": 83, + "when_failed": "", + "worst": 83 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "6", + "value": 6 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 177, + "name": "Wear_Leveling_Count", + "raw": { + "string": "1773", + "value": 1773 + }, + "thresh": 5, + "value": 90, + "when_failed": "", + "worst": 90 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 179, + "name": "Used_Rsvd_Blk_Cnt_Tot", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 180, + "name": "Unused_Rsvd_Blk_Cnt_Tot", + "raw": { + "string": "5248", + "value": 5248 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 181, + "name": "Program_Fail_Cnt_Total", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 182, + "name": "Erase_Fail_Count_Total", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 183, + "name": "Runtime_Bad_Block", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Uncorrectable_Error_Cnt", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "27", + "value": 27 + }, + "thresh": 0, + "value": 73, + "when_failed": "", + "worst": 61 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "ECC_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 202, + "name": "Exception_Mode_Status", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 10, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 235, + "name": "POR_Recovery_Count", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 241, + "name": "Total_LBAs_Written", + "raw": { + "string": "218759569150", + "value": 218759569150 + }, + "thresh": 0, + "value": 99, + "when_failed": "", + "worst": 99 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 1020, + "minor_value": 57, + "string": "ACS-2, ATA8-ACS T13/1699-D revision 4c" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "current": { + "bits_per_unit": 100000000, + "sata_value": 3, + "string": "6.0 Gb/s", + "units_per_second": 60 + }, + "max": { + "bits_per_unit": 100000000, + "sata_value": 14, + "string": "6.0 Gb/s", + "units_per_second": 60 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Samsung based SSDs", + "model_name": "SAMSUNG MZ7WD240HAFV-00003", + "physical_block_size": 512, + "power_cycle_count": 6, + "power_on_time": { + "hours": 84620 + }, + "rotation_rate": 0, + "sata_version": { + "string": "SATA 3.1", + "value": 127 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 27 + }, + "trim": { + "deterministic": true, + "supported": true, + "zeroed": true + }, + "user_capacity": { + "blocks": 468862128, + "bytes": 240057409536 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 9528 + } +} \ No newline at end of file diff --git a/testdata/SAMSUNG_MZQLB1T9HAJR-00007_19.json b/testdata/SAMSUNG_MZQLB1T9HAJR-00007_19.json new file mode 100644 index 0000000..2be63e8 --- /dev/null +++ b/testdata/SAMSUNG_MZQLB1T9HAJR-00007_19.json @@ -0,0 +1,118 @@ +{ + "device": { + "info_name": "/dev/nvme0", + "name": "/dev/nvme0", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "SAMSUNG MZQLB1T9HAJR-00007", + "nvme_controller_id": 4, + "nvme_ieee_oui_identifier": 9528, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 3750748848, + "bytes": 1920383410176 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 3750748848, + "bytes": 1920383410176 + }, + "utilization": { + "blocks": 284186528, + "bytes": 145503502336 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 5197, + "subsystem_id": 5197 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 223, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 12345514, + "data_units_written": 44965392, + "host_reads": 81115611, + "host_writes": 508465316, + "media_errors": 0, + "num_err_log_entries": 14, + "percentage_used": 0, + "power_cycles": 6, + "power_on_hours": 20701, + "temperature": 40, + "temperature_sensors": [ + 40, + 43, + 48 + ], + "unsafe_shutdowns": 0, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 1920383410176, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 6, + "power_on_time": { + "hours": 20701 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme0" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 40 + }, + "user_capacity": { + "blocks": 3750748848, + "bytes": 1920383410176 + } +} \ No newline at end of file diff --git a/testdata/SAMSUNG_MZQLB1T9HAJR-00007_20.json b/testdata/SAMSUNG_MZQLB1T9HAJR-00007_20.json new file mode 100644 index 0000000..867c1a8 --- /dev/null +++ b/testdata/SAMSUNG_MZQLB1T9HAJR-00007_20.json @@ -0,0 +1,118 @@ +{ + "device": { + "info_name": "/dev/nvme1", + "name": "/dev/nvme1", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "SAMSUNG MZQLB1T9HAJR-00007", + "nvme_controller_id": 4, + "nvme_ieee_oui_identifier": 9528, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 3750748848, + "bytes": 1920383410176 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 3750748848, + "bytes": 1920383410176 + }, + "utilization": { + "blocks": 289429144, + "bytes": 148187721728 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 5197, + "subsystem_id": 5197 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 232, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 12319491, + "data_units_written": 48131060, + "host_reads": 78560447, + "host_writes": 506591500, + "media_errors": 0, + "num_err_log_entries": 14, + "percentage_used": 0, + "power_cycles": 7, + "power_on_hours": 20701, + "temperature": 41, + "temperature_sensors": [ + 41, + 45, + 48 + ], + "unsafe_shutdowns": 0, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 1920383410176, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 7, + "power_on_time": { + "hours": 20701 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme1" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 41 + }, + "user_capacity": { + "blocks": 3750748848, + "bytes": 1920383410176 + } +} \ No newline at end of file diff --git a/testdata/SAMSUNG_MZVL21T0HCLR-00B00_23.json b/testdata/SAMSUNG_MZVL21T0HCLR-00B00_23.json new file mode 100644 index 0000000..eccb983 --- /dev/null +++ b/testdata/SAMSUNG_MZVL21T0HCLR-00B00_23.json @@ -0,0 +1,121 @@ +{ + "device": { + "info_name": "/dev/nvme0", + "name": "/dev/nvme0", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "SAMSUNG MZVL21T0HCLR-00B00", + "nvme_controller_id": 6, + "nvme_ieee_oui_identifier": 9528, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 2000409264, + "bytes": 1024209543168 + }, + "eui64": { + "ext_id": 769096114121, + "oui": 9528 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 2000409264, + "bytes": 1024209543168 + }, + "utilization": { + "blocks": 531676888, + "bytes": 272218566656 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 5197, + "subsystem_id": 5197 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 35754, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 7193048, + "data_units_written": 113662783, + "host_reads": 60131549, + "host_writes": 2219922465, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 16, + "power_cycles": 6, + "power_on_hours": 10423, + "temperature": 29, + "temperature_sensors": [ + 29, + 30 + ], + "unsafe_shutdowns": 1, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 1024209543168, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.3", + "value": 66304 + }, + "power_cycle_count": 6, + "power_on_time": { + "hours": 10423 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme0" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 29 + }, + "user_capacity": { + "blocks": 2000409264, + "bytes": 1024209543168 + } +} \ No newline at end of file diff --git a/testdata/SAMSUNG_MZVL21T0HCLR-00B00_24.json b/testdata/SAMSUNG_MZVL21T0HCLR-00B00_24.json new file mode 100644 index 0000000..2f8b840 --- /dev/null +++ b/testdata/SAMSUNG_MZVL21T0HCLR-00B00_24.json @@ -0,0 +1,121 @@ +{ + "device": { + "info_name": "/dev/nvme1", + "name": "/dev/nvme1", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "REDACTED", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_name": "SAMSUNG MZVL21T0HCLR-00B00", + "nvme_controller_id": 6, + "nvme_ieee_oui_identifier": 9528, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 2000409264, + "bytes": 1024209543168 + }, + "eui64": { + "ext_id": 769096114107, + "oui": 9528 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 2000409264, + "bytes": 1024209543168 + }, + "utilization": { + "blocks": 823621536, + "bytes": 421694226432 + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 5197, + "subsystem_id": 5197 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 36476, + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 1421618, + "data_units_written": 118137665, + "host_reads": 12283296, + "host_writes": 2247575122, + "media_errors": 0, + "num_err_log_entries": 0, + "percentage_used": 16, + "power_cycles": 6, + "power_on_hours": 10407, + "temperature": 30, + "temperature_sensors": [ + 30, + 31 + ], + "unsafe_shutdowns": 1, + "warning_temp_time": 0 + }, + "nvme_total_capacity": 1024209543168, + "nvme_unallocated_capacity": 0, + "nvme_version": { + "string": "1.3", + "value": 66304 + }, + "power_cycle_count": 6, + "power_on_time": { + "hours": 10407 + }, + "serial_number": "REDACTED", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/nvme1" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 30 + }, + "user_capacity": { + "blocks": 2000409264, + "bytes": 1024209543168 + } +} \ No newline at end of file diff --git a/testdata/SEAGATE_ST373453LC_26.json b/testdata/SEAGATE_ST373453LC_26.json new file mode 100644 index 0000000..6d4b99c --- /dev/null +++ b/testdata/SEAGATE_ST373453LC_26.json @@ -0,0 +1,98 @@ +{ + "device": { + "info_name": "/dev/sdb", + "name": "/dev/sdb", + "protocol": "SCSI", + "type": "scsi" + }, + "device_type": { + "name": "disk", + "scsi_terminology": "Peripheral Device Type [PDT]", + "scsi_value": 0 + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "power_on_time": { + "hours": 102880, + "minutes": 59 + }, + "rotation_rate": 15015, + "scsi_error_counter_log": { + "read": { + "correction_algorithm_invocations": 5332649, + "errors_corrected_by_eccdelayed": 1, + "errors_corrected_by_eccfast": 5330255, + "errors_corrected_by_rereads_rewrites": 41, + "gigabytes_processed": "11523.849", + "total_errors_corrected": 5330297, + "total_uncorrected_errors": 1 + }, + "write": { + "correction_algorithm_invocations": 128473, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 1973, + "gigabytes_processed": "11151.772", + "total_errors_corrected": 1973, + "total_uncorrected_errors": 535 + } + }, + "scsi_grown_defect_list": 260, + "scsi_model_name": "SEAGATE ST373453LC", + "scsi_product": "ST373453LC", + "scsi_revision": "DX10", + "scsi_transport_protocol": { + "name": "Parallel SCSI (SPI-4)", + "value": 1 + }, + "scsi_vendor": "SEAGATE", + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "pre_release": false, + "svn_revision": "5530", + "version": [ + 7, + 4 + ] + }, + "temperature": { + "current": 33, + "drive_trip": 68 + }, + "temperature_warning": { + "enabled": false + }, + "user_capacity": { + "blocks": 143374650, + "bytes": 73407820800 + } +} \ No newline at end of file diff --git a/testdata/SEAGATE_ST373453LC_27.json b/testdata/SEAGATE_ST373453LC_27.json new file mode 100644 index 0000000..42253c8 --- /dev/null +++ b/testdata/SEAGATE_ST373453LC_27.json @@ -0,0 +1,107 @@ +{ + "device": { + "info_name": "/dev/sda", + "name": "/dev/sda", + "protocol": "SCSI", + "type": "scsi" + }, + "device_type": { + "name": "disk", + "scsi_terminology": "Peripheral Device Type [PDT]", + "scsi_value": 0 + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "power_on_time": { + "hours": 91691, + "minutes": 24 + }, + "rotation_rate": 15015, + "scsi_error_counter_log": { + "read": { + "correction_algorithm_invocations": 128691559, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 128691425, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "157558.954", + "total_errors_corrected": 128691425, + "total_uncorrected_errors": 0 + }, + "verify": { + "correction_algorithm_invocations": 342052, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 342052, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "577.560", + "total_errors_corrected": 342052, + "total_uncorrected_errors": 0 + }, + "write": { + "correction_algorithm_invocations": 0, + "errors_corrected_by_eccdelayed": 0, + "errors_corrected_by_eccfast": 0, + "errors_corrected_by_rereads_rewrites": 0, + "gigabytes_processed": "13782.768", + "total_errors_corrected": 0, + "total_uncorrected_errors": 0 + } + }, + "scsi_grown_defect_list": 0, + "scsi_model_name": "SEAGATE ST373453LC", + "scsi_product": "ST373453LC", + "scsi_revision": "DX10", + "scsi_transport_protocol": { + "name": "Parallel SCSI (SPI-4)", + "value": 1 + }, + "scsi_vendor": "SEAGATE", + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": false + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "exit_status": 0, + "platform_info": "REDACTED", + "pre_release": false, + "svn_revision": "5530", + "version": [ + 7, + 4 + ] + }, + "temperature": { + "current": 34, + "drive_trip": 68 + }, + "temperature_warning": { + "enabled": true + }, + "user_capacity": { + "blocks": 143374650, + "bytes": 73407820800 + } +} \ No newline at end of file diff --git a/testdata/ST3200820AS_15.json b/testdata/ST3200820AS_15.json new file mode 100644 index 0000000..998b61b --- /dev/null +++ b/testdata/ST3200820AS_15.json @@ -0,0 +1,481 @@ +{ + "ata_smart_attributes": { + "revision": 10, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "124179459", + "value": 124179459 + }, + "thresh": 6, + "value": 117, + "when_failed": "", + "worst": 88 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 96, + "when_failed": "", + "worst": 96 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "36", + "value": 36 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 36, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "576454148", + "value": 576454148 + }, + "thresh": 30, + "value": 87, + "when_failed": "", + "worst": 60 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "100216", + "value": 100216 + }, + "thresh": 0, + "value": 1, + "when_failed": "", + "worst": 1 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "75", + "value": 75 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RCK ", + "updated_online": true, + "value": 58 + }, + "id": 189, + "name": "High_Fly_Writes", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "35 (Min/Max 28/39)", + "value": 656146467 + }, + "thresh": 45, + "value": 65, + "when_failed": "", + "worst": 55 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "35 (0 19 0 0 0)", + "value": 81604378659 + }, + "thresh": 0, + "value": 35, + "when_failed": "", + "worst": 45 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "55687139", + "value": 55687139 + }, + "thresh": 0, + "value": 74, + "when_failed": "", + "worst": 55 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----C- ", + "updated_online": false, + "value": 16 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 202, + "name": "Data_Address_Mark_Errs", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 254, + "minor_value": 0, + "string": "ATA/ATAPI-7 (minor revision not indicated)" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Seagate Barracuda 7200.10", + "model_name": "ST3200820AS", + "physical_block_size": 512, + "power_cycle_count": 75, + "power_on_time": { + "hours": 100216 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 35 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 390721968, + "bytes": 200049647616 + } +} \ No newline at end of file diff --git a/testdata/ST3200820AS_16.json b/testdata/ST3200820AS_16.json new file mode 100644 index 0000000..c29d735 --- /dev/null +++ b/testdata/ST3200820AS_16.json @@ -0,0 +1,849 @@ +{ + "ata_smart_attributes": { + "revision": 10, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "143944925", + "value": 143944925 + }, + "thresh": 6, + "value": 117, + "when_failed": "", + "worst": 88 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 96, + "when_failed": "", + "worst": 96 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "37", + "value": 37 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 36, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "184476319", + "value": 184476319 + }, + "thresh": 30, + "value": 82, + "when_failed": "", + "worst": 55 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "100161", + "value": 100161 + }, + "thresh": 0, + "value": 1, + "when_failed": "", + "worst": 1 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "79", + "value": 79 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RCK ", + "updated_online": true, + "value": 58 + }, + "id": 189, + "name": "High_Fly_Writes", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "33 (Min/Max 26/37)", + "value": 622460961 + }, + "thresh": 45, + "value": 67, + "when_failed": "", + "worst": 56 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "33 (0 20 0 0 0)", + "value": 85899345953 + }, + "thresh": 0, + "value": 33, + "when_failed": "", + "worst": 44 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "10474133", + "value": 10474133 + }, + "thresh": 0, + "value": 69, + "when_failed": "", + "worst": 64 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----C- ", + "updated_online": false, + "value": 16 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 202, + "name": "Data_Address_Mark_Errs", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 98, + "logged_count": 5, + "revision": 1, + "table": [ + { + "completion_registers": { + "count": 1, + "device": 231, + "error": 16, + "lba": 4843886, + "status": 81 + }, + "error_number": 98, + "lifetime_hours": 7042, + "previous_commands": [ + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652853, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652717, + "registers": { + "command": 39, + "count": 0, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652601, + "registers": { + "command": 55, + "count": 0, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652540, + "registers": { + "command": 39, + "count": 1, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21648486, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + } + ] + }, + { + "completion_registers": { + "count": 1, + "device": 231, + "error": 16, + "lba": 4843886, + "status": 81 + }, + "error_number": 97, + "lifetime_hours": 7042, + "previous_commands": [ + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652853, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652717, + "registers": { + "command": 39, + "count": 0, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652601, + "registers": { + "command": 55, + "count": 0, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 21652540, + "registers": { + "command": 39, + "count": 1, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4845999 + } + }, + { + "command_name": "READ MULTIPLE EXT", + "powerup_milliseconds": 21648486, + "registers": { + "command": 41, + "count": 1, + "device": 224, + "device_control": 0, + "features": 0, + "lba": 4845999 + } + } + ] + }, + { + "completion_registers": { + "count": 1, + "device": 231, + "error": 16, + "lba": 4843886, + "status": 81 + }, + "error_number": 96, + "lifetime_hours": 5297, + "previous_commands": [ + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205739, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205674, + "registers": { + "command": 39, + "count": 0, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205539, + "registers": { + "command": 55, + "count": 0, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205422, + "registers": { + "command": 39, + "count": 1, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205351, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + } + ] + }, + { + "completion_registers": { + "count": 1, + "device": 231, + "error": 16, + "lba": 4843886, + "status": 81 + }, + "error_number": 95, + "lifetime_hours": 5297, + "previous_commands": [ + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205739, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205674, + "registers": { + "command": 39, + "count": 0, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205539, + "registers": { + "command": 55, + "count": 0, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 17205422, + "registers": { + "command": 39, + "count": 1, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4845999 + } + }, + { + "command_name": "READ MULTIPLE EXT", + "powerup_milliseconds": 17205351, + "registers": { + "command": 41, + "count": 1, + "device": 224, + "device_control": 0, + "features": 0, + "lba": 4845999 + } + } + ] + }, + { + "completion_registers": { + "count": 1, + "device": 231, + "error": 16, + "lba": 4843886, + "status": 81 + }, + "error_number": 94, + "lifetime_hours": 5168, + "previous_commands": [ + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 8100540, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 8100540, + "registers": { + "command": 39, + "count": 0, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 8100540, + "registers": { + "command": 55, + "count": 0, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 8106725, + "registers": { + "command": 39, + "count": 1, + "device": 224, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + }, + { + "command_name": "SET NATIVE MAX ADDRESS EXT [OBS-ACS-3]", + "powerup_milliseconds": 8106666, + "registers": { + "command": 55, + "count": 1, + "device": 231, + "device_control": 0, + "features": 255, + "lba": 4843886 + } + } + ] + } + ] + } + }, + "ata_version": { + "major_value": 254, + "minor_value": 0, + "string": "ATA/ATAPI-7 (minor revision not indicated)" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Seagate Barracuda 7200.10", + "model_name": "ST3200820AS", + "physical_block_size": 512, + "power_cycle_count": 79, + "power_on_time": { + "hours": 100161 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 64, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 33 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 390719855, + "bytes": 200048565760 + } +} \ No newline at end of file diff --git a/testdata/ST3500418AS_11.json b/testdata/ST3500418AS_11.json new file mode 100644 index 0000000..328d392 --- /dev/null +++ b/testdata/ST3500418AS_11.json @@ -0,0 +1,587 @@ +{ + "ata_smart_attributes": { + "revision": 10, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "168165566", + "value": 168165566 + }, + "thresh": 6, + "value": 118, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 97, + "when_failed": "", + "worst": 97 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "72", + "value": 72 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 36, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "610424933", + "value": 610424933 + }, + "thresh": 30, + "value": 87, + "when_failed": "", + "worst": 60 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "44670", + "value": 44670 + }, + "thresh": 0, + "value": 50, + "when_failed": "", + "worst": 11 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "26", + "value": 26 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 183, + "name": "Runtime_Bad_Block", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 99, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 188, + "name": "Command_Timeout", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RCK ", + "updated_online": true, + "value": 58 + }, + "id": 189, + "name": "High_Fly_Writes", + "raw": { + "string": "58", + "value": 58 + }, + "thresh": 0, + "value": 42, + "when_failed": "", + "worst": 42 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "32 (Min/Max 23/35)", + "value": 588709920 + }, + "thresh": 45, + "value": 68, + "when_failed": "", + "worst": 58 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "32 (0 19 0 0 0)", + "value": 81604378656 + }, + "thresh": 0, + "value": 32, + "when_failed": "", + "worst": 42 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "168165566", + "value": 168165566 + }, + "thresh": 0, + "value": 40, + "when_failed": "", + "worst": 17 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----C- ", + "updated_online": false, + "value": 16 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 240, + "name": "Head_Flying_Hours", + "raw": { + "string": "122817 (237 33 0)", + "value": 260725989826497 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 241, + "name": "Total_LBAs_Written", + "raw": { + "string": "543343366", + "value": 543343366 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 242, + "name": "Total_LBAs_Read", + "raw": { + "string": "224972325", + "value": 224972325 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 496, + "minor_value": 41, + "string": "ATA8-ACS T13/1699-D revision 4" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "max": { + "bits_per_unit": 100000000, + "sata_value": 6, + "string": "3.0 Gb/s", + "units_per_second": 30 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Seagate Barracuda 7200.12", + "model_name": "ST3500418AS", + "physical_block_size": 512, + "power_cycle_count": 26, + "power_on_time": { + "hours": 44670 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 2.6", + "value": 16 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 32 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 976773168, + "bytes": 500107862016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 3152 + } +} \ No newline at end of file diff --git a/testdata/ST3500418AS_12.json b/testdata/ST3500418AS_12.json new file mode 100644 index 0000000..846dbc0 --- /dev/null +++ b/testdata/ST3500418AS_12.json @@ -0,0 +1,587 @@ +{ + "ata_smart_attributes": { + "revision": 10, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "234151754", + "value": 234151754 + }, + "thresh": 6, + "value": 119, + "when_failed": "", + "worst": 99 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 97, + "when_failed": "", + "worst": 97 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "72", + "value": 72 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "304", + "value": 304 + }, + "thresh": 36, + "value": 93, + "when_failed": "", + "worst": 93 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-- ", + "updated_online": true, + "value": 15 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "12834215976973", + "value": 12834215976973 + }, + "thresh": 30, + "value": 55, + "when_failed": "", + "worst": 51 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "44668", + "value": 44668 + }, + "thresh": 0, + "value": 50, + "when_failed": "", + "worst": 11 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--C- ", + "updated_online": true, + "value": 19 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 97, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "26", + "value": 26 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 183, + "name": "Runtime_Bad_Block", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 184, + "name": "End-to-End_Error", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 99, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 187, + "name": "Reported_Uncorrect", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 188, + "name": "Command_Timeout", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RCK ", + "updated_online": true, + "value": 58 + }, + "id": 189, + "name": "High_Fly_Writes", + "raw": { + "string": "2", + "value": 2 + }, + "thresh": 0, + "value": 98, + "when_failed": "", + "worst": 98 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "33 (Min/Max 24/36)", + "value": 605552673 + }, + "thresh": 45, + "value": 67, + "when_failed": "", + "worst": 57 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "33 (0 19 0 0 0)", + "value": 81604378657 + }, + "thresh": 0, + "value": 33, + "when_failed": "", + "worst": 43 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O-RC- ", + "updated_online": true, + "value": 26 + }, + "id": 195, + "name": "Hardware_ECC_Recovered", + "raw": { + "string": "234151754", + "value": 234151754 + }, + "thresh": 0, + "value": 35, + "when_failed": "", + "worst": 13 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--C- ", + "updated_online": true, + "value": 18 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----C- ", + "updated_online": false, + "value": 16 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": true, + "performance": true, + "prefailure": false, + "string": "-OSRCK ", + "updated_online": true, + "value": 62 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 240, + "name": "Head_Flying_Hours", + "raw": { + "string": "122811 (109 12 0)", + "value": 119898307157947 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 241, + "name": "Total_LBAs_Written", + "raw": { + "string": "3022432698", + "value": 3022432698 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "------ ", + "updated_online": false, + "value": 0 + }, + "id": 242, + "name": "Total_LBAs_Read", + "raw": { + "string": "910143200", + "value": 910143200 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 496, + "minor_value": 41, + "string": "ATA8-ACS T13/1699-D revision 4" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "max": { + "bits_per_unit": 100000000, + "sata_value": 6, + "string": "3.0 Gb/s", + "units_per_second": 30 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Seagate Barracuda 7200.12", + "model_name": "ST3500418AS", + "physical_block_size": 512, + "power_cycle_count": 26, + "power_on_time": { + "hours": 44668 + }, + "rotation_rate": 7200, + "sata_version": { + "string": "SATA 2.6", + "value": 16 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 33 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 976773168, + "bytes": 500107862016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 3152 + } +} \ No newline at end of file diff --git a/testdata/WDC_WD20EFRX-68EUZN0_17.json b/testdata/WDC_WD20EFRX-68EUZN0_17.json new file mode 100644 index 0000000..53c1ea3 --- /dev/null +++ b/testdata/WDC_WD20EFRX-68EUZN0_17.json @@ -0,0 +1,483 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "114", + "value": 114 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--K ", + "updated_online": true, + "value": 39 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 21, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "3", + "value": 3 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 140, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": false, + "string": "-OSR-K ", + "updated_online": true, + "value": 46 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 196 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "47657", + "value": 47657 + }, + "thresh": 0, + "value": 35, + "when_failed": "", + "worst": 35 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 11, + "name": "Calibration_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "3", + "value": 3 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "882", + "value": 882 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "34", + "value": 34 + }, + "thresh": 0, + "value": 113, + "when_failed": "", + "worst": 110 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----CK ", + "updated_online": false, + "value": 48 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 1022, + "minor_value": 0, + "string": "ACS-2 (minor revision not indicated)" + }, + "device": { + "info_name": "/dev/sdb [SAT]", + "name": "/dev/sdb", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "current": { + "bits_per_unit": 100000000, + "sata_value": 3, + "string": "6.0 Gb/s", + "units_per_second": 60 + }, + "max": { + "bits_per_unit": 100000000, + "sata_value": 14, + "string": "6.0 Gb/s", + "units_per_second": 60 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Western Digital Red", + "model_name": "WDC WD20EFRX-68EUZN0", + "physical_block_size": 4096, + "power_cycle_count": 3, + "power_on_time": { + "hours": 47657 + }, + "rotation_rate": 5400, + "sata_version": { + "string": "SATA 3.0", + "value": 62 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sdb" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 34 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 3907029168, + "bytes": 2000398934016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 5358 + } +} \ No newline at end of file diff --git a/testdata/WDC_WD20EFRX-68EUZN0_18.json b/testdata/WDC_WD20EFRX-68EUZN0_18.json new file mode 100644 index 0000000..9d4218a --- /dev/null +++ b/testdata/WDC_WD20EFRX-68EUZN0_18.json @@ -0,0 +1,483 @@ +{ + "ata_smart_attributes": { + "revision": 16, + "table": [ + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POSR-K ", + "updated_online": true, + "value": 47 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "22", + "value": 22 + }, + "thresh": 51, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": true, + "prefailure": true, + "string": "POS--K ", + "updated_online": true, + "value": 39 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "4150", + "value": 4150 + }, + "thresh": 21, + "value": 177, + "when_failed": "", + "worst": 177 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "7", + "value": 7 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": true, + "string": "PO--CK ", + "updated_online": true, + "value": 51 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 140, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": true, + "event_count": false, + "performance": true, + "prefailure": false, + "string": "-OSR-K ", + "updated_online": true, + "value": 46 + }, + "id": 7, + "name": "Seek_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "71605", + "value": 71605 + }, + "thresh": 0, + "value": 2, + "when_failed": "", + "worst": 2 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 10, + "name": "Spin_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 11, + "name": "Calibration_Retry_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "7", + "value": 7 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 192, + "name": "Power-Off_Retract_Count", + "raw": { + "string": "5", + "value": 5 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 193, + "name": "Load_Cycle_Count", + "raw": { + "string": "3657", + "value": 3657 + }, + "thresh": 0, + "value": 199, + "when_failed": "", + "worst": 199 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---K ", + "updated_online": true, + "value": 34 + }, + "id": 194, + "name": "Temperature_Celsius", + "raw": { + "string": "33", + "value": 33 + }, + "thresh": 0, + "value": 114, + "when_failed": "", + "worst": 106 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 196, + "name": "Reallocated_Event_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 197, + "name": "Current_Pending_Sector", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "----CK ", + "updated_online": false, + "value": 48 + }, + "id": 198, + "name": "Offline_Uncorrectable", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 253 + }, + { + "flags": { + "auto_keep": true, + "error_rate": false, + "event_count": true, + "performance": false, + "prefailure": false, + "string": "-O--CK ", + "updated_online": true, + "value": 50 + }, + "id": 199, + "name": "UDMA_CRC_Error_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + }, + { + "flags": { + "auto_keep": false, + "error_rate": true, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "---R-- ", + "updated_online": false, + "value": 8 + }, + "id": 200, + "name": "Multi_Zone_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 200, + "when_failed": "", + "worst": 200 + } + ] + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 1022, + "minor_value": 0, + "string": "ACS-2 (minor revision not indicated)" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "REDACTED", + "in_smartctl_database": true, + "interface_speed": { + "current": { + "bits_per_unit": 100000000, + "sata_value": 3, + "string": "6.0 Gb/s", + "units_per_second": 60 + }, + "max": { + "bits_per_unit": 100000000, + "sata_value": 14, + "string": "6.0 Gb/s", + "units_per_second": 60 + } + }, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Feb 13 23:31:30 2009 UTC", + "time_t": 1234567890 + }, + "logical_block_size": 512, + "model_family": "Western Digital Red", + "model_name": "WDC WD20EFRX-68EUZN0", + "physical_block_size": 4096, + "power_cycle_count": 7, + "power_on_time": { + "hours": 71605 + }, + "rotation_rate": 5400, + "sata_version": { + "string": "SATA 3.0", + "value": 62 + }, + "serial_number": "REDACTED", + "smart_status": { + "passed": true + }, + "smart_support": { + "available": true, + "enabled": true + }, + "smartctl": { + "argv": [ + "smartctl", + "--json", + "--info", + "--health", + "--attributes", + "--tolerance=verypermissive", + "--nocheck=standby", + "--format=brief", + "--log=error", + "/dev/sda" + ], + "build_info": "REDACTED", + "drive_database_version": { + "string": "7.3/5533" + }, + "exit_status": 0, + "platform_info": "REDACTED", + "svn_revision": "5338", + "version": [ + 7, + 3 + ] + }, + "temperature": { + "current": 33 + }, + "trim": { + "supported": false + }, + "user_capacity": { + "blocks": 3907029168, + "bytes": 2000398934016 + }, + "wwn": { + "id": 1234567890, + "naa": 5, + "oui": 5358 + } +} \ No newline at end of file