Skip to main content

classify_srv_exit

Function classify_srv_exit 

Source
pub(super) fn classify_srv_exit(
    code: Option<i32>,
    signal: Option<i32>,
    commit_free_mb: u64,
    now: Instant,
    srv_restarts: &mut Vec<Instant>,
    srv_oom_restarts: &mut Vec<Instant>,
) -> SrvExit
Expand description

Classify an srv exit and charge it to the right budget: srv_restarts (at most super::SRV_RESTART_BUDGET in super::SRV_RESTART_WINDOW) for a crash, srv_oom_restarts for one that happened while the computer was out of memory. On Linux a kernel OOM kill arrives as SIGKILL, so the low commit reading decides, as for the window process.