[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] tools: format percent strings of nodecpustats



* tools/virsh.c: format strings display for virsh nodecpustats --percent.

* how to reproduce?

% virsh nodecpustats --percent
usage:            2.0%
    user  :       1.0%
    system:       1.0%
idle  :          98.0%
iowait:           0.0%


* after format strings

% virsh nodecpustats --percent
usage :           2.0%
user  :           1.0%
system:           1.0%
idle  :          98.0%
iowait:           0.0%


Signed-off-by: Alex Jia <ajia redhat com>
---
 tools/virsh.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index e46da31..f1166a9 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -4459,11 +4459,11 @@ cmdNodeCpuStats(vshControl *ctl, const vshCmd *cmd)
             usage = (user_time + sys_time) / total_time * 100;
 
             vshPrint(ctl, "%-15s %5.1lf%%\n",
-                     _("usage:"), usage);
+                     _("usage :"), usage);
             vshPrint(ctl, "%-15s %5.1lf%%\n",
-                     _("    user  :"), user_time / total_time * 100);
+                     _("user  :"), user_time / total_time * 100);
             vshPrint(ctl, "%-15s %5.1lf%%\n",
-                     _("    system:"), sys_time  / total_time * 100);
+                     _("system:"), sys_time  / total_time * 100);
             vshPrint(ctl, "%-15s %5.1lf%%\n",
                      _("idle  :"), idle_time     / total_time * 100);
             vshPrint(ctl, "%-15s %5.1lf%%\n",
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]