Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch mode documentation unclear #230

Open
anarcat opened this issue Jan 25, 2022 · 0 comments
Open

batch mode documentation unclear #230

anarcat opened this issue Jan 25, 2022 · 0 comments

Comments

@anarcat
Copy link
Contributor

anarcat commented Jan 25, 2022

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.

anarcat added a commit to anarcat/needrestart that referenced this issue Jan 26, 2022
The user sessions present in the normal and nagios output is
mysteriously missing from the batch output. This remedies that
limitation by reusing the user-readable output from the Nagios output.

We also update the README.batch documentation, but that's still
lacking a little, see liske#230.

Closes: liske#231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants