AnalogJ / scrutiny

Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds
MIT License
5.14k stars 167 forks source link

[BUG] Errors while running collectior (smartctl returned an error code (4) while processing sd*) #141

Closed vbaros closed 2 years ago

vbaros commented 3 years ago

I installed latest linuxserver image inside docker on my Synology NAS. It should contain latest version 3.5 The NAS has 2 internal and 2 external USB disks. They are properly passed to the container. The info for the 2 USB drives works great but for sda and sdb I'm getting Failed status. Those are internal drives. I'm attaching collectior log. scrutiny-collector-metrics.log docker-compose.zip collector.zip

k8ieone commented 3 years ago

I also seem to have this problem. I'm running the Docker image and only have internal drives. I believe I didn't have this when running natively on Arch.

ChrisCarini commented 3 years ago

TL;DR: ~@AnalogJ - would you be open to a configuration option that would allow users to specify the device type of each drive for smartctl to use? The issue here seems to be that some drives are not being recognized as the correct device type (ie, ata, scsi, sat, etc) when they have some drive controllers / backplanes. Details below, but the jist of it is that if I run smartctl -d scsi or smartctl -d ata, I get incomplete data, but running smartctl -d sat I get much more complete/robust/accurate data; this happens for all 3 drives (two distinct manufactures) of mine that are not being correctly reported in scrutiny.~

See below for details, but for my Synology NAS, I needed to specify a different device type for smartctl to use than what was getting picked up by default. From my research, this may likely happen with other NAS manufactures, or other devices which may use some sort of drive controller and/or backplane that not all drives 'play nicely' with. Luckily, there is actually a way to set the device type in the config/collector.yaml file; example below:

devices:
  - device: /dev/sda
    type: 'sat'
  - device: /dev/sdb
    type: 'sat'
  - device: /dev/sdc
    type: 'sat'
  - device: /dev/sdd
    type: 'sat'
  - device: /dev/sde
    type: 'sat'
  - device: /dev/sdf
    type: 'sat'
  - device: /dev/sdg
    type: 'sat'
  - device: /dev/sdh
    type: 'sat'

Setting the types manually fixed the problem for me.

(Note: I had to delete the config/scrutiny.db DB file, perhaps the type was already set in the DB.)

I'd recommend folks who experience similar (ie, @vbaros and @satcom886, possibly others) try different device types to see what works best / provides the most details. @AnalogJ - think this 'issue'/fix is worth documenting anywhere? I obviously got to this conclusion after a non-trivial amount of research & debugging (the logs were very helpful, thank you for having those!), stepping through code on GH (I am a developer, but I do not know golang)... etc. I'm wondering if perhaps I just missed this, or if it should have been more obvious than it was to me. Let me know your thoughts! I love the project so far!

Details

(Note: All commands are being run in a docker container, which is on a Synology NAS.)

I have the same problem as @vbaros and @satcom886 mention, and I believe it's caused by Synology's backplane for the drives. This likely happens for other NAS type systems.

In the case of my particular Synology (a DS1812+), the drives are recognized as scsi by smartctl when running smartctl --scan:

root@77630004dcb6:/# smartctl --scan
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d scsi # /dev/sdb, SCSI device
/dev/sdc -d scsi # /dev/sdc, SCSI device
/dev/sdd -d scsi # /dev/sdd, SCSI device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/sdf -d scsi # /dev/sdf, SCSI device
/dev/sdg -d scsi # /dev/sdg, SCSI device
/dev/sdh -d scsi # /dev/sdh, SCSI device
root@77630004dcb6:/# 

When running smartctl --scan-open, the output changes slightly:

root@77630004dcb6:/# smartctl --scan-open
/dev/sda -d scsi # /dev/sda, SCSI device
/dev/sdb -d sat # /dev/sdb [SAT], ATA device
/dev/sdc -d sat # /dev/sdc [SAT], ATA device
/dev/sdd -d sat # /dev/sdd [SAT], ATA device
/dev/sde -d scsi # /dev/sde, SCSI device
/dev/sdf -d sat # /dev/sdf [SAT], ATA device
/dev/sdg -d scsi # /dev/sdg, SCSI device
/dev/sdh -d sat # /dev/sdh [SAT], ATA device
root@77630004dcb6:/# 

