id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 1165,Set JSON value 'power_on_time.hours' if raw value also contains milliseconds,Christian Turri,Christian Franke,"Following ticket #1164 I am now using the standardised values for power_cycle_count, power_on_time.hours and temperature.current from the JSON output instead of the relevant SMART attribute raw values. This is working work fine for all but a particular Seagate disk model (ST10000VX0004) where I get no value in the JSON output for power_on_time.hours. Below is the full JSON output. Any ideas? {{{ { ""json_format_version"": [ 1, 0 ], ""smartctl"": { ""version"": [ 7, 1 ], ""svn_revision"": ""4891"", ""platform_info"": ""FreeBSD 11.2-STABLE amd64"", ""build_info"": ""(CircleCI)"", ""argv"": [ ""smartctl"", ""-a"", ""-j"", ""/dev/ada5"" ], ""exit_status"": 0 }, ""device"": { ""name"": ""/dev/ada5"", ""info_name"": ""/dev/ada5"", ""type"": ""atacam"", ""protocol"": ""ATA"" }, ""model_name"": ""ST10000VX0004-1ZE101"", ""serial_number"": ""ZA28DB5C"", ""wwn"": { ""naa"": 5, ""oui"": 3152, ""id"": 2990796275 }, ""firmware_version"": ""AV01"", ""user_capacity"": { ""blocks"": 19532873728, ""bytes"": 10000831348736 }, ""logical_block_size"": 512, ""physical_block_size"": 4096, ""rotation_rate"": 7200, ""form_factor"": { ""ata_value"": 2, ""name"": ""3.5 inches"" }, ""in_smartctl_database"": false, ""ata_version"": { ""string"": ""ACS-3 T13/2161-D revision 5"", ""major_value"": 2032, ""minor_value"": 109 }, ""sata_version"": { ""string"": ""SATA 3.1"", ""value"": 127 }, ""interface_speed"": { ""max"": { ""sata_value"": 14, ""string"": ""6.0 Gb/s"", ""units_per_second"": 60, ""bits_per_unit"": 100000000 }, ""current"": { ""sata_value"": 3, ""string"": ""6.0 Gb/s"", ""units_per_second"": 60, ""bits_per_unit"": 100000000 } }, ""local_time"": { ""time_t"": 1549917425, ""asctime"": ""Mon Feb 11 20:37:05 2019 GMT"" }, ""smart_status"": { ""passed"": true }, ""ata_smart_data"": { ""offline_data_collection"": { ""status"": { ""value"": 130, ""string"": ""was completed without error"", ""passed"": true }, ""completion_seconds"": 584 }, ""self_test"": { ""status"": { ""value"": 0, ""string"": ""completed without error"", ""passed"": true }, ""polling_minutes"": { ""short"": 1, ""extended"": 876, ""conveyance"": 2 } }, ""capabilities"": { ""values"": [ 123, 3 ], ""exec_offline_immediate_supported"": true, ""offline_is_aborted_upon_new_cmd"": false, ""offline_surface_scan_supported"": true, ""self_tests_supported"": true, ""conveyance_self_test_supported"": true, ""selective_self_test_supported"": true, ""attribute_autosave_enabled"": true, ""error_logging_supported"": true, ""gp_logging_supported"": true } }, ""ata_sct_capabilities"": { ""value"": 20669, ""error_recovery_control_supported"": true, ""feature_control_supported"": true, ""data_table_supported"": true }, ""ata_smart_attributes"": { ""revision"": 10, ""table"": [ { ""id"": 1, ""name"": ""Raw_Read_Error_Rate"", ""value"": 83, ""worst"": 64, ""thresh"": 44, ""when_failed"": """", ""flags"": { ""value"": 15, ""string"": ""POSR-- "", ""prefailure"": true, ""updated_online"": true, ""performance"": true, ""error_rate"": true, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 197743893, ""string"": ""197743893"" } }, { ""id"": 3, ""name"": ""Spin_Up_Time"", ""value"": 88, ""worst"": 87, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 3, ""string"": ""PO---- "", ""prefailure"": true, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 4, ""name"": ""Start_Stop_Count"", ""value"": 100, ""worst"": 100, ""thresh"": 20, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 21, ""string"": ""21"" } }, { ""id"": 5, ""name"": ""Reallocated_Sector_Ct"", ""value"": 100, ""worst"": 100, ""thresh"": 10, ""when_failed"": """", ""flags"": { ""value"": 51, ""string"": ""PO--CK "", ""prefailure"": true, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 7, ""name"": ""Seek_Error_Rate"", ""value"": 79, ""worst"": 60, ""thresh"": 45, ""when_failed"": """", ""flags"": { ""value"": 15, ""string"": ""POSR-- "", ""prefailure"": true, ""updated_online"": true, ""performance"": true, ""error_rate"": true, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 78687558, ""string"": ""78687558"" } }, { ""id"": 9, ""name"": ""Power_On_Hours"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 238263310746167, ""string"": ""567 (216 179 0)"" } }, { ""id"": 10, ""name"": ""Spin_Retry_Count"", ""value"": 100, ""worst"": 100, ""thresh"": 97, ""when_failed"": """", ""flags"": { ""value"": 19, ""string"": ""PO--C- "", ""prefailure"": true, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": false }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 12, ""name"": ""Power_Cycle_Count"", ""value"": 100, ""worst"": 100, ""thresh"": 20, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 21, ""string"": ""21"" } }, { ""id"": 184, ""name"": ""End-to-End_Error"", ""value"": 100, ""worst"": 100, ""thresh"": 99, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 187, ""name"": ""Reported_Uncorrect"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 188, ""name"": ""Command_Timeout"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 189, ""name"": ""High_Fly_Writes"", ""value"": 74, ""worst"": 74, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 58, ""string"": ""-O-RCK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": true, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 26, ""string"": ""26"" } }, { ""id"": 190, ""name"": ""Airflow_Temperature_Cel"", ""value"": 78, ""worst"": 57, ""thresh"": 40, ""when_failed"": """", ""flags"": { ""value"": 34, ""string"": ""-O---K "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": true }, ""raw"": { ""value"": 387252246, ""string"": ""22 (Min/Max 21/23)"" } }, { ""id"": 191, ""name"": ""G-Sense_Error_Rate"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 802, ""string"": ""802"" } }, { ""id"": 192, ""name"": ""Power-Off_Retract_Count"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 12, ""string"": ""12"" } }, { ""id"": 193, ""name"": ""Load_Cycle_Count"", ""value"": 97, ""worst"": 97, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 50, ""string"": ""-O--CK "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 6103, ""string"": ""6103"" } }, { ""id"": 194, ""name"": ""Temperature_Celsius"", ""value"": 22, ""worst"": 43, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 34, ""string"": ""-O---K "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": true }, ""raw"": { ""value"": 85899345942, ""string"": ""22 (0 20 0 0 0)"" } }, { ""id"": 195, ""name"": ""Hardware_ECC_Recovered"", ""value"": 30, ""worst"": 1, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 26, ""string"": ""-O-RC- "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": true, ""event_count"": true, ""auto_keep"": false }, ""raw"": { ""value"": 197743893, ""string"": ""197743893"" } }, { ""id"": 197, ""name"": ""Current_Pending_Sector"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 18, ""string"": ""-O--C- "", ""prefailure"": false, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": false }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 198, ""name"": ""Offline_Uncorrectable"", ""value"": 100, ""worst"": 100, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 16, ""string"": ""----C- "", ""prefailure"": false, ""updated_online"": false, ""performance"": false, ""error_rate"": false, ""event_count"": true, ""auto_keep"": false }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 199, ""name"": ""UDMA_CRC_Error_Count"", ""value"": 200, ""worst"": 200, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 62, ""string"": ""-OSRCK "", ""prefailure"": false, ""updated_online"": true, ""performance"": true, ""error_rate"": true, ""event_count"": true, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 200, ""name"": ""Multi_Zone_Error_Rate"", ""value"": 100, ""worst"": 100, ""thresh"": 1, ""when_failed"": """", ""flags"": { ""value"": 35, ""string"": ""PO---K "", ""prefailure"": true, ""updated_online"": true, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": true }, ""raw"": { ""value"": 0, ""string"": ""0"" } }, { ""id"": 240, ""name"": ""Head_Flying_Hours"", ""value"": 100, ""worst"": 253, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 0, ""string"": ""------ "", ""prefailure"": false, ""updated_online"": false, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 214112709640468, ""string"": ""276 (194 188 0)"" } }, { ""id"": 241, ""name"": ""Total_LBAs_Written"", ""value"": 100, ""worst"": 253, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 0, ""string"": ""------ "", ""prefailure"": false, ""updated_online"": false, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 35285723413, ""string"": ""35285723413"" } }, { ""id"": 242, ""name"": ""Total_LBAs_Read"", ""value"": 100, ""worst"": 253, ""thresh"": 0, ""when_failed"": """", ""flags"": { ""value"": 0, ""string"": ""------ "", ""prefailure"": false, ""updated_online"": false, ""performance"": false, ""error_rate"": false, ""event_count"": false, ""auto_keep"": false }, ""raw"": { ""value"": 9860969783, ""string"": ""9860969783"" } } ] }, ""power_cycle_count"": 21, ""temperature"": { ""current"": 22 }, ""ata_smart_error_log"": { ""summary"": { ""revision"": 1, ""count"": 0 } }, ""ata_smart_self_test_log"": { ""standard"": { ""revision"": 1, ""table"": [ { ""type"": { ""value"": 1, ""string"": ""Short offline"" }, ""status"": { ""value"": 0, ""string"": ""Completed without error"", ""passed"": true }, ""lifetime_hours"": 567 } ], ""count"": 1, ""error_count_total"": 0, ""error_count_outdated"": 0 } }, ""ata_smart_selective_self_test_log"": { ""revision"": 1, ""table"": [ { ""lba_min"": 0, ""lba_max"": 0, ""status"": { ""value"": 0, ""string"": ""Not_testing"" } }, { ""lba_min"": 0, ""lba_max"": 0, ""status"": { ""value"": 0, ""string"": ""Not_testing"" } }, { ""lba_min"": 0, ""lba_max"": 0, ""status"": { ""value"": 0, ""string"": ""Not_testing"" } }, { ""lba_min"": 0, ""lba_max"": 0, ""status"": { ""value"": 0, ""string"": ""Not_testing"" } }, { ""lba_min"": 0, ""lba_max"": 0, ""status"": { ""value"": 0, ""string"": ""Not_testing"" } } ], ""flags"": { ""value"": 0, ""remainder_scan_enabled"": false }, ""power_up_scan_resume_minutes"": 0 } } }}} ",enhancement,closed,minor,Release 7.1,smartctl,7.0,fixed,json ata,