[PLUGIN] GPU Statistics


Recommended Posts

2 hours ago, mlapaglia said:

ok i added the optional display preferences back in, on my machine whenever i try to save my preferences they go back to default, does that happen on yours?

Exactly.

 

EDIT: do you write the settings in a file? Haven't looked at the code that closely...

Link to comment

I'm not sure, I just modified it to make it look like the other dashboard, not sure how the back side works.

 

i realized it's missing a memory utilization bar. in the nvidia smi output i see two values. the utilization field for memory doesn't seem to reflect when plex is running transcodes. using the fb_memory_usage value works well though:

Quote

                <fb_memory_usage>
                        <total>8119 MiB</total>
                        <used>10 MiB</used>
                        <free>8109 MiB</free>
                </fb_memory_usage>
                <bar1_memory_usage>
                        <total>256 MiB</total>
                        <used>2 MiB</used>
                        <free>254 MiB</free>
                </bar1_memory_usage>
                <compute_mode>Default</compute_mode>
                <utilization>
                        <gpu_util>0 %</gpu_util>
                        <memory_util>0 %</memory_util>
                        <encoder_util>0 %</encoder_util>
                        <decoder_util>0 %</decoder_util>
                </utilization>

image.png.2b6fa433dab6aee529b47a2ea8d591e7.png

 

edit: found it https://docs.nvidia.com/deploy/nvml-api/structnvmlUtilization__t.html#structnvmlUtilization__t_19789def365e5aa382ac222db9c60a400

 

The utilization field for memory is:

Quote

Percent of time over the past sample period during which global (device) memory was being read or written.

so for my purposes i'd just want to know how much memory is being used, just making the bar show the % used memory

Edited by mlapaglia
  • Like 2
Link to comment
1 hour ago, mlapaglia said:

I'm not sure, I just modified it to make it look like the other dashboard, not sure how the back side works.

Is it possible that you don't change the values in the 'defaults.cfg'?

Also I would recommend to create a file /boot/config/plugins/YOURPLUGINNAME/defaults.cfg with the changes that the user makes and save/read it from there since it will survive a reboot if it's in this directory: Example

 

EDIT: The abillity to hide things would be very nice since the Power Draw is broken on most GTX1050Ti cards like on mine and I would like to hide it because it's simply useless.

  • Like 1
Link to comment
On 1/2/2021 at 7:36 PM, madelectron said:

Are we able to restart the development of this plugin with IGPU quicksync support?  I can help beta test if needed.

I have a branch for it already.  Once I've merged the changes from @mlapaglia into mine I can look at setting up a dev test for people like you who are willing to help out.  Keep in mind, the Intel stats are starkly different compared to what Nvidia gives using their built-in tools.

Link to comment

any idea why my newly added nvidia graphics card is showing up in system devices:

 

[10de:13bb] 01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)

[10de:0fbc] 01:00.1 Audio device: NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX] (rev a1)

 

but the plugin says:

Error 300: Vendor utility not found.

 

??

Link to comment
10 hours ago, tmryvz said:

any idea why my newly added nvidia graphics card is showing up in system devices:

 

[10de:13bb] 01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)

[10de:0fbc] 01:00.1 Audio device: NVIDIA Corporation GM107 High Definition Audio Controller [GeForce 940MX] (rev a1)

 

but the plugin says:

Error 300: Vendor utility not found.

 

??

If you simply installed the graphics card and booted up, you're probably missing the step where you need to install the UnRAID-Nvidia plugin, install an nvidia kernel and reboot.  Then you should have access to the nvidia-smi command from an UnRAID console.  My plugin depends on that command to be available.

Link to comment
On 1/5/2021 at 3:13 AM, b3rs3rk said:

I have a branch for it already.  Once I've merged the changes from @mlapaglia into mine I can look at setting up a dev test for people like you who are willing to help out.  Keep in mind, the Intel stats are starkly different compared to what Nvidia gives using their built-in tools.

I'm also willing to test.  Currently using intel GPU and want to test hardware decoding.

Link to comment
12 hours ago, dotexe said:

On the latest update with unraid 6.9.30beta35 I'm getting cpu spikes. Once I uninstall the plugin they go away. Nvidia-smi showing a high percentage in top. No issues with the older version. Any ideas?

Leave the plugin un-installed and in the UnRAID console run:

watch -n 1 nvidia-smi -q -x -i 0

Leave it running in the console and watch top in another console.  If you're still getting CPU spikes, then it isn't my plugin.

Edited by b3rs3rk
spacing
Link to comment

@smidley @madelectron any anyone else wanting to test Intel iGPU support:

First install the Intel GPU Top plugin from @ich777 -- This is NOT the docker version on Community Apps.  It has to be the plugin version by ich777.  Then uninstall my current plugin and manually install this one - https://raw.githubusercontent.com/b3rs3rk/gpustat-unraid/dev-intel-test/gpustat.plg

 

Make sure you go to settings and set it for Intel.  If you have a valid iGPU, it should show up on the settings page.  If not, message me the output of the following command run from the UnRAID console:

lspci | grep VGA

If your iGPU is detected, but you're not getting any data on the dashboard, go to the UnRAID console and type/copy paste the following and send me the result:

cd /usr/local/emhttp/plugins/gpustat
php ./gpustatus.php

If you are getting some, but not all the data you'd like to see review the UnRAID console output of:

intel_gpu_top

If the metric I display on the dashboard is not showing up for you in intel_gpu_top your CPU/iGPU/Chipset doesn't support monitoring that.  Recommend disabling that particular metric in your plugin settings.  If the metric shows up in intel_gpu_top but still doesn't display on the dashboard, send me the output of:

timeout -k .500 .400 intel_gpu_top -J -s 250

To revert back to my existing plugin, just uninstall the test version manually and reinstall from Community Apps.

 

Enjoy!

Edited by b3rs3rk
oops
  • Like 1
  • Thanks 1
Link to comment
9 hours ago, b3rs3rk said:

Leave the plugin un-installed and in the UnRAID console run:


watch -n 1 nvidia-smi -q -x -i 0

Leave it running in the console and watch top in another console.  If you're still getting CPU spikes, then it isn't my plugin.

I've done this. I'm only getting the spikes when I install gpu stats. I notice it's only when the dashboard is open as well.

Link to comment
8 hours ago, dotexe said:

I've done this. I'm only getting the spikes when I install gpu stats. I notice it's only when the dashboard is open as well.

I'm sorry, I'm trying to think of how to troubleshoot it since I can't reproduce it on either my production box (Dual Xeon) or my tester box (Atom D515).  Both of them run the new code (and the new new code with Intel support) just fine with no spikes.

 

You're not on the latest UnRAID version by the way.  I'd install the newest release candidate rather than sit on a Beta version.  There have been two release candidates delivered since the Beta version you are running was released.  This plugin tests fine on 6.8.3 and 6.9.0-rc2.

Link to comment
18 hours ago, b3rs3rk said:

@smidley @madelectron any anyone else wanting to test Intel iGPU support:

First install the Intel GPU Top plugin from @ich777 -- This is NOT the docker version on Community Apps.  It has to be the plugin version by ich777.  Then uninstall my current plugin and manually install this one - https://raw.githubusercontent.com/b3rs3rk/gpustat-unraid/dev-intel-test/gpustat.plg

 

Make sure you go to settings and set it for Intel.  If you have a valid iGPU, it should show up on the settings page.  If not, message me the output of the following command run from the UnRAID console:


lspci | grep VGA

If your iGPU is detected, but you're not getting any data on the dashboard, go to the UnRAID console and type/copy paste the following and send me the result:


cd /usr/local/emhttp/plugins/gpustat
php ./gpustatus.php

If you are getting some, but not all the data you'd like to see review the UnRAID console output of:


intel_gpu_top

If the metric I display on the dashboard is not showing up for you in intel_gpu_top your CPU/iGPU/Chipset doesn't support monitoring that.  Recommend disabling that particular metric in your plugin settings.  If the metric shows up in intel_gpu_top but still doesn't display on the dashboard, send me the output of:


timeout -k .500 .400 intel_gpu_top -J -s 250

To revert back to my existing plugin, just uninstall the test version manually and reinstall from Community Apps.

 

Enjoy!

I will give this a try today or tomorrow. Thank you! 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.