]> granicus.if.org Git - sysstat/commitdiff
mpstat: Fix alignment output for mpstat -I {CPU,SCPU}
authorSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 13 Jul 2015 13:46:15 +0000 (15:46 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 13 Jul 2015 13:55:34 +0000 (15:55 +0200)
Commit 8ac5760 didn't cover all the cases properly (interrupts whose
name has between 11 and 13 characters).

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
mpstat.c

index ae30f39c356836f637a4ce1074a7b51e20749753..9284992530fa9df587061d661daf0b50806e6db6 100644 (file)
--- a/mpstat.c
+++ b/mpstat.c
@@ -261,10 +261,10 @@ void write_irqcpu_stats(struct stats_irqcpu *st_ic[], int ic_nr, int dis,
                        /* Width is IRQ name + 2 for the trailing "/s" */
                        colwidth[j] = strlen(p0->irq_name) + 2;
                        /*
-                        * Normal space for printing a number is 14 chars
-                        * (space + 10 digits + period + mantissa).
+                        * Normal space for printing a number is 11 chars
+                        * (space + 10 digits including the period).
                         */
-                       if (colwidth[j] < 14) {
+                       if (colwidth[j] < 10) {
                                colwidth[j] = 10;
                        }
                }