All, except 3 drives changed from scsi to sat type. It is worth noting that the 3 drives that did not (one Hitachi HUS724030ALE641 (/dev/sda; 3TB), and two Western Digital WD80EMAZ-00WJTA0 (/dev/sdf & /dev/sdg; 8TB drives) are the 3 drives that are showing incorrect results in scrutiny (screenshot below):

Screen Shot 2021-06-21 at 05 16 24

SCSI can even be seen in the specific page for each of these drives within scrutiny (one screenshot as example below):

Screen Shot 2021-06-21 at 05 19 44

These devices all report SMART data as OK in the stock Synology GUI.

If we run smartctl -x /dev/sda with different flags for the device type, we will get different results. Summary table directly below, and full command output below the table.

Table

command includes details line count
smartctl -x /dev/sda no 32
smartctl -x /dev/sda -d auto no 32
smartctl -x /dev/sda -d scsi no 32
smartctl -x /dev/sda -d sat full 250
smartctl -x /dev/sda -d ata most 166

Full smartctl Command Outputs

smartctl -x /dev/sda

root@77630004dcb6:/# smartctl -x /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-3.10.105] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               Hitachi
Product:              HUS724030ALE641
Revision:             MJ8O
Compliance:           SPC-3
User Capacity:        3,000,592,982,016 bytes [3.00 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is fully provisioned
Rotation Rate:        7200 rpm
Form Factor:          3.5 inches
Logical Unit id:      0x5000cca22cd64b02
Serial number:        ********
Device type:          disk
Local Time is:        Mon Jun 21 05:20:34 2021 PDT
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Enabled
Writeback Cache is:   Enabled

=== START OF READ SMART DATA SECTION ===
Current Drive Temperature:     0 C
Drive Trip Temperature:        0 C

Error Counter logging not supported

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging
Device does not support Background scan results logging
root@77630004dcb6:/# 

(Note: From looking at the code, it looks like scrutiny runs smartctl with the -j flag, which outputs JSON format; not using that here since humans will be reading this response.) (Note: For brevity, the output above (ie, for smartctl -x /dev/sda) is the same output as running smartctl -x /dev/sda -d scsi or smartctl -x /dev/sda -d auto.)

smartctl -x /dev/sda -d sat

root@77630004dcb6:/# smartctl -x /dev/sda -d sat
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-3.10.105] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi/HGST Ultrastar 7K4000
Device Model:     Hitachi HUS724030ALE641
Serial Number:    ********
LU WWN Device Id: 5 000cca 22cd64b02
Firmware Version: MJ8OA5F0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Jun 21 05:24:54 2021 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Disabled
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, NOT FROZEN [SEC1]
Wt Cache Reorder: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (   24) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   1) minutes.
Extended self-test routine
recommended polling time:    (   1) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     PO-R--   100   100   016    -    0
  2 Throughput_Performance  P-S---   136   136   054    -    80
  3 Spin_Up_Time            POS---   129   129   024    -    481 (Average 481)
  4 Start_Stop_Count        -O--C-   090   090   000    -    41521
  5 Reallocated_Sector_Ct   PO--CK   100   100   005    -    0
  7 Seek_Error_Rate         PO-R--   100   100   067    -    0
  8 Seek_Time_Performance   P-S---   121   121   020    -    34
  9 Power_On_Hours          -O--C-   094   094   000    -    47408
 10 Spin_Retry_Count        PO--C-   100   100   060    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    53
