Bug #39290
openNautilus predictor does not work in Ubuntu 18.04 LTS - smartctl doesn't support JSON output
0%
Description
$ smartctl -f json --all /dev/sda smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.18.0-11-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org =======> INVALID ARGUMENT TO -f: json =======> VALID ARGUMENTS ARE: old, brief, hex[,id|val] <======= Use smartctl -h to get a usage summary
$ ceph device get-health-metrics OCZ-VERTEX460A_A22MQ061448000731 {
"20190414-174435": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "ocz-vertex460a",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sda",
"error": "smartctl returned invalid JSON"
},
"20190414-174440": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "ocz-vertex460a",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sda",
"error": "smartctl returned invalid JSON"
}
}
Updated by Марк Коренберг about 5 years ago
Exactly the same in Centos 7
smartctl -f json --all /dev/sda smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.5.1.el7.x86_64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org =======> INVALID ARGUMENT TO -f: json =======> VALID ARGUMENTS ARE: old, brief, hex[,id|val] <======= Use smartctl -h to get a usage summary
Updated by Марк Коренберг about 5 years ago
Bots Centos 7 and Ubuntu 18.04 does not support command:
smartctl -a --json /dev/
Centos 7:
smartctl -a --json /dev/sda smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.5.1.el7.x86_64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org =======> UNRECOGNIZED OPTION: json Use smartctl -h to get a usage summary
Ubuntu 18.04:
$ smartctl -a --json /dev/sda smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-47-generic] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org =======> UNRECOGNIZED OPTION: json Use smartctl -h to get a usage summary
Updated by Patrick Donnelly about 5 years ago
- Project changed from Ceph to mgr
- Start date deleted (
04/14/2019)
Updated by Rick Chen about 5 years ago
The smartmontools require last version 6.7 that support json output.
Updated by Марк Коренберг about 5 years ago
Rick Chen, Yes, I know. But for Centos 7 we have: http://mirror.centos.org/centos-7/7/storage/x86_64/ceph-nautilus/smartmontools-7.0-3.el7.x86_64.rpm
And do not have something for Ubuntu. It's not fair.
Updated by Brad Hubbard about 5 years ago
- Has duplicate Bug #39365: Disk predictor uses too new smartmontools feature (json output) added
Updated by Martin H. almost 5 years ago
Well, as far as I can see, there is no version 6.7 (and never was) of smartmontools. @Rick Chen You probably mean 7.0? I had to compile and install that version manually in to get it working on Ubuntu (16.04 in my case).
Updated by Horace Ng over 4 years ago
same invalid json error with smartmontools 7.0
"20200102-035713": {
"nvme_smart_health_information_add_log_error_code": -22,
"nvme_vendor": "hgst_hdn724030ale640",
"nvme_smart_health_information_add_log_error": "nvme returned an error: sudo: exit status: 1",
"dev": "/dev/sdg",
"error": "smartctl returned invalid JSON"
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-3.10.0-957.12.1.el7.x86_64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org