diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-08 04:07:47 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-08 22:36:11 +0200 |
commit | 483ab07534ccf91b0b9b2b0489c854b0cd6fa079 (patch) | |
tree | a2bdc2f444c4f69174bc753fef287204c9332bb8 /src/systemctl | |
parent | core: suppress one debugging log (diff) | |
download | systemd-483ab07534ccf91b0b9b2b0489c854b0cd6fa079.tar.xz systemd-483ab07534ccf91b0b9b2b0489c854b0cd6fa079.zip |
systemctl: separate memory usage with comma
Just for readability.
Before:
$ build/systemctl status -n 0 systemd-networkd.service | grep Memory:
Memory: 4.7M (peak: 14.3M swap: 1M swap peak: 1.1M)
After:
$ build/systemctl status -n 0 systemd-networkd.service | grep Memory:
Memory: 4.7M (peak: 14.3M, swap: 1M, swap peak: 1.1M)
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl-show.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 6f3fd76622..335b365be2 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -758,68 +758,68 @@ static void print_status_info( printf(" ("); if (i->memory_min > 0) { printf("%smin: %s", prefix, FORMAT_BYTES_CGROUP_PROTECTION(i->memory_min)); - prefix = " "; + prefix = ", "; } if (i->memory_low > 0) { printf("%slow: %s", prefix, FORMAT_BYTES_CGROUP_PROTECTION(i->memory_low)); - prefix = " "; + prefix = ", "; } if (i->startup_memory_low > 0) { printf("%slow (startup): %s", prefix, FORMAT_BYTES_CGROUP_PROTECTION(i->startup_memory_low)); - prefix = " "; + prefix = ", "; } if (i->memory_high != CGROUP_LIMIT_MAX) { printf("%shigh: %s", prefix, FORMAT_BYTES(i->memory_high)); - prefix = " "; + prefix = ", "; } if (i->startup_memory_high != CGROUP_LIMIT_MAX) { printf("%shigh (startup): %s", prefix, FORMAT_BYTES(i->startup_memory_high)); - prefix = " "; + prefix = ", "; } if (i->memory_max != CGROUP_LIMIT_MAX) { printf("%smax: %s", prefix, FORMAT_BYTES(i->memory_max)); - prefix = " "; + prefix = ", "; } if (i->startup_memory_max != CGROUP_LIMIT_MAX) { printf("%smax (startup): %s", prefix, FORMAT_BYTES(i->startup_memory_max)); - prefix = " "; + prefix = ", "; } if (i->memory_swap_max != CGROUP_LIMIT_MAX) { printf("%sswap max: %s", prefix, FORMAT_BYTES(i->memory_swap_max)); - prefix = " "; + prefix = ", "; } if (i->startup_memory_swap_max != CGROUP_LIMIT_MAX) { printf("%sswap max (startup): %s", prefix, FORMAT_BYTES(i->startup_memory_swap_max)); - prefix = " "; + prefix = ", "; } if (i->memory_zswap_max != CGROUP_LIMIT_MAX) { printf("%szswap max: %s", prefix, FORMAT_BYTES(i->memory_zswap_max)); - prefix = " "; + prefix = ", "; } if (i->startup_memory_zswap_max != CGROUP_LIMIT_MAX) { printf("%szswap max (startup): %s", prefix, FORMAT_BYTES(i->startup_memory_zswap_max)); - prefix = " "; + prefix = ", "; } if (i->memory_limit != CGROUP_LIMIT_MAX) { printf("%slimit: %s", prefix, FORMAT_BYTES(i->memory_limit)); - prefix = " "; + prefix = ", "; } if (show_memory_available) { printf("%savailable: %s", prefix, FORMAT_BYTES(i->memory_available)); - prefix = " "; + prefix = ", "; } if (show_memory_peak) { printf("%speak: %s", prefix, FORMAT_BYTES(i->memory_peak)); - prefix = " "; + prefix = ", "; } if (show_memory_swap_peak) { - printf("%sswap: %s swap peak: %s", prefix, + printf("%sswap: %s, swap peak: %s", prefix, FORMAT_BYTES(i->memory_swap_current), FORMAT_BYTES(i->memory_swap_peak)); - prefix = " "; + prefix = ", "; } if (show_memory_zswap_current) { printf("%szswap: %s", prefix, FORMAT_BYTES(i->memory_zswap_current)); - prefix = " "; + prefix = ", "; } printf(")"); } |