192 Power-Off_Retract_Count -O--CK   066   066   000    -    41912
193 Load_Cycle_Count        -O--C-   066   066   000    -    41912
194 Temperature_Celsius     -O----   153   153   000    -    39 (Min/Max 17/50)
196 Reallocated_Event_Count -O--CK   100   100   000    -    0
197 Current_Pending_Sector  -O---K   100   100   000    -    0
198 Offline_Uncorrectable   ---R--   100   100   000    -    0
199 UDMA_CRC_Error_Count    -O-R--   200   200   000    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x03       GPL     R/O      1  Ext. Comprehensive SMART error log
0x04       GPL     R/O      7  Device Statistics log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x08       GPL     R/O      2  Power Conditions log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters log
0x12       GPL     R/O      1  SATA NCQ Non-Data log
0x20       GPL     R/O      1  Streaming performance log [OBS-8]
0x21       GPL     R/O      1  Write stream error log
0x22       GPL     R/O      1  Read stream error log
0x80       GPL     R/W     63  Host vendor specific log
0x81-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xb2       GPL     VS      63  Device vendor specific log
0xc8       GPL     VS     617  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     47020         -
# 2  Short offline       Completed without error       00%     46276         -
# 3  Short offline       Completed without error       00%     45556         -
# 4  Short offline       Completed without error       00%     44813         -
# 5  Short offline       Completed without error       00%     44141         -
# 6  Short offline       Completed without error       00%     43397         -
# 7  Short offline       Completed without error       00%     42661         -
# 8  Short offline       Completed without error       00%     41943         -
# 9  Short offline       Completed without error       00%     41226         -
#10  Short offline       Completed without error       00%     40510         -
#11  Short offline       Completed without error       00%     38638         -
#12  Short offline       Completed without error       00%     37894         -
#13  Short offline       Completed without error       00%     37183         -
#14  Short offline       Completed without error       00%     36440         -
#15  Short offline       Completed without error       00%     35236         -
#16  Short offline       Completed without error       00%     34492         -
#17  Short offline       Completed without error       00%     33973         -
#18  Short offline       Completed without error       00%     33228         -
#19  Short offline       Completed without error       00%     32508         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3
SCT Version (vendor specific):       256 (0x0100)
Device State:                        Active (0)
Current Temperature:                    39 Celsius
Power Cycle Min/Max Temperature:     38/46 Celsius
Lifetime    Min/Max Temperature:     17/50 Celsius
Under/Over Temperature Limit Count:   0/0

SCT Temperature History Version:     2
Temperature Sampling Period:         1 minute
Temperature Logging Interval:        1 minute
Min/Max recommended Temperature:      0/60 Celsius
Min/Max Temperature Limit:           -40/70 Celsius
Temperature History Size (Index):    128 (55)

Index    Estimated Time   Temperature Celsius
  56    2021-06-21 03:17    40  *********************
 ...    ..(  2 skipped).    ..  *********************
  59    2021-06-21 03:20    40  *********************
  60    2021-06-21 03:21    41  **********************
  61    2021-06-21 03:22    40  *********************
  62    2021-06-21 03:23    41  **********************
 ...    ..(  2 skipped).    ..  **********************
  65    2021-06-21 03:26    41  **********************
  66    2021-06-21 03:27    40  *********************
  67    2021-06-21 03:28    40  *********************
  68    2021-06-21 03:29    41  **********************
  69    2021-06-21 03:30    41  **********************
  70    2021-06-21 03:31    40  *********************
 ...    ..( 61 skipped).    ..  *********************
   4    2021-06-21 04:33    40  *********************
   5    2021-06-21 04:34    39  ********************
 ...    ..(  6 skipped).    ..  ********************
  12    2021-06-21 04:41    39  ********************
  13    2021-06-21 04:42    40  *********************
  14    2021-06-21 04:43    40  *********************
  15    2021-06-21 04:44    39  ********************
 ...    ..( 26 skipped).    ..  ********************
  42    2021-06-21 05:11    39  ********************
  43    2021-06-21 05:12    40  *********************
  44    2021-06-21 05:13    40  *********************
  45    2021-06-21 05:14    39  ********************
 ...    ..(  9 skipped).    ..  ********************
  55    2021-06-21 05:24    39  ********************

