core: introduce a restart counter (#6495)
This adds a per-service restart counter. Each time an automatic restart is scheduled (due to Restart=) it is increased by one. Its current value is exposed over the bus as NRestarts=. It is also logged (in a structured, recognizable way) on each restart. Note that this really only counts automatic starts triggered by Restart= (which it nicely complements). Manual restarts will reset the counter, as will explicit calls to "systemctl reset-failed". It's supposed to be a tool for measure the automatic restart feature, and nothing else. Fixes: #4126
Loading
Please register or sign in to comment