congard / nvidia-system-monitor-qt

Task Manager for Linux for Nvidia graphics cards
MIT License
161 stars 23 forks source link

Question: utilization accuracy #13

Closed BlueGoliath closed 4 years ago

BlueGoliath commented 4 years ago

Hi,

Sorry for bothering you, but I'm having issues getting accurate utilization from NVML's process structs for my own Nvidia GPU monitoring utility. It seems like your tool is far more accurate than mine(e.g. mine reports 0%, yours reports 12%) but I'm not sure why that is and was hoping you'd be willing to share how you managed to get such accurate utilization numbers.

Mine updates about every 500ms in the backend but frontend only updates about 1000ms and I'm using the timestamp from the previous update period as the function timestamp input.

congard commented 4 years ago

Hi, there is no any magic, I'm just parsing the nvidia-smi output. Parser available here: https://github.com/congard/nvidia-system-monitor-qt/blob/master/src/core/NVSMIParser.cpp

BlueGoliath commented 4 years ago

Interesting. I had thought you were using NVML itself:

https://github.com/NVIDIA/nvidia-settings/blob/master/src/nvml.h

since you written the GUI in C++. Sorry for the bother then.