Opened 2 days ago

Last modified 35 hours ago

#1914 new defect

Inconsistency between human-readable and json output for SMART Support — at Version 1

Reported by: Yurii Kondrakov Owned by:
Priority: minor Milestone: undecided
Component: smartctl Version: 7.4
Keywords: json Cc: Yurii Kondrakov

Description (last modified by Yurii Kondrakov)

Querying the info for a physical device using:

$ smartctl --info /dev/bus/0 -d megaraid,7
# OR
$ smartctl --info /dev/bus/0 -d megaraid,7 --json

yields different results - specifically, the JSON output lacks the following object:

  "smart_support": {
    "available": true,
    "enabled": true
  }

even though the human-readable output reports the support is available:

$ smartctl --info /dev/bus/0 -d megaraid,7

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-130-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Samsung based SSDs
Device Model:     SAMSUNG MZ7KM960HAHP-000FU
Serial Number:    S2TLNX0H700401
LU WWN Device Id: 5 002538 c40374a84
Firmware Version: CSLB
User Capacity:    960,197,124,096 bytes [960 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4c
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Dec 20 03:00:18 2024 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Might be due to the following error produced by using --log=error flag:

"local_time": {
    "time_t": 1734663658,
    "asctime": "Fri Dec 20 03:00:58 2024 UTC"
  },
  "ata_smart_error_log": {
    "summary": {
      "revision": 1,
      "count": 0
    }
  }

Additionally, there is an inconsistency the other way around:

$ sudo smartctl /dev/nvme0 --info

smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.11.0-12-generic] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
... [no SMART availability lines]


$ sudo smartctl /dev/nvme0 --info -j
{
  ...
  "smart_support": {
    "available": true,
    "enabled": true
  }
}

Change History (1)

comment:1 by Yurii Kondrakov, 2 days ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.