[Ovirt-devel] [PATCH] Adding NIC details to ovirt identify stage.

Perry N. Myers pmyers at redhat.com
Fri Jul 11 20:36:10 UTC 2008


Daniel P. Berrange wrote:
> On Fri, Jul 11, 2008 at 03:28:50PM -0400, Darryl L. Pierce wrote:
>> This patch includes submitting to the server the MAC address and bandwidth, as
>> determined via HAL, for each physical NIC in the machine. 
> 
> 
>> +int get_cpu_info(void)
>> +{
>> +    int result = 1;
>> +    FILE* inputfd;
>> +    t_cpu_info* current = NULL;
>> +
>> +    if(( inputfd = fopen("/proc/cpuinfo","rb")) != NULL)
> 
> This is just plain wrong if running on Xen. This is why we provide
> the virNodeGetInfo API in libvirt, which knows whether to ask
> /proc/cpuinfo, or whether to query the hypervisor for the real info

Agreed.  While we're targeting this code for the Managed Node which is KVM 
only, this will eventually need to run on Xen hosts as well.  So we should 
use virNodeGetInfo...

Does virNodeGetInfo provide the same level of details as /proc/cpuinfo in 
terms of listing things like cpuflags?

Perry




More information about the ovirt-devel mailing list