Expand description
Records this process’s memory use, so operators can see a node approaching its memory limit before the kernel stops it.
Structs§
- Cgroup
Mount 🔒 - A mounted cgroup hierarchy.
Constants§
- SAMPLE_
INTERVAL 🔒 - How often
record_process_memorysamples memory use.
Functions§
- available_
memory 🔒 - Returns the memory this process can use: the smaller of the machine’s memory and the cgroup limit, ignoring values that are unknown or zero.
- cgroup_
limit 🔒 - Returns a cgroup memory limit in bytes, or
Noneif the cgroup has no limit. - cgroup_
mounts 🔒 - Returns the cgroup v2 mounts and the cgroup v1
memorymounts listed in/proc/self/mountinfothat no other mount hides. - kib_
field 🔒 - Returns the value in bytes of a
name <value> kBline, as in/proc/self/statusand/proc/meminfo. - limit_
files 🔒 - Returns the paths of
file_namein the cgroup atmembershipand in each of its ancestors, through every mount that shows them. - read 🔒
- record 🔒
- Sets the
process.memory.rss_bytesgauge to the resident set size of this process, andprocess.memory.rss_fractionto that size as a fraction of the memory it can use: the cgroup memory limit, or the machine’s memory if no cgroup sets a lower limit. - record_
process_ memory - Records this process’s memory use every
SAMPLE_INTERVAL, until the task is aborted. - tightest_
cgroup_ 🔒limit - Returns the tightest memory limit on this process’s cgroups, given the contents of
/proc/self/cgroupand/proc/self/mountinfo. - unescape_
mountinfo 🔒 - Decodes the octal escapes (such as
\040for a space) that/proc/self/mountinfouses in paths.