From 1bbc627538f4b345481ef55a7fe65e565f3810c5 Mon Sep 17 00:00:00 2001 From: Denis Pynkin Date: Thu, 30 Mar 2017 18:31:48 +0300 Subject: [PATCH] Increased buffer length in print_stats() Some "/sys" entries exceeds buffer size. This results to some statistics loss ('BlkIO' in particular): wc -c /sys/fs/cgroup/blkio/lxc/alt/blkio.throttle.io_service_bytes 318 /sys/fs/cgroup/blkio/lxc/alt/blkio.throttle.io_service_bytes Signed-off-by: Denis Pynkin --- src/lxc/tools/lxc_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/tools/lxc_info.c b/src/lxc/tools/lxc_info.c index 288853737..c977f299c 100644 --- a/src/lxc/tools/lxc_info.c +++ b/src/lxc/tools/lxc_info.c @@ -204,7 +204,7 @@ static void print_net_stats(struct lxc_container *c) static void print_stats(struct lxc_container *c) { int i, ret; - char buf[256]; + char buf[4096]; ret = c->get_cgroup_item(c, "cpuacct.usage", buf, sizeof(buf)); if (ret > 0 && ret < sizeof(buf)) { -- 2.47.2