SCT Error Recovery Control:
           Read: Disabled
          Write: Disabled

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 2) ==
0x01  0x008  4              53  ---  Lifetime Power-On Resets
0x01  0x018  6    362959877945  ---  Logical Sectors Written
0x01  0x020  6      1697281994  ---  Number of Write Commands
0x01  0x028  6     99881481475  ---  Logical Sectors Read
0x01  0x030  6       758268153  ---  Number of Read Commands
0x03  =====  =               =  ===  == Rotating Media Statistics (rev 1) ==
0x03  0x008  4           44179  ---  Spindle Motor Power-on Hours
0x03  0x010  4           44176  ---  Head Flying Hours
0x03  0x018  4           41912  ---  Head Load Events
0x03  0x020  4               0  ---  Number of Reallocated Logical Sectors
0x03  0x028  4              15  ---  Read Recovery Attempts
0x03  0x030  4               0  ---  Number of Mechanical Start Failures
0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
0x04  0x010  4               0  ---  Resets Between Cmd Acceptance and Completion
0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
0x05  0x008  1              39  ---  Current Temperature
0x05  0x010  1              40  N--  Average Short Term Temperature
0x05  0x018  1              39  N--  Average Long Term Temperature
0x05  0x020  1              50  ---  Highest Temperature
0x05  0x028  1              17  ---  Lowest Temperature
0x05  0x030  1              47  N--  Highest Average Short Term Temperature
0x05  0x038  1              24  N--  Lowest Average Short Term Temperature
0x05  0x040  1              44  N--  Highest Average Long Term Temperature
0x05  0x048  1              25  N--  Lowest Average Long Term Temperature
0x05  0x050  4               0  ---  Time in Over-Temperature
0x05  0x058  1              60  ---  Specified Maximum Operating Temperature
0x05  0x060  4               0  ---  Time in Under-Temperature
0x05  0x068  1               0  ---  Specified Minimum Operating Temperature
0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
0x06  0x008  4             424  ---  Number of Hardware Resets
0x06  0x010  4             367  ---  Number of ASR Events
0x06  0x018  4               0  ---  Number of Interface CRC Errors
                                |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  2            0  Command failed due to ICRC error
0x0002  2            0  R_ERR response for data FIS
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0005  2            0  R_ERR response for non-data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS
0x0009  2            3  Transition from drive PhyRdy to drive PhyNRdy
0x000a  2            2  Device-to-host register FISes sent due to a COMRESET
0x000b  2            0  CRC errors within host-to-device FIS
0x000d  2            0  Non-CRC errors within host-to-device FIS

root@77630004dcb6:/# 

smartctl -x /dev/sda -d ata

root@77630004dcb6:/# smartctl -x /dev/sda -d ata
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-3.10.105] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi/HGST Ultrastar 7K4000
Device Model:     Hitachi HUS724030ALE641
Serial Number:    ********
LU WWN Device Id: 5 000cca 22cd64b02
Firmware Version: MJ8OA5F0
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Mon Jun 21 05:26:02 2021 PDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM feature is:   Disabled
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, NOT FROZEN [SEC1]
Write SCT (Get) Feature Control Command failed: Not a tty
Wt Cache Reorder: Unknown (SCT Feature Control command failed)

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (   24) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   1) minutes.
Extended self-test routine
recommended polling time:    (   1) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     PO-R--   100   100   016    -    0
  2 Throughput_Performance  P-S---   136   136   054    -    80
  3 Spin_Up_Time            POS---   129   129   024    -    481 (Average 481)
  4 Start_Stop_Count        -O--C-   090   090   000    -    41521
  5 Reallocated_Sector_Ct   PO--CK   100   100   005    -    0
  7 Seek_Error_Rate         PO-R--   100   100   067    -    0
  8 Seek_Time_Performance   P-S---   121   121   020    -    34
  9 Power_On_Hours          -O--C-   094   094   000    -    47408
 10 Spin_Retry_Count        PO--C-   100   100   060    -    0
 12 Power_Cycle_Count       -O--CK   100   100   000    -    53
