AsciJA
Contributor
Contributor

How to Obtain Logical Processors on VMware Host in C#

Jump to solution

I need to obtain the number of logical processors that a VMware host has, the number of processor sockets and the number of cores per socket from a C# program. I don't see this information in the HostSystem Managed Object or in any of the objects associated with it. This information is displayed by the VMware Infrastructure Client in the Configuration/Hardware/Processors tab, but I need to capture it programmatically. Thanks in advanced for your help.

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager

Take a look under HostSystem->hardware for this information: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.HardwareInfo.htm...

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
6 Replies
lamw
Community Manager
Community Manager

Take a look under HostSystem->hardware for this information: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.host.HardwareInfo.htm...

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
heyitspablo
VMware Employee
VMware Employee

AsciJA

I asked our SDK Dev team to put together some samples in PowerShell, once they are ready we will post them here...will PS work for you ?

_Pablo

Keep up with latest info on vSphere PowerCLI http://blogs.vmware.com/vipowershell - Follow me on Twitter @heyitspablo
AsciJA
Contributor
Contributor

That would be great. Thank you.

Joe Affrunti

jaffrunti@advsyscon.com

Advanced Systems Concepts, Inc.

0 Kudos
AsciJA
Contributor
Contributor

Hi William,

That was it. Thank you, very much.

Joe Affrunti

jaffrunti@advsyscon.com

Advanced Systems Concepts, Inc.

0 Kudos
admin
Immortal
Immortal

Hi AsciJA,

Attached is the standalone C# sample to get the Overall CPU information. It takes 4 parameters:

<webserviceurl> <username> <password> <host ipaddress>

Regards,

Seemanki

0 Kudos
AsciJA
Contributor
Contributor

Hi,

I was able to get the info I needed. Thank you very much for your reply.

0 Kudos