-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
GPU monitoring (NVidia) #170
Comments
Intéressant... Je vais regarder si il est facile d'obtenir les informations système correspondantes. |
If using the ATI proprietary driver on linux this command can be used: |
Postponed in the next major release (v2.0). |
For nvidia, one can use
to obtain an xml tree, which can be parsed for
There is also an |
For Nvidia: https://pypi.python.org/pypi/nvidia-ml-py (see this code: https://github.com/ganglia/gmond_python_modules/blob/master/gpu/nvidia/nvidia-ml-py-3.295.00/nvidia_smi.py) For AMD, no lib found, but can call the aticonfig command line: see: https://code.google.com/p/pyatimonitor/source/browse/contents/code/main.py |
Asked as a new feature into the PSUtil lib: giampaolo/psutil#526 => REJECTED (also waiting for a standard way to grab the stats) |
Hi, any news about this feature? |
PSutil will not implement this feature because there is no standard way to If you have any additional information and tips to do this, I am your man. |
I see, unfortunately I do not have any. PS |
Best way to proceed is to write a dedicated Python lib with support for:
Glances will use this API to retreive GPU stats. |
Any news? (thanks for the awesome tool!) |
This feature would make Glances better for sure. It's already amazing, so this would be icing on an already iced cake 🍰 |
Could be possible to do a first version for Nvidia GPU because a Python lib already exist (https://pypi.python.org/pypi/nvidia-ml-py/). For AMD and INTEL, i am looking for existing Python Lib. |
@nicolargo Keen observation - I was just doing that! I actually have a half-implemented version that uses that library. The stats collection works, but I just can't quite find all the places to tell Glances about it. There's the |
@kdbanman Happy to heard that you have started to work on this enhancement. For the moment there is no official documentation / check-list about plugin addition. You can have a look on this pull request which is a good example: #911 Or, if you want, you can write a first version of the plugin (only the plugin script) and i will create a branch will all the stuff arround it to test it on your system (i do not have any Nvidia card...). What do you think ? |
@nicolargo That PR is exactly what I needed. I can work from there. 3 questions:
|
When the plugin is ready for testing I would be happy to try it on my GTX970m running Ubuntu 16. |
@kdbanman My answers:
I have another question. Where do you think that the plugin should be displayed in the UI ? Looking forward to sse the first implementation ! |
Good question. The accessible stats people might care about, in rough order of priority: Top priority:
Mid priority:
I'm really not sure what to show where though: Thoughts? |
@kdbanman : first off all we have to identify the mandatories stats for the GPU (do not forget that Glances aims at providong a "as quick as possible" monitoring of all the system). To my point of view we need to focus on:
Perhaps something like that (width limited to 14 chars and height to 4 lines):
The plugin can be between the existing CPU and MEM plugin priot to the extended MEM stats and extended CPU stats (if space is not available). For the temperature, it should be added to the existing sensors. I can do it on my side after looking at your code. Another question: how to manage multiple GPU ? My idea:
What do you think ? |
The top priority stats you suggest are perfect. A couple questions about them:
I prefer identifying by size, because id and UUID are not informative or human readable, and model could be a very long string. For multiple GPUs, we could follow the standard for multiple CPUs, where the % utilization is combined. People are used to that for CPU, but it might be confusing for memory. EX: Say we have a 2x GPU setup, where both are at 90% processor usage, and 75% memory usage:
|
|
@denru01 Sorry... here it is:
|
Still get the same error. I feel that get_device_handles() is not a function provided by pynvml, and is implemented in the glances plugin. I guess what you want to get and modify the code, and the result is put below:
|
Ok thanks @denru01 . Looks like nvmlDeviceGetUtilizationRates did not work as expected on your system... The last HEAD version of the DEVELOP branch has been modified to only used the nvmlDeviceGetMemoryInfo method. Can you try it ? PS: if you send us one or more screenshots with Glances running the GPU plugin, it will be very kind. |
If you got
It's almost 2017 and is a shame we imported a new plugin that depends on a python2-only library. -1. |
@denru01 Perfect. The digit issue is corrected in the HEAD version of the DEVELOP branch. Can you post another screenshot with this latest version ? |
Just improve the display (GPU name) and add plugin documentation: https://github.com/nicolargo/glances/blob/develop/docs/aoa/gpu.rst @denru01 : A last test please ? |
@notFloran Can you implement the Web UI ? Here are some examples: Mono GPU:
Multi GPU
Thanks ! |
@asergi Thank you for reporting that python3 crash. The
And we are now at 4.304.3, so I'm quite confident you found a bug in that library! I'm unsure where to report it though. |
@nicolargo Do you mean the HEAD of the develop branch? I did not see any difference in the GPU section, at least no GPU names. |
@nicolargo can you give me screenshots of the curse interface for the 2 examples ? |
@nicolargo yes. The version is correct. |
Here it is: [{"key": "gpu_id", "mem": None, "proc": 60, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}] Same interface with and without the 'meangpu' args: [{"key": "gpu_id", "mem": 10, "proc": 60, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}] Same interface with and without the 'meangpu' args: [{"key": "gpu_id", "mem": 48.64645, "proc": 60.73, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}, Without meangpu (default behavor): With meangpu: [{"key": "gpu_id", "mem": 48.64645, "proc": 60.73, "gpu_id": 0, "name": "GeForce GTX 560 Ti"}, Without meangpu (default behavor): With meangpu: Thanks @notFloran ! |
How can I show GPU temperature on glances? Right now I have to run nvidia-smi separately to see the GPU temp. |
I had to install this: |
So this nvidia thing is proprietary and this is why end user packages like gpustat are in Debian Multiverse, correct ? I there no way to talk with Nouveau, the OSS driver ? |
@d-damien i do not think it is related because the nvidia-ml-py lib used by Glances (and also GPUstat) to grab GPU stats is open-sourced (BSD-License). |
Bonjour,
Merci pour ce soft que j'utilise et apprécie (presque depuis le début, car je suivais déjà votre blog via rss avant ça...).
Je me demandais si vous pensez qu'il sera (serait ?) possible d'y ajouter les infos GPU.
Vu que de + en +de cartes graphiques ont un proc. dédié, je me disait qu'il serait intéressant d'avoir le même type d'info qu'avec glances... et éventuellement même de voir la décharge de l'un sur l'autre ...
Merci
Alexis
The text was updated successfully, but these errors were encountered: