pub struct SupervisorEntry {
pub module_id: String,
pub state: String,
pub enabled: bool,
pub live: bool,
pub health: SupervisorHealthStatus,
pub last_probe_ms: Option<u64>,
pub last_exit_code: Option<i32>,
pub last_exit_signal: Option<i32>,
pub restart_count: Option<u32>,
pub max_restarts: Option<u32>,
}Fields§
§module_id: String§state: String§enabled: bool§live: bool§health: SupervisorHealthStatus§last_probe_ms: Option<u64>When the daemon last collected this module’s health, as unix
milliseconds. Absent means NEVER PROBED (a module inside its first probe
window, whose health is therefore Unknown rather than good), not
probed-long-ago. An old value and an absent one call for opposite
readings, so do not render them alike.
last_exit_code: Option<i32>Exit code of the module’s most recent process exit, if the process has
exited at least once. Survives respawn so a now-running module still
reports what killed its previous incarnation.
last_exit_signal: Option<i32>Terminating signal of the module’s most recent process exit (Unix), if
any. Some(9) = SIGKILL (OOM/jetsam/kill-on-drop), Some(6) = SIGABRT
(often a panic-abort). Survives respawn.
restart_count: Option<u32>Replacement processes spawned for this module so far, against the budget that disables it.
THIS IS THE COUNTER THAT ENDS A MODULE, and it is not the one beside it.
SupervisorHealthEntry::consecutive_failures returns to zero on any
successful probe, so a module can miss probes all day and read zero; this
one only decreases when an operator restarts, reloads, or re-enables the
module. Reaching the budget moves it to Failed and it stays there until
somebody intervenes.
So a module one restart from being disabled is indistinguishable from a freshly booted one unless this pair is read. Both are reported together because the count alone does not say how close it is.
Absent from daemons predating the field, which is why it is optional rather than defaulted to zero: zero would assert a full budget.
max_restarts: Option<u32>Replacement processes this module is allowed before it is disabled. See
restart_count; absent on daemons predating the field.
Trait Implementations§
Source§impl Clone for SupervisorEntry
impl Clone for SupervisorEntry
Source§fn clone(&self) -> SupervisorEntry
fn clone(&self) -> SupervisorEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more