#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 7.0 |
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
patched version shown
#smartctl -l devstat /dev/sdd smartctl 6.7 2017-11-06 r4602 [x86_64-linux-4.9.16-gentoo] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org Device Statistics (GP Log 0x04) Page Offset Size Value Flags Description 0x01 ===== = = === == General Statistics (rev 1) == 0x01 0x008 4 6 --- Lifetime Power-On Resets 0x01 0x010 4 913 --- Power-on Hours ....
Actual Behavior
#smartctl -l devstat /dev/sdd smartctl 6.7 2017-11-06 r4602 [x86_64-linux-4.9.16-gentoo] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org Device Statistics (GP/SMART Log 0x04) not supported
fix:
included patch, enable already existing code to parse >8bit values in GetNumLogSectors when reading gplog devstat logs.
Attachments (1)
Change History (6)
by , 7 years ago
Attachment: | devstatgplog.patch added |
---|
comment:1 by , 7 years ago
Milestone: | → Release 6.7 |
---|---|
Owner: | set to |
Status: | new → accepted |
comment:2 by , 7 years ago
Keywords: | devstat removed |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Type: | defect → patch |
Fixed in r4604. Thanks.
follow-up: 4 comment:3 by , 7 years ago
Keywords: | ata added |
---|
Does this device actually support Device Statistics page 255 (Vendor Specific Statistics) ?
If possible, please provide smartctl [-q noserial] -x -l devstat,0 ...
sample output for an affected device.
comment:4 by , 7 years ago
Replying to chrfranke:
Does this device actually support Device Statistics page 255 (Vendor Specific Statistics) ?
If possible, please provide
smartctl [-q noserial] -x -l devstat,0 ...
sample output for an affected device.
smartctl /dev/sdd -l devstat,0 smartctl 6.7 2017-11-06 r4602 [x86_64-linux-4.9.16-gentoo] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org Device Statistics (GP Log 0x04) supported pages Page Description 0x00 List of supported log pages 0x01 General Statistics 0x03 Rotating Media Statistics 0x04 General Errors Statistics 0x05 Temperature Statistics 0x06 Transport Statistics 0xff Vendor Specific Statistics
however theres nothing in said log i can see
smartctl /dev/sdd -l devstat,0xff smartctl 6.7 2017-11-06 r4602 [x86_64-linux-4.9.16-gentoo] (local build) Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org Device Statistics (GP Log 0x04) Page Offset Size Value Flags Description 0xff ===== = = === == Vendor Specific Statistics (rev 1) == |||_ C monitored condition met ||__ D supports DSN |___ N normalized value
patch to ataprint.cpp