Bug 1301807

Summary: regression issue of command cpu-stats output format
Product: [Community] Virtualization Tools Reporter: Luyao Huang <lhuang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: pkrempa, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-26 08:30:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Luyao Huang 2016-01-26 02:07:24 UTC
Description of problem:
regression issue of command cpu-stats output format

Version-Release number of selected component (if applicable):
v1.3.1-51-g356e28b

How reproducible:
100%

Steps to Reproduce:
1.prepare a running guest:

# virsh list
 Id    Name                           State
----------------------------------------------------
 12    rhel7.0-rhel                   running

2.
# virsh cpu-stats rhel7.0-rhel
CPU0:
	cpu_time         14401.507878990 seconds
	vcpu_time    14378732785511
CPU1:
	cpu_time         17558.281415903 seconds
	vcpu_time    17552658979921
CPU2:
	cpu_time         14952.897388627 seconds
	vcpu_time    14928170262203
CPU3:
	cpu_time         13846.326405979 seconds
	vcpu_time    13841347882842
Total:
	cpu_time         60759.013630088 seconds
	user_time           16.500000000 seconds
	system_time      22772.510000000 seconds



3.

Actual results:
vcpu_time output format is not user friendly

Expected results:
CPU0:
	cpu_time         14401.507878990 seconds
	vcpu_time        14378.732785511 seconds

Additional info:

Should be introduced in 57177f1abdb238811b75fb751dad0aa78aaea1c3

Comment 1 Peter Krempa 2016-01-26 08:30:01 UTC
Fixed upstream:

commit 985f01a65fb84951bccee27ecf09860d3b7961ea
Author: Luyao Huang <lhuang>
Date:   Tue Jan 26 10:25:05 2016 +0800

    virsh: fix cpu-stats command output format issue
    
    After commit 57177f1, the cpu-stats command format change to:
    
    CPU0:
        cpu_time         14401.507878990 seconds
        vcpu_time    14378732785511
    
    vcpu_time is not user friendly. After this patch, it will
    change back:
    CPU0:
        cpu_time         14401.507878990 seconds
        vcpu_time        14378.732785511 seconds
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1301807
    
    Signed-off-by: Luyao Huang <lhuang>

v1.3.1-52-g985f01a