[systemd-devel] MemoryLimit and MemorySoftLimit

Albert Strasheim fullung at gmail.com
Mon Mar 26 07:59:07 PDT 2012


On Mon, Mar 26, 2012 at 4:46 PM, Lennart Poettering
<lennart at poettering.net> wrote:
>> Also, is there some standard way for the app[M#O7lication to determine if a
>> MemoryLimit= is configured? We might want to automatically size some
>> buffers based on this limit.
> You can read /proc/self/cgroup. Find the line with ":memory:" there,
> then extract the path after the second ":". Then use that path under
> /sys/fs/cgroup/memory and read the "memory.soft_limit_in_bytes" file in
> it.

Sweet, thanks very much!

Regards

Albert


More information about the systemd-devel mailing list