SMART
SMART copied to clipboard
Could you recapture all the data using --json switch for smartctl?
Consider to use --json=o to include original output as JSON array smartctl.output[].
@chrfranke, I feel like we'll have to write a parser for smartctl output... BTW, what is your project/research?
I agree that linuxhw/SMART and the similar project bsdhw/SMART should use JSON output if smartctl >= 7.0 is available. With option --json=o, the traditional output could be easily extracted later (for example with: jq -r '.smartctl.output[]' ).
BTW, my project is smartmontools itself :-)
Do we need traditional output? Can't it be recreated from JSON, if needed?
JSON output does still not include all info from traditional output. ATA/SATA is fairly complete (see ticket 767), but SCSI/SAS and NVMe are not. Try --json=u to see affected lines as strings named smartctl_NNNN_u.
No, there is no easy way to recreate traditional output from JSON output.
Recapturing of existing probes is not possible because people usually don't create more than one probe of the computer.
We can capture this json output in addition to default one in the next version of the hw-probe utility.
Is it not possible to generate such json output from default plain format by a script?
Is it not possible to generate such json output from default plain format by a script?
Should be possible, but it is damn a lot of work - to create a convertor for a plain-text format and then debug and test it.
As I just posted in the hw-probe repo (https://github.com/linuxhw/hw-probe/issues/156) ... Not having the parsed data makes things much more difficult. It's clear that something is parsing the data and generating the Markdown files... But those scripts/programs don't appear to be available?
It would also be useful to understand the methodology/code being used to generate some of the Markdown tables... (Not that I see any particular issues with the methodology ... but not having the code that generates the reports makes independent/peer review next to impossible.)