[PATCH] tools: format percent strings of nodecpustats

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

 



* 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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]