Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=237421
Summary: Bad cpuTime retrieved from Sys::Virt::Domain->get_info
Product: Fedora Extras
Version: fc6
Platform: i686
OS/Version: Linux
Status: NEW
Severity: medium
Priority: medium
Component: perl-Sys-Virt
AssignedTo: steve(a)silug.org
ReportedBy: g+fedora(a)pkg.fr
QAContact: extras-qa(a)fedoraproject.org
CC: berrange@redhat.com,fedora-perl-devel-list(a)redhat.com
Description of problem:
I tried the API on a AMD Athlon(tm) XP 3000+, I got bad values with some
negative one for the cpuTime of a domain.
Version-Release number of selected component (if applicable):
perl-Sys-Virt-0.1.1
How reproducible:
every time
Steps to Reproduce:
1. Run a server with some xen domains
2. Try the example included in the package:
/usr/share/doc/perl-Sys-Virt-0.1.1/examples/dump-info.pl
3. Observe the "cpuTime" values
Actual results:
False
Expected results:
Good
Additional info:
I search the sources and I found this value is in fact unsigned long long value
in libvirt library to represent nanoseconds (cf
http://libvirt.org/html/libvirt-libvirt.html#virDomainInfo). I didn't try on a
64 bits arch but I think the it could work on it.
I managed to obtain the expected results by patching the sources: I edit Virt.xs
from the source and changed the line 359 from:
hv_store (RETVAL, "cpuTime", 7, newSViv(info.cpuTime), 0);
to
hv_store (RETVAL, "cpuTime", 7, newSVnv(info.cpuTime), 0);
So the unsigned long long is read as a float scalar and not an integer scalar.
--
Configure bugmail:
https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.