Skip to content
jc-rs
GitHub

needrestart

--needrestartv1.0.0

Converts `needrestart -b` command output to JSON

Linuxcommand
$ needrestart -b | jc-rs --needrestart

A real pair

From the reference corpus (generic/needrestart--pid.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

needrestart -bgeneric
NEEDRESTART-VER: 3.6
NEEDRESTART-PID: at-spi-bus-laun=2031
NEEDRESTART-PID: at-spi2-registr=2073
NEEDRESTART-PID: dbus-daemon=1754,2037
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
{
  "version": "3.6",
  "pid": [
    "at-spi-bus-laun=2031",
    "at-spi2-registr=2073",
    "dbus-daemon=1754,2037"
  ]
}

Fixture coverage

3/3oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs needrestart -bjc-rs runs the command itself and parses what it prints. Recognised for: `needrestart -b`

Source: crates/jc-rs-parsers/src/system/needrestart.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare