needrestart
needrestart copied to clipboard
batch mode documentation unclear
https://github.com/liske/needrestart/blob/master/README.batch.md is presumably designed to document how consumers are supposed to parse the --batch
output. yet it's surprisingly terse. it does document the NEEDRESTART-KSTA
and shows an example output with the following fields:
NEEDRESTART-VER: 2.1
NEEDRESTART-KCUR: 3.19.3-tl1+
NEEDRESTART-KEXP: 3.19.3-tl1+
NEEDRESTART-KSTA: 1
NEEDRESTART-SVC: systemd-journald.service
NEEDRESTART-SVC: systemd-machined.service
NEEDRESTART-CONT: LXC web1
yet it doesn't explain any of those.
it obliquely refers to the apt-dater protocol but that is a directory listing on github. presumably one should load one of the ADP-X
files there. the ADP-0.8 protocol, unfortunately, points us back to needrestart, this way:
There should be NEEDRESTART line indicating the presence and the
version of the needrestart(1) script:
NEEDRESTART-VER: ${Version}
needrestart(1) is called in batch mode printing informations about
services requiring restarts and outdated running kernels. The
definition of the lines prefixed with 'NEEDRESTART-' are defined by
the needrestart package. The following lines are currently known:
NEEDRESTART-KCUR: ${running kernel version}
NEEDRESTART-KEXP: ${expected kernel version}
NEEDRESTART-KSTA: ${kernel status}
NEEDRESTART-SVC: ${service}
which, again, doesn't tell us much.
could you expand on this? what to the following lines mean:
NEEDRESTART-SVC: ${service}
NEEDRESTART-CONT: LXC web1
here I also have lines like this:
NEEDRESTART-PID: syncthing-gtk=127479
... when running as a user, and this:
NEEDRESTART-UCSTA: 1
NEEDRESTART-UCCUR: 0x00ea
NEEDRESTART-UCEXP: 0x00ea
... when running as root.
If I would venture a guess, I'd say that NEEDRESTART-UCSTA: 1
means the same as the KSTA but for microcode updates? and in this case it would mean "no update"?
please advise.