<html><body>
<p><tt>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?</tt><br>
<br>
<tt>This code snippet: </tt><br>
<br>
<tt>    conn = virConnectOpen("xen:///localhost/");</tt><br>
<tt>    hostmem = virNodeGetFreeMemory(conn);</tt><br>
<tt>    fprintf(stdout, "Host free memory = %llu\n", hostmem);</tt><br>
<br>
<tt>produces the following output:</tt><br>
<br>
<tt>    Host free memory = 3236012032</tt><br>
<br>
<tt>The following comes from running "xm info" on the Xen host:</tt><br>
<br>
<tt>    free_memory            : 3086</tt><br>
<br>
<tt>The libvirt value is convertable into the "xm" returned value if bytes is assumed.</tt><br>
<tt><br>
Regards,<br>
<br>
Tyrel Datwyler<br>
<br>
Linux Software Engineer<br>
eServer Systems Management <br>
IBM Systems and Technology Group<br>
Email: tyreld@us.ibm.com<br>
External: (503) 578-3489,  T/L: 775-3489<br>
<br>
</tt></body></html>