Opened 2 years ago

Last modified 2 years ago

#1606 new enhancement

Selftest Log does not print when JSON format requested — at Initial Version

Reported by: Marc Owned by:
Priority: minor Milestone: unscheduled
Component: smartctl Version:
Keywords: json scsi Cc:

Description

Running the command 'smartctl -jl selftest /dev/sdX' works as expected when the device is ATA/SATA but does not output the selftest log data in the JSON when the device is SCSI/SAS.

* Demonstration of Problem *
root@freenas:~ # smartctl -jl selftest /dev/da12
{

"json_format_version": [

1,
0

],
"smartctl": {

"version": [

7,
2

],
"svn_revision": "5155",
"platform_info": "FreeBSD 12.2-RELEASE-p14 amd64",
"build_info": "(local build)",
"argv": [

"smartctl",
"-jl",
"selftest",
"/dev/da12"

],
"exit_status": 0

},
"device": {

"name": "/dev/da12",
"info_name": "/dev/da12",
"type": "scsi",
"protocol": "SCSI"

}

}

root@freenas:~ # smartctl -l selftest /dev/da12
smartctl 7.2 2020-12-30 r5155 [FreeBSD 12.2-RELEASE-p14 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

START OF READ SMART DATA SECTION

SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]

Description number (hours)

# 1 Background short Completed - 6811 - [- - -]
# 2 Background short Completed - 6644 - [- - -]
# 3 Background short Completed - 6476 - [- - -]
# 4 Background short Completed - 6308 - [- - -]
# 5 Background short Completed - 6068 - [- - -]
# 6 Background short Completed - 5900 - [- - -]
# 7 Background short Completed - 5733 - [- - -]
# 8 Background short Completed - 5565 - [- - -]
# 9 Background short Completed - 5397 - [- - -]
#10 Background short Completed - 5229 - [- - -]
#11 Background short Completed - 5061 - [- - -]
#12 Background short Completed - 4893 - [- - -]
#13 Background short Completed - 4669 - [- - -]
#14 Background short Completed - 4501 - [- - -]
#15 Background short Completed - 4333 - [- - -]
#16 Background short Completed - 4165 - [- - -]
#17 Background short Completed - 3925 - [- - -]
#18 Background short Completed - 3757 - [- - -]
#19 Background short Completed - 3589 - [- - -]
#20 Background short Completed - 3421 - [- - -]

Long (extended) Self-test duration: 6 seconds [0.1 minutes]

* Expected Behavior (captured from a SATA drive in the same machine) *
root@freenas:~ # smartctl -jl selftest /dev/ada0
{

"json_format_version": [

1,
0

],
"smartctl": {

"version": [

7,
2

],
"svn_revision": "5155",
"platform_info": "FreeBSD 12.2-RELEASE-p14 amd64",
"build_info": "(local build)",
"argv": [

"smartctl",
"-jl",
"selftest",
"/dev/ada0"

],
"exit_status": 0

},
"device": {

"name": "/dev/ada0",
"info_name": "/dev/ada0",
"type": "atacam",
"protocol": "ATA"

},
"ata_smart_self_test_log": {

"standard": {

"revision": 1,
"table": [

{

"type": {

"value": 3,
"string": "Conveyance offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50987

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50908

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50813

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50742

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50574

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50479

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50407

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50169

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50073

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 50001

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49835

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49740

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49668

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49501

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49405

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49334

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49167

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 49071

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 48999

},
{

"type": {

"value": 1,
"string": "Short offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 48776

},
{

"type": {

"value": 2,
"string": "Extended offline"

},
"status": {

"value": 0,
"string": "Completed without error",
"passed": true

},
"lifetime_hours": 48681

}

],
"count": 21,
"error_count_total": 0,
"error_count_outdated": 0

}

}

}

Change History (0)

Note: See TracTickets for help on using tickets.