VMware {code} Community
AsciJA
Contributor
Contributor
Jump to solution

How to Obtain Logical Processors on VMware Host in C#

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.

Reply
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

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

Reply
0 Kudos
6 Replies
lamw
Community Manager
Community Manager
Jump to solution

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".

Reply
0 Kudos
heyitspablo
VMware Employee
VMware Employee
Jump to solution

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
Jump to solution

That would be great. Thank you.

Joe Affrunti

jaffrunti@advsyscon.com

Advanced Systems Concepts, Inc.

Reply
0 Kudos
AsciJA
Contributor
Contributor
Jump to solution

Hi William,

That was it. Thank you, very much.

Joe Affrunti

jaffrunti@advsyscon.com

Advanced Systems Concepts, Inc.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

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

Reply
0 Kudos
AsciJA
Contributor
Contributor
Jump to solution

Hi,

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

Reply
0 Kudos