[libvirt] virNodeGetFreeMemory() returns bytes with Xen driver

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

 



The libvirt API states that the return value of virNodeGetFreeMemory() is in kilobytes. When making this call against a Xen hypervisor and comparing the returned value with what is listed by "xm info" it appears that libvirt is returning the free memory in bytes and not kilobytes. Can anybody confirm this behavior?

This code snippet:

    conn = virConnectOpen("xen:///localhost/");
    hostmem = virNodeGetFreeMemory(conn);
    fprintf(stdout, "Host free memory = %llu\n", hostmem);

produces the following output:

    Host free memory = 3236012032

The following comes from running "xm info" on the Xen host:

    free_memory            : 3086

The libvirt value is convertable into the "xm" returned value if bytes is assumed.

Regards,

Tyrel Datwyler

Linux Software Engineer
eServer Systems Management
IBM Systems and Technology Group
Email: tyreld@xxxxxxxxxx
External: (503) 578-3489,  T/L: 775-3489

--
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]