-
-
Notifications
You must be signed in to change notification settings - Fork 439
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 utilization meter #406
Comments
While this sounds interesting it'd be appreciated if we can keep as neutral as possible. Thus an implementation of this should cover most systems regardless of the vendor supplying the hardware. Also, as was done with some other features that rely on external libraries the implementation should try to dynamically load the required libraries at runtime. Or even avoid external libraries at all when possible. |
https://github.com/rib/gputop for inspiration |
It seems that the gputop mentioned by @fasterit only supports intel gpus. |
I wish that I could write a script inside htoprc, such that:
|
If I had to use this feature I'd expect the results to show me the utilisation of the GPU for doing work with CUDA, OpenGL, OpenCV, Xtend, or OpenCL. Also, I don't see how a busy GPU would have the same metrics consideration as for a busy CPU. |
There is an issue on the previous version of the repo: hishamhm/htop#899 Implementing generic custom meters should solve the problem of vendor neutrality. |
IF (card = nvidia) elif (card = AMD) data = amd version elif (card = intel) else () Although it doesn't have the same tick rate as Htop itself, so costum code would probably be required to be made. I’d be willing to have a go at coding it myself, but I’m not a c programmer and I have no idea where to go looking in the codebase to add something like this. |
Hi folks, https://man7.org/linux/man-pages/man1/pmdanvidia.1.html |
I`ve installed the packages but when i run pcp htop I seem to just get an htop wich doesn`t even show my running processes. also no GPU option in headers layout menu. |
Hmm, maybe an installation issue, everythings working fine here - can you fetch values via:
Which Linux distribution? PCP version? Can you paste output from 'pcp summary'?
Yep, you're blazing a trail here - this will involve adding a new text config file alongside the others below pcp/meters/ in the htop repo specifying which metrics you want to display. |
same here as @NicTanghe's issue pcp-summary: Cannot connect to PMCD on host "local:": Connection refused |
"Connection refused" means pmcd(1) is not running - try 'systemctl start pmcd' (or equivalent for your local init system). If pmcd isn't available you likely haven't installed pmdanvidia(1) either. |
I`ve been buisy with other stuf and probably wont reply any time soon |
see https://github.com/Syllo/nvtop, they seem to have this figured out. htop needs this! |
Thank you for this pointer. When we last had a look at the GPU utilization stuff there was no real unified interface available yet. But given that fdinfo seems to be the way to go, this seems to have become reasonable to implement and maintain. @benjamin051000: Do you mind helping with a PR for initial support for these? |
I know this is scope creep, but adding Apple Metal GPU stats would be awesome too. |
I confirm this works on my ryzen 5700G out of box . I compiled htop as follows: ./autogen.sh
./configure --enable-static --enable-sensors
make It can even show GPU usage time per process ! Thank you so much. |
Sorry how does one enable this? I have an RX 580 and I can't find the option to enable the GPU usage in htop. (I also tried building it manually like you did) |
Press F2. Scroll down to "Meters" On the 4th column, you will see "GPU usage" . Focus on it an then press ENTER to move it to 2nd column. Hope this helps. |
Yeah it is not on my system. Thank you either way, now I know that at least the issue isn't that I couldn't find the option. |
Didn't work, could you share the htop binary that works on your end? It might be that my gpu isn't supported. Yes lm_sensors is installed, it is even a dependency of mesa (that's what I assume you meant by libsensors5 since that package isn't on the arch based distro that I use). |
htop-x86-64-3.4.0-stulluk-gpu-works-static-compile.tar.gz I hope it helps. MD5SUM: f8b654c937c72591d9a3a5599cfd6cef |
Thank you this works, looks like I have an issue with libraries on my end. Because I just tried to build it again and I can't compile static on artix linux even though I have all the libraries needed. Omg this has taken so long I give up, I can't get this compile that feature. I tried the official arch package, I downloaded the debian package as well, and also built the htop package statically using github workflows on a ubuntu machine, none gave me a htop that has a working gpu meter, the only one that has it is your binary. |
The GPU meter is not on my htop either. I am using NixOS unstable with htop 3.3.0. |
If I am not mistaken, this feature was added since 3.4.0 (see my build version above ) |
Thanks. |
Since htop 3.4 is not yet available it seems, I made this small script for myself. Maybe it will help somebody else as well:
|
I think it would be nice if there could be a usage bar like cpu for gpu processors.
The only available option is the nvidia-smi command but it's awkward.
The text was updated successfully, but these errors were encountered: