Open martindell opened 1 week ago
@martindell can you run this commands from unraid console?
To retrieve GPU information (NVIDIA, AMD, and integrated GPUs) on an Unraid system and save it to a text file, you can use the following approaches:
The lspci command can be used to list all PCI devices, including GPUs. You can filter the output for NVIDIA, AMD, and integrated GPUs.
lspci | grep -i 'vga|3d|display' > /boot/config/gpu_info.txt
• Explanation:
• grep -i 'vga\|3d\|display': Filters lines related to GPUs.
• > /boot/config/gpu_info.txt: Redirects output to a file.
If you have the NVIDIA driver plugin installed, nvidia-smi provides detailed information for NVIDIA GPUs.
nvidia-smi -q > /boot/config/nvidia_gpu_info.txt
• Explanation:
• -q: Outputs detailed GPU information.
• > /boot/config/nvidia_gpu_info.txt: Saves the output to a file.
If you have mesa-utils installed, you can use glxinfo to retrieve GPU details.
glxinfo | grep -i 'device|renderer' > /boot/config/gpu_info_glx.txt
If you have inxi installed, it provides detailed GPU information.
inxi -Gxx > /boot/config/gpu_info_inxi.txt
Installing Missing Tools
If some commands are missing, you might need to install additional packages using nerdpack or Unraid plugins. For example: • nvidia-smi requires the NVIDIA driver plugin. • glxinfo and inxi might need nerdpack.
Ah yes, nvidia-smi works OK. I'm not too sure what to do with the output if I run the command as a user script?
This command also gets me the values I'm looking for, but again I'm not sure where to go next to get them in HA
nvidia-smi --query-gpu=utilization.gpu,temperature.gpu,fan.speed,power.draw,pstate --format=csv,noheader --id=GPU-46250647-39eb-0df2-0faa-9ee13e7745fd
88 %, 71, 85 %, 248.67 W, P2
This is also useful: nvidia-smi -q -d PERFORMANCE | grep -E "Performance State|Idle|Slowdown" Performance State : P8 Idle : Active HW Slowdown : Not Active HW Thermal Slowdown : Not Active HW Power Brake Slowdown : Not Active SW Thermal Slowdown : Not Active
@martindell Would you mind testing experimental gpu monitoring feature?
If you can, then I'll upload the code and let you know how to test it.
Sure, I'd be delighted to 👍
@martindell Would you mind testing experimental gpu monitoring feature?
If you can, then I'll upload the code and let you know how to test it.
Happy to test as well, just came here to make the same feature request.
First off - thank you for this addon. I'm using it to halt a GPU-heavy Unraid docker to save my home battery from running out of juice 👍
Is your feature request related to a problem? Please describe. I use the GPU Statistics plugin to display this kind of info on my Unraid dashboard.
Describe the solution you'd like It'd be great to see this kind of info as sensors inside the HomeAssistant addon
Additional context I can pull some of this GPU info via user scripts. Maybe there's a way to pass it back to the HomeAssistant addon?