[systemd-devel] [PATCH 3/3] Add support for showing limit of memory+Swap usage via cgroup_context_dump
Chen Hanxiao
chenhanxiao at cn.fujitsu.com
Mon Sep 16 23:21:28 PDT 2013
From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
Add support for showing limit of memory+Swap usage
via cgroup_context_dump.
Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
src/core/cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index d8bc318..c6a1690 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -95,6 +95,7 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) {
"%sCPUShares=%lu\n"
"%sBlockIOWeight%lu\n"
"%sMemoryLimit=%" PRIu64 "\n"
+ "%sMemorySWLimit=%" PRIu64 "\n"
"%sMemorySoftLimit=%" PRIu64 "\n"
"%sDevicePolicy=%s\n",
prefix, yes_no(c->cpu_accounting),
@@ -103,6 +104,7 @@ void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) {
prefix, c->cpu_shares,
prefix, c->blockio_weight,
prefix, c->memory_limit,
+ prefix, c->memsw_limit,
prefix, c->memory_soft_limit,
prefix, cgroup_device_policy_to_string(c->device_policy));
--
1.8.2.1
More information about the systemd-devel
mailing list