Table of Contents

Class CellResourceEnforcer

Namespace
KernLab.Cell
Assembly
KernLab.Cell.dll

资源翻译(C203——§5.2:执法者是 OS,Cell 只翻译;Linux=cgroup v2,Windows=JobObject)。 执法断言=OS 侧实证(超限被杀/限流——见 CellResourceEnforcer.ReadOomKills)。

public static class CellResourceEnforcer
Inheritance
CellResourceEnforcer
Inherited Members

Methods

Apply(int, CellResourceDeclaration, string?)

应用资源档到进程(当前平台实现)。

public static void Apply(int pid, CellResourceDeclaration limits, string? cgroupRoot = null)

Parameters

pid int
limits CellResourceDeclaration
cgroupRoot string

Cleanup(int, string?)

清组/关执法句柄(测试/回收口)。

public static void Cleanup(int pid, string? cgroupRoot = null)

Parameters

pid int
cgroupRoot string

ReadOomKills(int, string?)

读 cgroup 的 oom_kill 计数(OS 侧执法实证——C203 准出)。

public static long ReadOomKills(int pid, string? cgroupRoot = null)

Parameters

pid int
cgroupRoot string

Returns

long