[lxc-devel] [lxc/master] [lxc-top] Fix memory+swap output in batch mode

anevenchanniy on Github lxc-bot at linuxcontainers.org
Wed May 17 14:54:18 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 485 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170517/a3dcdd79/attachment.bin>
-------------- next part --------------
From 1b67456ce9ebea5a447dd7c198be72a2382bc4d6 Mon Sep 17 00:00:00 2001
From: Nevenchanniy Aleksandr <anevenchannyy at gmail.com>
Date: Wed, 17 May 2017 17:50:03 +0300
Subject: [PATCH] [lxc-top] Fix memory+swap output in batch mode

This is patch fix output of memory+swap in batch mode, that
was forgotten in 6b6e702ac83a2bc92959c0dcae5149762826ef30

Signed-off-by: Alexandr Nevenchanniy <a.nevenchannyy at gmail.com
---
 src/lxc/tools/lxc_top.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/tools/lxc_top.c b/src/lxc/tools/lxc_top.c
index 0a8ec36..a9e69d8 100644
--- a/src/lxc/tools/lxc_top.c
+++ b/src/lxc/tools/lxc_top.c
@@ -429,12 +429,12 @@ static void stats_print(const char *name, const struct stats *stats,
 		gettimeofday(&time_val, NULL);
 		time_ms = (unsigned long long) (time_val.tv_sec) * 1000 + (unsigned long long) (time_val.tv_usec) / 1000;
 		printf("%" PRIu64 ",%s,%" PRIu64 ",%" PRIu64 ",%" PRIu64
-		       ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64,
+		       ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64 ",%" PRIu64,
 		       (uint64_t)time_ms, name, (uint64_t)stats->cpu_use_nanos,
 		       (uint64_t)stats->cpu_use_sys,
 		       (uint64_t)stats->cpu_use_user, (uint64_t)stats->io_service_bytes.total,
 		       (uint64_t)stats->io_serviced.total, (uint64_t)stats->mem_used,
-		       (uint64_t)stats->kmem_used);
+		       (uint64_t)stats->memsw_used, (uint64_t)stats->kmem_used);
 	}
 
 }


More information about the lxc-devel mailing list