Alternative to nvidia-smi for measuring GPU utilization?

15,310

Solution 1

On Windows there's NvAPI which works on all GPUs.

On Linux if you're running X Server you can also query some of the information (GPU temperature, clocks, unfortunately no utilization) using nvidia-settings utility. e.g. nvidia-settings -q all

For Quadro and Tesla GPUs there's NVML/nvidia-smi that works both on Linux and Windows 64.

Solution 2

Although this is a very old question, I'm going to leave this here in case someone with the same issue stumble upon this. Nvidia-settings still forwards the GPU usage stat through -q [gpu:X]/GPUUtilization. it's very slow compared to nvidia-smi, but it's still better than not knowing. Either way, I wrote a script to put this and a few other common stats in a concise and readable way. Here it is for those who want it.

Solution 3

GPUstat outputs with colorful one-liners. It's implemented in Python and it has a test suite if you feel like tweaking it.

https://github.com/wookayin/gpustat

Share:
15,310
Brian Vandenberg
Author by

Brian Vandenberg

Software engineer, BS in CS & Math. SOreadytohelp

Updated on July 23, 2022

Comments

  • Brian Vandenberg
    Brian Vandenberg almost 2 years

    nVidia dropped support for all non quadro and tesla cards when it comes to using some tools and/or development libraries/tools. I have two GTX 590s, and when I use nvidia-smi most queryable fields return N/A because they dropped support for this card.

    Are there other tools that purport to gather this information? Is it possible/straightforward to query this information with the SDK?