]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Merge pull request #1569 from anevenchanniy/lxc-top/fix_memsw
authorSerge Hallyn <serge@hallyn.com>
Wed, 17 May 2017 19:01:56 +0000 (14:01 -0500)
committerGitHub <noreply@github.com>
Wed, 17 May 2017 19:01:56 +0000 (14:01 -0500)
[lxc-top] Fix memory+swap output in batch mode

src/lxc/tools/lxc_top.c

index 0a8ec36e68b6cd8b30d725983f94cc831901b52b..a9e69d887597bbbd204cf3c38cd48a4f25d2d0f9 100644 (file)
@@ -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);
        }
 
 }