-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GPU stats features #526
Comments
According to this http://askubuntu.com/a/5419 GPU info is not standardized and not retrievable via /proc as we currently do for the CPU stats. A tool like "Intel GPU Top" suggests that that same code probably won't work on other GPU chipsets, and that it would also probably require C headers to be installed separately. In summary, this looks like a world of pain. =) |
I'm willing to reopen this to investigate whether there are viable options to implement this at least for nvidia cards as it seems they are the most used in the scientifi community. |
NVIDIA already provides a library and has pypi package that provides python2 bindings, at least. https://developer.nvidia.com/nvidia-management-library-nvml |
Please add this! It would be a very nice addition to psutil. Nvidia's official python module is pynvml For AMD I found this module, pyamdgpuinfo, but it is currently linux only. Yet another library, but can only get very basic information is gpu-info ... it's also on pypi, but no description there. |
Generally one wants some wrapper around nvidia-smi or rocm-smi (AMD). There's also intel's gpu (though less popular) |
From your bug report:
[...]
This is concerning. If the C lib breaks compatibility so easily [1], psutil would probably have to use Also, right now we only depend on ...and then there is Windows. All of this to say that implementing this in pure C would be hard, which is probably why they decided to use ctypes in pynvml: https://github.com/gpuopenanalytics/pynvml/blob/master/pynvml/nvml.py In summary: if we'll ever add GPU functionality in psutil we'll probably want to use ctypes. :) [1] On a personal note: as a Linux user who's been dealing with Nvidia cards/driver issues for over a decade I'm not that surprised. ;) |
GPU are more and more used in scientific servers. It will be nice to have GPU stats features into PSUtil.
For examples of existing monitoring GPU software for Intel, NVidia or AMD GPU, see the post http://www.rkblog.rk.edu.pl/w/p/monitoring-amd-intel-and-nvidia-graphics-card-usage-under-linux/
Source (in C) already exist for Intel GPU Top: http://anonscm.debian.org/cgit/pkg-xorg/app/intel-gpu-tools.git/tree/tools/intel_gpu_top.c
I will be a very nice feature asked byt Glances' users.
The text was updated successfully, but these errors were encountered: