Unverified Commit f4f749a4 by Denis Pynkin Committed by Stéphane Graber

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: 's avatarDenis Pynkin <dans@altlinux.org>
parent a9b74be6
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment