Jump to content
Welcome to our new Citrix community!
  • 0

XenServer API SDK - how to get number of cores of host CPU


Ivan Todorovic

Question

I'm using C# SDK and could not figure out how to get number of cores of Host. Base on my research I get next:

 

Host.get_all_records(session);

this give me cpu_info structure with properties

 

            "modelname": "Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz", - base on official specification for that processor I conclude next


            "cpu_count": "32", - this represent total number of logical cores of host (threads)
            "socket_count": "2", - this represent number of CPU of host

 

 

Host_cpu.get_all_records();

This does not give any info about core, it list all logical cores (threads)

 

 

Do I understand something wrong or I miss some other possible models to collect about CPU?

Link to comment

3 answers to this question

Recommended Posts

  • 0

Thank you for replay,

 

I read earlier about that flag but it was not clear for me how to use it. I suppose that is in next part of cpu_info:

 

"flags": "fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush acpi mmx fxsr sse sse2 ht syscall nx lm constant_tsc arch_perfmon rep_good nopl nonstop_tsc eagerfpu pni pclmulqdq monitor est ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase bmi1 avx2 bmi2 erms xsaveopt cqm_llc cqm_occup_llc",

 

So, if I understand well, if ht flag exist it means that are 2 threads per core, if not then is one thread per core, right?

maybe next question is silly, but I'm not good with hardware and I'm wondering are exist processors with more than 2 threads per core?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...