ESXi

 View Only
  • 1.  GPU Utilization in vSphere API?

    Posted Nov 18, 2013 02:47 PM

    Hi everyone,

    I have a host running ESXi 5.5 with some Nvidia GRID cards. I'd like to be able to pull utilization statistics from them with the vSphere API. I see that there is a HostGraphicsInfo object (http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.host.GraphicsInfo.html) which lists some basic information, but I'd like to see the actual GPU usage there as well. My current solution is to SSH into the service console programmatically and periodically poll nvidia-smi with the XML flag turned on. Is there any way I can get this information from the vSphere 5.5 API?

    Thanks!



  • 2.  RE: GPU Utilization in vSphere API?

    Posted Nov 18, 2013 06:46 PM

    Hi

    Welcome to the communities.

    Could you please conform if you are looking graphics card memory usage or anything else? .

    Confidence is preparation. Everything else is beyond your control


  • 3.  RE: GPU Utilization in vSphere API?

    Posted Nov 18, 2013 06:51 PM

    I'm looking for both graphics memory usage and volatile GPU utilization (i.e the load that the GPU is currently under).



  • 4.  RE: GPU Utilization in vSphere API?

    Posted Nov 22, 2013 01:08 PM

    jclapis would you mind to share the SSH-script you use currently to monitor the GPU?



  • 5.  RE: GPU Utilization in vSphere API?

    Posted Nov 22, 2013 03:17 PM

    It's not a script, I am using an SSH library within my application, but here's what it does.

    First it calls nvidia-smi:

         ~ # nvidia-smi -q -d UTILIZATION

    Which provides this output:

    ==============NVSMI LOG==============

    Timestamp                           : Fri Nov 22 14:49:21 2013

    Driver Version                      : 319.65

    Attached GPUs                       : 8

    GPU 0000:08:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:09:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:0A:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:0B:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:86:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:87:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:88:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %

    GPU 0000:89:00.0

        Utilization

            Gpu                         : 0 %

            Memory                      : 0 %


    I take that output and parse out each GPU ID with its two utilization metrics, for use in my application. I can enumerate the GPUs through the vSphere API and get their IDs, but the "Gpu" and "Memory" consumption stats are not included.



  • 6.  RE: GPU Utilization in vSphere API?

    Posted Nov 22, 2013 03:45 PM

    Ok, thanks!