Opened 11 months ago

Last modified 11 months ago

#1807 new enhancement

Smartctl - Identify (--identify) to JSON

Reported by: Nick Owned by:
Priority: minor Milestone: unscheduled
Component: smartctl Version: 7.4
Keywords: json ata Cc: Nick

Description

Hello,

I have been using Smartctl for as long as I can remember, but only recently discovered its '--identify' command and its benefits.

I tend to take my output as JSON with the '--json=ov' flags, however, when outputting the '--identify' command with the json flag set, the output is not rendered.

I can imagine it could be difficult to parse the data from the full identify command as json given the variety etc, is this sort of output in the roadmap for support in the future? I would be happy to look at some code and see if we could get something going with regards to this as a feature enhancement :D

Thoughts appreciated.

Kind Regards,

Nick

Change History (2)

comment:1 by Christian Franke, 11 months ago

Keywords: ata added; identify enhancement feature output removed
Milestone: Release 7.5unscheduled
Priority: trivialminor

If possible, please describe your use case.

PS: Please don't set a milestone in future submissions.

comment:2 by Nick, 11 months ago

Hi Christian,

Thank you for your response.

So I tend to use a combination of a variety of commands to ascertain various information from a device, however, smartmontools doesn't describe certain functionality outside of the --identify command.

For example, "Sanitize Support" etc, are very valuable to our business requirements from a data sanitization perspective. Other outputs from the command are useful, such as HPA, DCO and AMAC support etc.

See example of an identify command below.

  57-58   -     .        Current capacity in sectors (DWord) [OBS-6]
  57-58   .     0xfc10:00fb  (16514064)

  59      -     0x0101   Sanitize Device - READ/WRITE MULTIPLE support
  59     15          0   BLOCK ERASE EXT supported
  59     14          0   OVERWRITE EXT supported
  59     13          0   CRYPTO SCRAMBLE EXT supported
  59     12          0   Sanitize Device feature set supported
  59     11          0   Cmds during sanitize are as specified by ACS-3
  59     10          0   SANITIZE ANTIFREEZE LOCK EXT supported
  59      9          0   Reserved
  59      8          1   Bits 7:0 are valid [OBS-ACS-4]
  59      7:0     0x01   Current number of sectors per DRQ [OBS-ACS-4]

These values would be great to extract as JSON for our automation system.

Of course, that isn't all we would use from the identify command, in honesty, the information provided by said command, is excellent! Whilst the general output of smartctl is very clear, there are some items missing which could be beneficial to a variety of use cases.

The identify json would be such a benefit to lower-level users - who require some of the information not provided in the main output from the -x command for example.

I currently use smartctl, coupled with various other tools to capture information you already do. I hope this makes sense.

My most sincere apologies on the milestone setting - I wasn't sure if it needed doing or not! I'll bare that in mind in future :D

Thanks,

Nick

Note: See TracTickets for help on using tickets.