VMware {code} Community
shahinnemati93
Contributor
Contributor

Getting Esx and guest Vms Performance Data Using Vmware Sdk vmware.vim C# (vmware management sdk for .net)

I'm using vmware sdk for .net to get overall data from an esx host and its guest vm's

i've connected to esx server and got some data from guest like max cpu,max memory,ip and etc

now i want to get performance data(cpu usage,memory usage,alarms,etc) of both esx server and vm's

I searched everywhere in the internet and documentation but i couldn't find any good samples that works

the only thing I know is to use performance manager!

can anyone help me how to do it in my c# code? this is how i connect to my esx server:

VMware.Vim.VimClientImpl c = new VimClientImpl();

ServiceContent sc = c.Connect("https://<my ip add>/sdk");

UserSession us = c.Login("root", "Mypass");

and to get vms:

IList<VMware.Vim.EntityViewBase> vms = c.FindEntityViews(typeof(VMware.Vim.VirtualMachine), null, null, null);

thank you too much

Tags (1)
0 Kudos
1 Reply
GhostTyper
Contributor
Contributor

Did you find a solution to this, meanwhile?
0 Kudos