Bug 817239
| Summary: | dominfo outputs incorrectly for memory unit | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Min Zhan <mzhan> |
| Component: | libvirt | Assignee: | Eric Blake <eblake> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.3 | CC: | acathrow, bili, dallan, dyasny, dyuan, eblake, mzhan, rwu |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.9.13-3.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-21 07:12:32 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
Min Zhan
2012-04-28 08:24:28 UTC
Also for the following memory unit: # virsh nodeinfo CPU model: x86_64 CPU(s): 4 CPU frequency: 2659 MHz CPU socket(s): 1 Core(s) per socket: 4 Thread(s) per core: 1 NUMA cell(s): 1 Memory size: 7994800 kB # virsh nodememstats total : 7994800 kB free : 5690124 kB buffers: 251384 kB cached : 1123096 kB These should be trivial fixes to virsh. I'll propose something upstream soon. Upstream patch proposed https://www.redhat.com/archives/libvir-list/2012-April/msg01535.html Will be fixed for 6.4 when the rebase picks this up:
commit 706aa7c52bcedb9a1346e23ecb244b7291d06c53
Author: Eric Blake <eblake>
Date: Mon Apr 30 14:27:56 2012 -0600
virsh: output scaled values with correct units
The recent push to use correct scaling terms (kB for 1000, KiB for
1024 - such as commit 9dfdead) missed some places in virsh.
* tools/virsh.c (prettyCapacity, cmdDominfo, cmdFreecell)
(cmdNodeinfo, cmdNodeMemStats, cmdMigrateSetMaxSpeed)
(cmdBlockCopy, cmdBlockPull, cmdBlockJob): Use KiB, not kB, when
referring to multiples of 1024.
* tests/virshtest.c: Update expected output to match.
Verified in libvirt-0.9.13-3.el6:
# virsh dumpxml qcow2_foo | grep -I mem
<memory unit='KiB'>1048576</memory>
<memballoon model='virtio'>
</memballoon>
# virsh dominfo qcow2_foo
Id: -
Name: qcow2_foo
UUID: 8ac888e7-7288-bce9-0ef1-ce639d51c095
OS Type: hvm
State: shut off
CPU(s): 4
Max memory: 1048576 KiB
Used memory: 1048576 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
# virsh nodeinfo
CPU model: x86_64
CPU(s): 4
CPU frequency: 2000 MHz
CPU socket(s): 1
Core(s) per socket: 4
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 3791292 KiB
# virsh nodememstats
total : 3791292 KiB
free : 2727060 KiB
buffers: 110820 KiB
cached : 424992 KiB
And can reproduce in libvirt-0.9.10-21.el6:
# virsh dominfo qcow2_foo
Id: -
Name: qcow2_foo
UUID: 8ac888e7-7288-bce9-0ef1-ce639d51c095
OS Type: hvm
State: shut off
CPU(s): 4
Max memory: 1048576 kB
Used memory: 1048576 kB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
# virsh nodeinfo
CPU model: x86_64
CPU(s): 4
CPU frequency: 2000 MHz
CPU socket(s): 1
Core(s) per socket: 4
Thread(s) per core: 1
NUMA cell(s): 1
Memory size: 3791292 kB
# virsh nodememstats
total : 3791292 kB
free : 2735832 kB
buffers: 110888 kB
cached : 418464 kB
So setting to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html |