pub struct SupervisorEntry {Show 18 fields
pub module_id: String,
pub state: String,
pub enabled: bool,
pub live: bool,
pub protocol: ModuleProtocol,
pub health: SupervisorHealthStatus,
pub last_probe_ms: Option<u64>,
pub last_exit_code: Option<i32>,
pub last_exit_signal: Option<i32>,
pub last_exit_ms: Option<u64>,
pub last_exit_kind: Option<TerminalExitKind>,
pub restart_count: Option<u32>,
pub max_restarts: Option<u32>,
pub lifetime_restarts: Option<u32>,
pub restart_window_secs: Option<u64>,
pub drain_timeout_ms: Option<u64>,
pub restart_backoff_ms: Option<u64>,
pub restart_max_backoff_ms: Option<u64>,
}Fields§
§module_id: String§state: String§enabled: bool§live: boolWhether this module is serving.
For a Subc module: enabled, running, process alive, AND registered.
For a None module the registration term is dropped, because a module
that speaks no subc wire never registers and the daemon cannot assert
more than “the process it launched is alive”. READ IT WITH protocol:
live: true means something weaker for a None module, and a renderer
that prints it as a bare boolean for one is claiming more than the daemon
knows.
protocol: ModuleProtocolThe module’s declared wire protocol. Absent on daemons predating the field, where every module was a subc module, so the default is exactly what those daemons meant.
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.
last_exit_ms: Option<u64>Unix milliseconds when the most recent child exit was observed. Present even when the terminal ring is not queried, so existing list readers can order their latest observed exit against events they already received.
last_exit_kind: Option<TerminalExitKind>Classification of the most recent child exit. Absent on daemons that predate exit-kind reporting.
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.
lifetime_restarts: Option<u32>Replacement processes spawned over this module’s entire supervisor lifetime.
Unlike restart_count, this value is never reset by an operator action.
restart_window_secs: Option<u64>The span restart_count is counted over, in seconds. The crash budget is
a RATE, not a lifetime total: restart_count counts only the restarts
inside the last restart_window_secs, and older ones no longer hold a
slot. Without this field a reader cannot tell “2 of 3 crashes, ever” from
“2 of 3 crashes in the last ten minutes”, and those two call for opposite
reactions.
Absent on daemons predating the windowed budget, where the count really was a lifetime total.
drain_timeout_ms: Option<u64>Effective drain budget for this module, in milliseconds. This is the resolved policy the running supervisor uses, not a config-file reread. Absent on older daemons.
restart_backoff_ms: Option<u64>Effective base delay before a crash restart, in milliseconds. Absent on older daemons.
restart_max_backoff_ms: Option<u64>Effective maximum delay before a crash restart, in milliseconds. Absent on older daemons.
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