48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
From 1baf31be9bbfd6fb82629176e595d2d2cef85ef3 Mon Sep 17 00:00:00 2001
|
|
From: Jaromir Capik <jcapik@redhat.com>
|
|
Date: Mon, 20 Jan 2014 19:59:39 +0100
|
|
Subject: [PATCH] vmstat: wide output still not wide enough?
|
|
|
|
8 digits per memory column is apparently still too low
|
|
for systems with 128TB of RAM. Anyway, setting the limit
|
|
to 999TB (12 digits) must be sufficient for now as it
|
|
produces wide gaps on "regular" computers.
|
|
This commit also increases the number of digits per cpu
|
|
columns from 2 to 3 as some of them can hit the 100%
|
|
maximum in corner cases.
|
|
---
|
|
vmstat.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git vmstat.c vmstat.c
|
|
index 67515c1..c01351d 100644
|
|
--- vmstat.c
|
|
+++ vmstat.c
|
|
@@ -187,12 +187,12 @@ static void new_header(void)
|
|
const char header[] =
|
|
"procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----\n";
|
|
const char wide_header[] =
|
|
- "procs ---------------memory-------------- ---swap-- -----io---- -system-- ------cpu-----\n";
|
|
+ "procs -----------------------memory---------------------- ---swap-- -----io---- -system-- --------cpu--------\n";
|
|
|
|
const char format[] =
|
|
"%2s %2s %6s %6s %6s %6s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
|
|
const char wide_format[] =
|
|
- "%2s %2s %8s %8s %8s %8s %4s %4s %5s %5s %4s %4s %2s %2s %2s %2s %2s\n";
|
|
+ "%2s %2s %12s %12s %12s %12s %4s %4s %5s %5s %4s %4s %3s %3s %3s %3s %3s\n";
|
|
|
|
printf(w_option ? _(wide_header) : _(header));
|
|
printf(
|
|
@@ -249,7 +249,7 @@ static void new_format(void)
|
|
const char format[] =
|
|
"%2u %2u %6lu %6lu %6lu %6lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
|
|
const char wide_format[] =
|
|
- "%2u %2u %8lu %8lu %8lu %8lu %4u %4u %5u %5u %4u %4u %2u %2u %2u %2u %2u\n";
|
|
+ "%2u %2u %12lu %12lu %12lu %12lu %4u %4u %5u %5u %4u %4u %3u %3u %3u %3u %3u\n";
|
|
|
|
unsigned int tog = 0; /* toggle switch for cleaner code */
|
|
unsigned int i;
|
|
--
|
|
1.7.9.2
|
|
|