192 Power-Off_Retract_Count -O--CK   066   066   000    -    41912
193 Load_Cycle_Count        -O--C-   066   066   000    -    41912
194 Temperature_Celsius     -O----   153   153   000    -    39 (Min/Max 17/50)
196 Reallocated_Event_Count -O--CK   100   100   000    -    0
197 Current_Pending_Sector  -O---K   100   100   000    -    0
198 Offline_Uncorrectable   ---R--   100   100   000    -    0
199 UDMA_CRC_Error_Count    -O-R--   200   200   000    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

ATA_READ_LOG_EXT (addr=0x00:0x00, page=0, n=1) failed: 48-bit ATA commands not implemented
Read GP Log Directory failed

SMART Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00           SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x06           SL  R/O      1  SMART self-test log
0x09           SL  R/W      1  Selective self-test log
0x81-0x9f      SL  R/W     16  Host vendor specific log
0xe0           SL  R/W      1  SCT Command/Status
0xe1           SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log (GP Log 0x03) not supported

SMART Error Log Version: 1
No Errors Logged

SMART Extended Self-test Log (GP Log 0x07) not supported

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     47020         -
# 2  Short offline       Completed without error       00%     46276         -
# 3  Short offline       Completed without error       00%     45556         -
# 4  Short offline       Completed without error       00%     44813         -
# 5  Short offline       Completed without error       00%     44141         -
# 6  Short offline       Completed without error       00%     43397         -
# 7  Short offline       Completed without error       00%     42661         -
# 8  Short offline       Completed without error       00%     41943         -
# 9  Short offline       Completed without error       00%     41226         -
#10  Short offline       Completed without error       00%     40510         -
#11  Short offline       Completed without error       00%     38638         -
#12  Short offline       Completed without error       00%     37894         -
#13  Short offline       Completed without error       00%     37183         -
#14  Short offline       Completed without error       00%     36440         -
#15  Short offline       Completed without error       00%     35236         -
#16  Short offline       Completed without error       00%     34492         -
#17  Short offline       Completed without error       00%     33973         -
#18  Short offline       Completed without error       00%     33228         -
#19  Short offline       Completed without error       00%     32508         -
#20  Short offline       Completed without error       00%     31764         -
#21  Short offline       Completed without error       00%     31184         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

SCT Status Version:                  3
SCT Version (vendor specific):       256 (0x0100)
Device State:                        Active (0)
Current Temperature:                    39 Celsius
Power Cycle Min/Max Temperature:     38/46 Celsius
Lifetime    Min/Max Temperature:     17/50 Celsius
Under/Over Temperature Limit Count:   0/0

Write SCT Data Table failed: Not a tty
Read SCT Temperature History failed

Write SCT (Get) Error Recovery Control Command failed: Not a tty
SCT (Get) Error Recovery Control command failed

Device Statistics (GP/SMART Log 0x04) not supported

Pending Defects log (GP Log 0x0c) not supported

ATA_READ_LOG_EXT (addr=0x11:0x00, page=0, n=1) failed: 48-bit ATA commands not implemented
Read SATA Phy Event Counters failed

root@77630004dcb6:/# 

Looking into the code for scrutiny (and, I am not that familiar with golang), it looks like scrutiny runs smartctl specifying the device type via the -d flag only if the deviceType in the database is not scsi or ata (ref: metrics.go line 114).

Tracing this back, it looks like the metrics collector Collect() function is being passed this information from line 82 above, which got a response from the API/DB(?) - this seems to have been populated based on the output from smartctl --scan & smartctl --info

AnalogJ commented 2 years ago

Apologies for the lack of response (this issue is ~1.5 years old 😬 )

As @ChrisCarini mentioned, scrutiny uses smartctl under the hood, and its possible to override the smartctl --scan output using a collector config file.

This was not documented very well until recently: https://github.com/AnalogJ/scrutiny/blob/master/docs/TROUBLESHOOTING_DEVICE_COLLECTOR.md

I'm going to close this issue for now, but feel free to reopen/comment if you're still running into problems with the collector