Bug 682155

Summary: "virt-top --csv" fails to create list header for all running guest domains
Product: Red Hat Enterprise Linux 6 Reporter: Humble Chirammal <hchiramm>
Component: virt-topAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-04 10:34:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Humble Chirammal 2011-03-04 10:27:58 UTC
Description of Problem:

"virt-top --csv" prints list header for a host's data and the first guest domain
but doesn't do that for each data of the second guest domain or later. Due to
that behavior, it is hard to understand what each value is in the case of
running more than two guest domains. We believe that the behavior is due to
virt-top's bug that it doesn't consider how many guest domains are running.

Would like to have fix  for virt-top so that it prints list header for each data of
*all* guest domain correctly?

Version-Release number of selected component:

Red Hat Enterprise Linux Version Number: 6.0
Release Number: GA
Architecture: x86
Kernel Version: kernel-2.6.32-71.el6.i686
Related Package Version: virt-top-1.0.4-3.1.el6.i686
Related Middleware / Application: N/A

Drivers or hardware or architecture dependency:
None.

How reproducible:
Always

Step to Reproduce:
1. Run two or more guest domains.

2. Run the following command.
# virt-top --script -n 2 -d 5 --csv virt-top.csv

3. Look into a csv file created by the step 2.

--snip-- from the test 

Ex: with 1 guest::

Hostname,Time,Arch,Physical CPUs,Count,Running,Blocked,Paused,Shutdown,Shutoff,Crashed,Active,Inactive,%CPU,Total hardware memory (KB),Total memory (KB),Total guest memory (KB),Total CPU time (ns),Domain ID,Domain name,CPU (ns),%CPU,Block RDRQ,Block WRRQ,Net RXBY,Net TXBY
dhcp210-84.gsslab.pnq.redhat.com,17:07:21,x86_64,2,2,1,0,0,0,0,0,1,1,0.0,3337856,524288,524288,0,1,rhel5,0.,0.,,,,
dhcp210-84.gsslab.pnq.redhat.com,17:07:26,x86_64,2,2,1,0,0,0,0,0,1,1,1.0,3337856,524288,524288,100000000,1,rhel5,100000000.,0.995984388922,0,0,900,0
[root@dhcp210-84 ~]# 



Ex with 2 guests running::

[root@dhcp210-84 ~]# virsh list
 Id Name                 State
----------------------------------
  1 rhel5                running
  2 rhel6                running

[root@dhcp210-84 ~]# 

---------------

Hostname,Time,Arch,Physical CPUs,Count,Running,Blocked,Paused,Shutdown,Shutoff,Crashed,Active,Inactive,%CPU,Total hardware memory (KB),Total memory (KB),Total guest memory (KB),Total CPU time (ns),Domain ID,Domain name,CPU (ns),%CPU,Block RDRQ,Block WRRQ,Net RXBY,Net TXBY
dhcp210-84.gsslab.pnq.redhat.com,17:49:26,x86_64,2,2,2,0,0,0,0,0,2,0,0.0,3337856,1048576,1048576,0,1,rhel5,0.,0.,,,,,2,rhel6,0.,0.,,,,
dhcp210-84.gsslab.pnq.redhat.com,17:49:31,x86_64,2,2,2,0,0,0,0,0,2,0,5.7,3337856,1048576,1048576,570000000,1,rhel5,200000000.,1.99137295688,0,2,1662,0,2,rhel6,370000000.,3.68403997024,0,0,1662,0
[root@dhcp210-84 ~]# 





Actual Results:
"virt-top --csv" doesn't print list header for each data of the second guest
domain or later.

Expected Results:
"virt-top --csv" prints list header for each data of all guest domain.


Additional Info#
The code need to be changed either in virt_top.ml or in  virt_top_csv.ml to satisfy this request.


Hardware configuration:

CPU Info: Intel(R) Xeon(R) CPU X5570 2.93GHz
Memory Info: 74GB
Hardware Component Information: None.
Configuration Info: None.
Guest Configuration Info: None.

Business Impact:

Target Release: 6.2


--Humble

Comment 1 Richard W.M. Jones 2011-03-04 10:34:54 UTC

*** This bug has been marked as a duplicate of bug 665817 ***