Opened 3 weeks ago

Closed 3 weeks ago

#1436 closed enhancement (fixed)

Always add timestamp to json

Reported by: Michael Schneider Owned by: Christian Franke
Priority: minor Milestone: Release 7.3
Component: smartctl Version:
Keywords: Cc:

Description

json version, smartctl information, messages and exist status is always added to json but the timestamp of the activity isn't there. Having a timestamp available in every json output will simplify the communication with the interface.

The suggested solution is to move the population of the timestamp into jglb from ataprint.cpp, scsiprint.cpp and nvmeprint.cpp into main.

A patch is attached but requires testing.

Attachments (1)

alwaystimestamp.patch (2.4 KB) - added by Michael Schneider 3 weeks ago.
Patch based on #5199

Download all attachments as: .zip

Change History (5)

Changed 3 weeks ago by Michael Schneider

Attachment: alwaystimestamp.patch added

Patch based on #5199

comment:1 in reply to:  description Changed 3 weeks ago by Michael Schneider

Corrected version:
json version, smartctl information, messages and exist status is always added to json but the timestamp of the activity isn't there. Having a timestamp available in every json output will simplify the communication with the interface.

The suggested solution is to move the timestamp from ataprint.cpp, scsiprint.cpp and nvmeprint.cpp into main.

A patch is attached but requires testing.

comment:2 Changed 3 weeks ago by Christian Franke

Milestone: undecidedRelease 7.3

Makes sense, thanks.

comment:3 Changed 3 weeks ago by Christian Franke

Owner: set to Christian Franke
Status: newaccepted

I will use a slightly different approach which makes sure that timestamps in a --json=o output always match.

comment:4 Changed 3 weeks ago by Christian Franke

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.