HomeFreeBSD

w: Fix idle time in json output, add login/idle times to json output

Description

w: Fix idle time in json output, add login/idle times to json output

Currently the idle time will show as true part of the time in the json
output and quoting depends on what is being printed. Make sure it's
always printed correctly and for consistency treated as a string in the
json output.

Login time delta and since times are currently exposed in the xml
output, expose these times in the json output as well.

In the json and xml outputs expose the number of seconds idle as a new
field or attribute respectively.

MFC after: 1 week
Sponsored by: Modirum MDPay
Event: Oslo Hackathon 202508
Differential Revision: https://reviews.freebsd.org/D52237

(cherry picked from commit 6e6febb54da91bf5e13007c3d8f4a54495273969)

Details

Provenance
marius.h_lden.orgAuthored on Aug 29 2025, 2:36 PM
desCommitted on Sep 16 2025, 1:03 PM
Differential Revision
D52237: w: Fix idle time in json output, add login/idle times to json output
Parents
rG8c40728a46d4: kern/kern_event.c: properly spell COMPAT_FREEBSD32
Branches
Unknown
Tags
Unknown