congard / nvidia-system-monitor-qt

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

memory usage isn't as expected #3

Closed candytaco closed 4 years ago

candytaco commented 4 years ago

The memory usage tab displays nvidia-smi's utilization.memory value, which is " Percent of time over the past sample period during which global (device) memory was being read or written" (from the useful queries page) and not the amount of vRAM in use.

I changed https://github.com/congard/nvidia-system-monitor-qt/blob/599b650db79f121024b2441239fe04418e50d055/src/utilization.cpp#L188-L191

to

        memoryData[i - 1].total = std::atoi(split(data[1], " ")[0].c_str());
        memoryData[i - 1].free = std::atoi(split(data[2], " ")[0].c_str());
        memoryData[i - 1].used = std::atoi(split(data[3], " ")[0].c_str());
        udata[i - 1].level = memoryData[i - 1].used * 100 / memoryData[i - 1].total;

in my local build to make the tab display percent of vRAM in use

congard commented 4 years ago

Thanks for the report! I apologize for such a late reply, I will fix it as soon as possible