Commit 3877c7f0 by Serge Hallyn Committed by GitHub

Merge pull request #1569 from anevenchanniy/lxc-top/fix_memsw

[lxc-top] Fix memory+swap output in batch mode
parents cca2cc28 1b67456c
...@@ -429,12 +429,12 @@ static void stats_print(const char *name, const struct stats *stats, ...@@ -429,12 +429,12 @@ static void stats_print(const char *name, const struct stats *stats,
gettimeofday(&time_val, NULL); gettimeofday(&time_val, NULL);
time_ms = (unsigned long long) (time_val.tv_sec) * 1000 + (unsigned long long) (time_val.tv_usec) / 1000; time_ms = (unsigned long long) (time_val.tv_sec) * 1000 + (unsigned long long) (time_val.tv_usec) / 1000;
printf("%" PRIu64 ",%s,%" PRIu64 ",%" PRIu64 ",%" PRIu64 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)time_ms, name, (uint64_t)stats->cpu_use_nanos,
(uint64_t)stats->cpu_use_sys, (uint64_t)stats->cpu_use_sys,
(uint64_t)stats->cpu_use_user, (uint64_t)stats->io_service_bytes.total, (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->io_serviced.total, (uint64_t)stats->mem_used,
(uint64_t)stats->kmem_used); (uint64_t)stats->memsw_used, (uint64_t)stats->kmem_used);
} }
} }
......
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