NETWAYS / check_smartvalues

Check SMART values on hard disks and SSDs
GNU General Public License v2.0
5 stars 8 forks source link

Parsing of smartctl 6.2.8 output #1

Closed akqopensystems closed 1 year ago

akqopensystems commented 6 years ago

OS

RHEL 7.4 x86_64 on Dell PowerEdge R730 with RAID-Adapter PERC H730P Mini (LSI rebranded), Perl 5.16.3 (from Distribution)

Installed smartmontools

smartmontools-6.2-8.el7.x86_64

Expected behaviour

./check_smartvalues -db check_smartvalues.db.json -c check_smartvalues.cfg.json -r --device="'megaraid,0' /dev/sdb" -vvv parses the output of smartctl correctly and returns state of drive.

Experienced behaviour

./check_smartvalues -db check_smartvalues.db.json -c check_smartvalues.cfg.json -r --device="'megaraid,0' /dev/sdb" -vvv

EXECUTE: /usr/sbin/smartctl -a -d 'megaraid,0' /dev/sdb
UNKNOWN: [ 0 OK ] - [ 0 WARNING ] - [ 0 CRITICAL ] - [ 0 UNKNOWN ] in 0.073s ( longoutput for details )|

Details

The output of smartctl -a -d 'megaraid,0' /dev/sdb is as expected:

/usr/sbin/smartctl -a -d 'megaraid,0' /dev/sdb
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-693.17.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               SAMSUNG
Product:              MZILS400HEGR0D3
Revision:             DWL7
User Capacity:        400,088,457,216 bytes [400 GB]
Logical block size:   512 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x5002538a4763ba00
Serial number:        S3FWNX0J601773
Device type:          disk
Transport protocol:   SAS
Local Time is:        Mon Mar 12 10:26:36 2018 CET
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

SS Media used endurance indicator: 0%
Current Drive Temperature:     35 C
Drive Trip Temperature:        70 C

Manufactured in week 22 of year 2017
Accumulated start-stop cycles:  33
Specified load-unload count over device lifetime:  0
Accumulated load-unload cycles:  0
Elements in grown defect list: 0

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               ECC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:          0        0         0         0          0        773.978           0
write:         0        0         0         0          0      44455.424           0
verify:        0        0         0         0          0          0.078           0

Non-medium error count:        6

SMART Self-test log
Num  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]
     Description                              number   (hours)
# 1  Background short  Completed                  96       4                 - [-   -    -]
# 2  Background long   Completed                  96       2                 - [-   -    -]
Long (extended) Self Test duration: 3600 seconds [60.0 minutes]

The disk has been added to the database and the configuration file:

diff NETWAYS-check_smartvalues/check_smartvalues.cfg.json NETWAYS-check_smartvalues-9c762e9/check_smartvalues.cfg.json 
64c64
<             "Device" : ["SAMSUNG MZ7LM240HCGR-00003", "SAMSUNG MZ7GE480HMHP-00003", "SAMSUNG MZ7GE240HMGR-00003", "SAMSUNG MZILS400HEGR0D3"],
---
>             "Device" : ["SAMSUNG MZ7LM240HCGR-00003", "SAMSUNG MZ7GE480HMHP-00003", "SAMSUNG MZ7GE240HMGR"],
diff NETWAYS-check_smartvalues/check_smartvalues.db.json NETWAYS-check_smartvalues-9c762e9/check_smartvalues.db.json 
243c243
<                       "Device" : ["SAMSUNG MZ7LM240HCGR-00003", "SAMSUNG MZ7GE480HMHP-00003", "SAMSUNG MZ7GE240HMGR-00003", "SAMSUNG MZILS400HEGR0D3-00003"],
---
>                       "Device" : ["SAMSUNG MZ7LM240HCGR-00003", "SAMSUNG MZ7GE480HMHP-00003", "SAMSUNG MZ7GE240HMGR-00003"],

With a simple

print "@out";

in Line 1024 of the check script I can confirm that the output of the smartctl command is returned to the check script, so the internal parsing of the output fails. If needed, I can provide more configuration data.

martialblog commented 1 year ago

Hi, this repository will no longer be maintained and be archived soon.

We recommend these as replacement: