Skip to main content

Crate rlmctl_common

Crate rlmctl_common 

Source

Structs§

AppRule
A persistent application limit rule. Instances whose executable basename is in match_exe are placed into a shared app-<name> cgroup with these limits. Limits are stored inline (a snapshot), not as a reference to a profile.
Config
CpuLimit
CPU limit as percentage (0-100 per core, can exceed 100 for multiple cores)
GuardConfig
Configuration for the rlm-guard freeze-guard daemon. Every field defaults, so a missing guard: section (or any missing key) yields a working setup.
GuardSelection
Victim-selection knobs.
GuardTiming
Timing/hysteresis knobs.
GuardTrigger
Pressure thresholds (PSI percentages and a MemAvailable backstop).
IoLimit
I/O bandwidth limit in bytes per second
Limit
Resource limits to apply to a process
MemoryLimit
Memory limit in bytes
Profile

Enums§

Error

Constants§

BUILTIN_PROTECT
Process names always protected from the guard, regardless of config.
DELEGATION_HINT
Instructions to enable cgroup delegation for the calling user, shared by every error and hint that needs to explain the fix.
MIN_IO_BPS
An I/O bandwidth limit below this is rejected: below 64 KiB/s a process cannot make meaningful progress.
MIN_MEMORY_BYTES
A memory limit below this is rejected: a process cannot start, let alone make progress, in less than 8 MiB.

Functions§

build_limit
Build a Limit from optional string values
builtin_presets
Built-in preset profiles
format_bytes
Format bytes as human-readable string
is_protected
A process is protected if its full executable basename is in set, or, when the executable is unreadable, if its comm is. comm is truncated to 15 characters by the kernel, so it only matches short names.
parse_size
Parse a byte size: optional decimal fraction, optional unit K/M/G/T with an optional “B” or “iB” suffix, case-insensitive, all binary multiples. A bare number is bytes.
protect_set
Built-in protect names plus the user’s additions from guard.selection.protect.

Type Aliases§

Result