RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1590190 - smartctl -l devstat says "Device Statistics (GP/SMART Log 0x04) not supported"
Summary: smartctl -l devstat says "Device Statistics (GP/SMART Log 0x04) not supported"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: smartmontools
Version: 7.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: Maryna Nalbandian
URL:
Whiteboard:
Depends On:
Blocks: 1630919 1660473
TreeView+ depends on / blocked
 
Reported: 2018-06-12 07:24 UTC by Steffen Froemer
Modified: 2019-08-06 12:58 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:58:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2148 0 None None None 2019-08-06 12:58:16 UTC

Description Steffen Froemer 2018-06-12 07:24:57 UTC
Description of problem:
On Western Digital Gold 10TB, smartctl -l devstat says "Device Statistics (GP/SMART Log 0x04) not supported"

Version-Release number of selected component (if applicable):
smartmontools-6.2-8.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. smartctl -l devstat /dev/<appropriate device>


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


Expected results:
the statistics should be shown


Additional info:

# smartctl -i /dev/sda
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-862.2.3.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Gold
Device Model:     WDC WD101KRYZ-01JPDB0
Serial Number:    
LU WWN Device Id: 
Firmware Version: 01.01H01
User Capacity:    10,000,831,348,736 bytes [10.0 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:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Jun 11 14:32:14 2018 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


this could be the appropriate upstream bug

https://www.smartmontools.org/ticket/922

 #922 closed patch (fixed)
-l devstat does not work if gp devstat log is 256 sectors
Reported by: 	oddbondboris 	Owned by: 	Christian Franke
Priority: 	minor 	Milestone: 	Release 6.7
Component: 	smartctl 	Version: 	
Keywords: 	ata 	Cc: 	
Description

smartctl does not use the 9 bit value from the directory properly and instead reads the value 256 as zero

Steps to reproduce:
smartctl -l devstat /dev/sdX on any drive that has a directory such as this

0x04       GPL     R/O    256  Device Statistics log

Expected behavior:
print device statistics

Comment 1 Steffen Froemer 2018-06-14 07:18:13 UTC
Customer uses version:
smartmontools-6.5-1.el7.x86_64

Comment 3 Michal Hlavinka 2018-09-24 14:25:26 UTC
That upstream ticket could be probably related to this issue. 

Did you/customer try that fix? If not, I've prepared the build:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18471214

Also, do you have any machine available for testing?

Comment 4 Michal Hlavinka 2018-10-24 15:54:23 UTC
Previous build was already garbage collected,new build available here:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18913572

Comment 5 Steffen Froemer 2018-11-23 16:34:15 UTC
Hi Michal,

apologize my delay. I missed the availability of test-packages again. 
Could you provide those again and I will forward them to the customer.

I'm currently awaiting the answer, if he's able to test is on a test machine.

Thanks,
Steffen

Comment 7 Michal Hlavinka 2019-01-31 14:24:31 UTC
New test build available here:
https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20034677

Comment 10 Steffen Froemer 2019-02-14 22:00:52 UTC
Hi, I got feedback from customer.

~~~
thanks, the test rpm works perfect.
~~~

Below the output from customer. 

# smartctl -x /dev/sda |cat -n
     1  smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.1.3.el7.x86_64] (local build)
     2  Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
     3
     4  === START OF INFORMATION SECTION ===
     5  Model Family:     Western Digital Gold
     6  Device Model:     WDC WD101KRYZ-01JPDB0
     7  Serial Number:    7PJY8STC
     8  LU WWN Device Id: 5 000cca 251e97eae
     9  Firmware Version: 01.01H01
    10  User Capacity:    10,000,831,348,736 bytes [10.0 TB]
    11  Sector Sizes:     512 bytes logical, 4096 bytes physical
    12  Rotation Rate:    7200 rpm
    13  Form Factor:      3.5 inches
    14  Device is:        In smartctl database [for details use: -P show]
    15  ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
    16  SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
    17  Local Time is:    Thu Feb  7 14:39:46 2019 CET
    18  SMART support is: Available - device has SMART capability.
    19  SMART support is: Enabled
    20  AAM feature is:   Unavailable
    21  APM feature is:   Disabled
    22  Rd look-ahead is: Enabled
    23  Write cache is:   Enabled
    24  ATA Security is:  Disabled, NOT FROZEN [SEC1]
    25  Wt Cache Reorder: Enabled
    26
    27  === START OF READ SMART DATA SECTION ===
    28  SMART overall-health self-assessment test result: PASSED
    29
    30  General SMART Values:
    31  Offline data collection status:  (0x82) Offline data collection activity
    32                                          was completed without error.
    33                                          Auto Offline Data Collection: Enabled.
    34  Self-test execution status:      (   0) The previous self-test routine completed
    35                                          without error or no self-test has ever 
    36                                          been run.
    37  Total time to complete Offline 
    38  data collection:                (   93) seconds.
    39  Offline data collection
    40  capabilities:                    (0x5b) SMART execute Offline immediate.
    41                                          Auto Offline data collection on/off support.
    42                                          Suspend Offline collection upon new
    43                                          command.
    44                                          Offline surface scan supported.
    45                                          Self-test supported.
    46                                          No Conveyance Self-test supported.
    47                                          Selective Self-test supported.
    48  SMART capabilities:            (0x0003) Saves SMART data before entering
    49                                          power-saving mode.
    50                                          Supports SMART auto save timer.
    51  Error logging capability:        (0x01) Error logging supported.
    52                                          General Purpose Logging supported.
    53  Short self-test routine 
    54  recommended polling time:        (   2) minutes.
    55  Extended self-test routine
    56  recommended polling time:        (1222) minutes.
    57  SCT capabilities:              (0x003d) SCT Status supported.
    58                                          SCT Error Recovery Control supported.
    59                                          SCT Feature Control supported.
    60                                          SCT Data Table supported.
    61
    62  SMART Attributes Data Structure revision number: 16
    63  Vendor Specific SMART Attributes with Thresholds:
    64  ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
    65    1 Raw_Read_Error_Rate     PO-R--   100   100   016    -    0
    66    2 Throughput_Performance  P-S---   134   134   054    -    96
    67    3 Spin_Up_Time            POS---   100   100   024    -    0
    68    4 Start_Stop_Count        -O--C-   100   100   000    -    4
    69    5 Reallocated_Sector_Ct   PO--CK   100   100   005    -    0
    70    7 Seek_Error_Rate         PO-R--   100   100   067    -    0
    71    8 Seek_Time_Performance   P-S---   128   128   020    -    18
    72    9 Power_On_Hours          -O--C-   098   098   000    -    15288
    73   10 Spin_Retry_Count        PO--C-   100   100   060    -    0
    74   12 Power_Cycle_Count       -O--CK   100   100   000    -    4
    75   22 Unknown_Attribute       PO---K   100   100   025    -    100
    76  192 Power-Off_Retract_Count -O--CK   092   092   000    -    10606
    77  193 Load_Cycle_Count        -O--C-   092   092   000    -    10606
    78  194 Temperature_Celsius     -O----   146   146   000    -    41 (Min/Max 22/59)
    79  196 Reallocated_Event_Count -O--CK   100   100   000    -    0
    80  197 Current_Pending_Sector  -O---K   100   100   000    -    0
    81  198 Offline_Uncorrectable   ---R--   100   100   000    -    0
    82  199 UDMA_CRC_Error_Count    -O-R--   200   200   000    -    0
    83                              ||||||_ K auto-keep
    84                              |||||__ C event count
    85                              ||||___ R error rate
    86                              |||____ S speed/performance
    87                              ||_____ O updated online
    88                              |______ P prefailure warning
    89
    90  General Purpose Log Directory Version 1
    91  SMART           Log Directory Version 1 [multi-sector log support]
    92  Address    Access  R/W   Size  Description
    93  0x00       GPL,SL  R/O      1  Log Directory
    94  0x01           SL  R/O      1  Summary SMART error log
    95  0x02           SL  R/O      1  Comprehensive SMART error log
    96  0x03       GPL     R/O      1  Ext. Comprehensive SMART error log
    97  0x04       GPL     R/O    256  Device Statistics log
    98  0x04       SL      R/O    255  Device Statistics log
    99  0x06           SL  R/O      1  SMART self-test log
   100  0x07       GPL     R/O      1  Extended self-test log
   101  0x08       GPL     R/O      2  Power Conditions log
   102  0x09           SL  R/W      1  Selective self-test log
   103  0x0c       GPL     R/O   5501  Pending Defects log
   104  0x10       GPL     R/O      1  SATA NCQ Queued Error log
   105  0x11       GPL     R/O      1  SATA Phy Event Counters log
   106  0x12       GPL     R/O      1  SATA NCQ NON-DATA log
   107  0x13       GPL     R/O      1  SATA NCQ Send and Receive log
   108  0x15       GPL,SL  R/W      1  SATA Rebuild Assist log
   109  0x21       GPL     R/O      1  Write stream error log
   110  0x22       GPL     R/O      1  Read stream error log
   111  0x24       GPL     R/O    256  Current Device Internal Status Data log
   112  0x25       GPL     R/O    256  Saved Device Internal Status Data log
   113  0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
   114  0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
   115  0xe0       GPL,SL  R/W      1  SCT Command/Status
   116  0xe1       GPL,SL  R/W      1  SCT Data Transfer
   117
   118  SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
   119  No Errors Logged
   120
   121  SMART Extended Self-test Log Version: 1 (1 sectors)
   122  Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
   123  # 1  Extended offline    Completed without error       00%        80         -
   124  # 2  Short offline       Completed without error       00%        17         -
   125
   126  SMART Selective self-test log data structure revision number 1
   127   SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
   128      1        0        0  Not_testing
   129      2        0        0  Not_testing
   130      3        0        0  Not_testing
   131      4        0        0  Not_testing
   132      5        0        0  Not_testing
   133  Selective self-test flags (0x0):
   134    After scanning selected spans, do NOT read-scan remainder of disk.
   135  If Selective self-test is pending on power-up, resume after 0 minute delay.
   136
   137  SCT Status Version:                  3
   138  SCT Version (vendor specific):       256 (0x0100)
   139  SCT Support Level:                   0
   140  Device State:                        Active (0)
   141  Current Temperature:                    41 Celsius
   142  Power Cycle Min/Max Temperature:     37/52 Celsius
   143  Lifetime    Min/Max Temperature:     22/59 Celsius
   144  Under/Over Temperature Limit Count:   0/0
   145
   146  SCT Temperature History Version:     2
   147  Temperature Sampling Period:         1 minute
   148  Temperature Logging Interval:        1 minute
   149  Min/Max recommended Temperature:      0/60 Celsius
   150  Min/Max Temperature Limit:           -40/70 Celsius
   151  Temperature History Size (Index):    128 (68)
   152
   153  Index    Estimated Time   Temperature Celsius
   154    69    2019-02-07 12:32    41  **********************
   155   ...    ..(126 skipped).    ..  **********************
   156    68    2019-02-07 14:39    41  **********************
   157
   158  SCT Error Recovery Control:
   159             Read:     68 (6.8 seconds)
   160            Write:     68 (6.8 seconds)
   161
   162  Device Statistics (GP Log 0x04)                              ---> THIS IS WORKING NOW
   163  Page  Offset Size        Value Flags Description
   164  0x01  =====  =               =  ===  == General Statistics (rev 1) ==
   165  0x01  0x008  4               4  ---  Lifetime Power-On Resets
   166  0x01  0x018  6     33692987224  ---  Logical Sectors Written
   167  0x01  0x020  6        82002349  ---  Number of Write Commands
   168  0x01  0x028  6   1864129382651  ---  Logical Sectors Read
   169  0x01  0x030  6      2769562471  ---  Number of Read Commands
   170  0x01  0x038  6     55037424100  ---  Date and Time TimeStamp
   171  0x03  =====  =               =  ===  == Rotating Media Statistics (rev 1) ==
   172  0x03  0x008  4           14736  ---  Spindle Motor Power-on Hours
   173  0x03  0x010  4           14736  ---  Head Flying Hours
   174  0x03  0x018  4           10606  ---  Head Load Events
   175  0x03  0x020  4               0  ---  Number of Reallocated Logical Sectors
   176  0x03  0x028  4         6259112  ---  Read Recovery Attempts
   177  0x03  0x030  4               1  ---  Number of Mechanical Start Failures
   178  0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
   179  0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
   180  0x04  0x010  4               0  ---  Resets Between Cmd Acceptance and Completion
   181  0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
   182  0x05  0x008  1              41  ---  Current Temperature
   183  0x05  0x010  1              41  N--  Average Short Term Temperature
   184  0x05  0x018  1              41  N--  Average Long Term Temperature
   185  0x05  0x020  1              59  ---  Highest Temperature
   186  0x05  0x028  1              22  ---  Lowest Temperature
   187  0x05  0x030  1              57  N--  Highest Average Short Term Temperature
   188  0x05  0x038  1              25  N--  Lowest Average Short Term Temperature
   189  0x05  0x040  1              44  N--  Highest Average Long Term Temperature
   190  0x05  0x048  1              25  N--  Lowest Average Long Term Temperature
   191  0x05  0x050  4               0  ---  Time in Over-Temperature
   192  0x05  0x058  1              60  ---  Specified Maximum Operating Temperature
   193  0x05  0x060  4               0  ---  Time in Under-Temperature
   194  0x05  0x068  1               0  ---  Specified Minimum Operating Temperature
   195  0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
   196  0x06  0x008  4              49  ---  Number of Hardware Resets
   197  0x06  0x010  4              31  ---  Number of ASR Events
   198  0x06  0x018  4               0  ---  Number of Interface CRC Errors
   199  0xff  =====  =               =  ===  == Vendor Specific Statistics (rev 1) ==
   200                                  |||_ C monitored condition met
   201                                  ||__ D supports DSN
   202                                  |___ N normalized value
   203
   204  SATA Phy Event Counters (GP Log 0x11)
   205  ID      Size     Value  Description
   206  0x0001  2            0  Command failed due to ICRC error
   207  0x0002  2            0  R_ERR response for data FIS
   208  0x0003  2            0  R_ERR response for device-to-host data FIS
   209  0x0004  2            0  R_ERR response for host-to-device data FIS
   210  0x0005  2            0  R_ERR response for non-data FIS
   211  0x0006  2            0  R_ERR response for device-to-host non-data FIS
   212  0x0007  2            0  R_ERR response for host-to-device non-data FIS
   213  0x0008  2            0  Device-to-host non-data FIS retries
   214  0x0009  2           49  Transition from drive PhyRdy to drive PhyNRdy
   215  0x000a  2           50  Device-to-host register FISes sent due to a COMRESET
   216  0x000b  2            0  CRC errors within host-to-device FIS
   217  0x000d  2            0  Non-CRC errors within host-to-device FIS
   218


