Merge pull request #463 from bostjan/bugfix/lxctop-limit-name-width

lxc-top: limit container name to 18 characters
This commit is contained in:
Stéphane Graber 2015-03-10 12:24:20 -04:00
commit abda570e25

View File

@ -303,7 +303,7 @@ static void stats_print(const char *name, const struct stats *stats,
size_humanize(stats->blkio, blkio_str, sizeof(blkio_str));
size_humanize(stats->mem_used, mem_used_str, sizeof(mem_used_str));
printf("%-18s %8.2f %8.2f %8.2f %10s %10s",
printf("%-18.18s %8.2f %8.2f %8.2f %10s %10s",
name,
(float)stats->cpu_use_nanos / 1000000000,
(float)stats->cpu_use_sys / USER_HZ,