Changeset 1688:4bd2c841cc4e

Show
Ignore:
Timestamp:
07/02/08 13:45:55 (3 months ago)
Author:
klai@…
Children:
1689:90d63d87bfb8, 1692:fec0af2ae023
Branch:
default
Message:

Fix CPU calculation (again) because Xen can't make up its mind

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Tycoon/Virtualization/XenResources.py

    r1679 r1688  
    4646 
    4747        cpu_info = self.__xen_main._xen_low_level.physinfo() 
    48         num_cpus = ( 
     48        old_num_cpus = ( 
    4949            cpu_info.get('nr_nodes', 1) * cpu_info.get('sockets_per_node', 1) 
    5050            * cpu_info.get('cores_per_socket', 1)  
    5151            * cpu_info.get('threads_per_core', 1)) 
     52        num_cpus = cpu_info.get('nr_cpus', old_num_cpus) 
    5253        del cpu_info['total_memory'], cpu_info['free_memory'] 
    5354