# smartctl -l devstat /dev/sda |cat -n
     1  smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.1.3.el7.x86_64] (local build)
     2  Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
     3
     4  Device Statistics (GP Log 0x04)
     5  Page  Offset Size        Value Flags Description
     6  0x01  =====  =               =  ===  == General Statistics (rev 1) ==
     7  0x01  0x008  4               4  ---  Lifetime Power-On Resets
     8  0x01  0x018  6     33692987224  ---  Logical Sectors Written
     9  0x01  0x020  6        82002349  ---  Number of Write Commands
    10  0x01  0x028  6   1864129382651  ---  Logical Sectors Read
    11  0x01  0x030  6      2769562471  ---  Number of Read Commands
    12  0x01  0x038  6     55037698750  ---  Date and Time TimeStamp
    13  0x03  =====  =               =  ===  == Rotating Media Statistics (rev 1) ==
    14  0x03  0x008  4           14736  ---  Spindle Motor Power-on Hours
    15  0x03  0x010  4           14736  ---  Head Flying Hours
    16  0x03  0x018  4           10606  ---  Head Load Events
    17  0x03  0x020  4               0  ---  Number of Reallocated Logical Sectors
    18  0x03  0x028  4         6259112  ---  Read Recovery Attempts
    19  0x03  0x030  4               1  ---  Number of Mechanical Start Failures
    20  0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
    21  0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
    22  0x04  0x010  4               0  ---  Resets Between Cmd Acceptance and Completion
    23  0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
    24  0x05  0x008  1              41  ---  Current Temperature
    25  0x05  0x010  1              41  N--  Average Short Term Temperature
    26  0x05  0x018  1              41  N--  Average Long Term Temperature
    27  0x05  0x020  1              59  ---  Highest Temperature
    28  0x05  0x028  1              22  ---  Lowest Temperature
    29  0x05  0x030  1              57  N--  Highest Average Short Term Temperature
    30  0x05  0x038  1              25  N--  Lowest Average Short Term Temperature
    31  0x05  0x040  1              44  N--  Highest Average Long Term Temperature
    32  0x05  0x048  1              25  N--  Lowest Average Long Term Temperature
    33  0x05  0x050  4               0  ---  Time in Over-Temperature
    34  0x05  0x058  1              60  ---  Specified Maximum Operating Temperature
    35  0x05  0x060  4               0  ---  Time in Under-Temperature
    36  0x05  0x068  1               0  ---  Specified Minimum Operating Temperature
    37  0x06  =====  =               =  ===  == Transport Statistics (rev 1) ==
    38  0x06  0x008  4              49  ---  Number of Hardware Resets
    39  0x06  0x010  4              31  ---  Number of ASR Events
    40  0x06  0x018  4               0  ---  Number of Interface CRC Errors
    41  0xff  =====  =               =  ===  == Vendor Specific Statistics (rev 1) ==
    42                                  |||_ C monitored condition met
    43                                  ||__ D supports DSN
    44                                  |___ N normalized value

Comment 17 errata-xmlrpc 2019-08-06 12:58:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2148


Note You need to log in before you can comment on or make changes to this bug.