Skip to content
Advertisement

Is there a way to read the memory counter used by cgroups to kill processes?

I am running a process under a cgroup with an OOM Killer. When it performs a kill, dmesg outputs messages such as the following.

JavaScript

I would like to be able to tell how much memory the cgroups OOM Killer believes the process is using at any given time.

Is there a way to query for this quantity?

Advertisement

Answer

I found the following in the official documentation for cgroup-v1, which shows how to query current memory usage, as well as altering limits:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement