[PLUGIN] GPU Statistics


Recommended Posts

20 minutes ago, strahd_zarovich said:

root@Tower:/usr/local/emhttp/plugins/gpustat# php ./gpustatus.php

Warning: A non-numeric value encountered in /usr/local/emhttp/plugins/gpustat/lib/Nvidia.php on line 254

Warning: A non-numeric value encountered in /usr/local/emhttp/plugins/gpustat/lib/Nvidia.php on line 257

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/emhttp/plugins/gpustat/lib/Nvidia.php:254) in /usr/local/emhttp/plugins/gpustat/lib/Main.php on line 164

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/emhttp/plugins/gpustat/lib/Nvidia.php:254) in /usr/local/emhttp/plugins/gpustat/lib/Main.php on line 165
{"clock":"N\/A","util":"N\/A","power":"0W","rxutil":"0","txutil":"0","vendor":"NVIDIA","name":"GeForce GT 710","clockmax":"N\/A","memclock":"N\/A","memclockmax":"N\/A","memutil":"13%","memtotal":"980","memused":"123","encutil":"N\/A","decutil":"N\/A","temp":"53 \u00b0C","tempmax":"N\/A","fan":"50%","pciemax":0,"perfstate":"P0","throttled":"No","thrtlrsn":"","pciegen":0,"pciegenmax":0,"pciewidth":0,"pciewidthmax":0,"powermax":"N\/A","sessions":0,"plexusing":false,"plexmem":0,"plexcount":0,"jellyusing":false,"jellymem":0,"jellycount":0,"embyusing":false,"embymem":0,"embycount":0}root@Tower:/usr/local/emhttp/plugins/gpustat#


Something weird is going on with your setup.  It's escaping "N/A" so that it shows up as "N\/A" which I don't check for.  I'm only looking for "N/A" without the backslash.  It also looks like it is inserting char codes for degrees Celsius, which won't be displayed properly once it starts working.  Do you have some kind of special locale settings on your UnRAID install?
 

Edited by b3rs3rk
Link to comment
51 minutes ago, b3rs3rk said:


Something weird is going on with your setup.  It's escaping "N/A" so that it shows up as "N\/A" which I don't check for.  I'm only looking for "N/A" without the backslash.  It also looks like it is inserting char codes for degrees Celsius, which won't be displayed properly once it starts working.  Do you have some kind of special locale settings on your UnRAID install?
 

Nothing I can think of. I am running a regular UnRAID install.

 

Link to comment
41 minutes ago, strahd_zarovich said:

 

I should have added. My Plex server is using the Video card just fine.


I'm not sure I'm looking at it properly.  Try disabling the PCI RX/TX utilization in the settings and see what happens with the dashboard panel.  If it starts displaying, cool.  You don't really need it anyways because your card doesn't show anything for it.  If it doesn't work, send me the nvidia-smi -q -x -i 0 results again.

Link to comment
2 hours ago, b3rs3rk said:


I'm not sure I'm looking at it properly.  Try disabling the PCI RX/TX utilization in the settings and see what happens with the dashboard panel.  If it starts displaying, cool.  You don't really need it anyways because your card doesn't show anything for it.  If it doesn't work, send me the nvidia-smi -q -x -i 0 results again.

 

That did get m temperature and memory usage

Link to comment
20 hours ago, b3rs3rk said:

@jamerperson I'm guessing you have two graphics cards?  I'll need the output from the one that is failing to be displayed properly by the plugin.  Try this instead:
 



nvidia-smi -q -x -i 1

 

Yes, 2 cards. Sorry, It's been a while since my first post about it. The GTX 750 works fine, but the Quadro K4200 is the primary one I use and is the one with the issue.

<?xml version="1.0" ?>
<!DOCTYPE nvidia_smi_log SYSTEM "nvsmi_device_v10.dtd">
<nvidia_smi_log>
        <timestamp>Thu Feb 18 01:16:51 2021</timestamp>
        <driver_version>440.59</driver_version>
        <cuda_version>10.2</cuda_version>
        <attached_gpus>2</attached_gpus>
        <gpu id="00000000:0A:00.0">
                <product_name>Quadro K4200</product_name>
                <product_brand>Quadro</product_brand>
                <display_mode>Disabled</display_mode>
                <display_active>Disabled</display_active>
                <persistence_mode>Disabled</persistence_mode>
                <accounting_mode>Disabled</accounting_mode>
                <accounting_mode_buffer_size>4000</accounting_mode_buffer_size>
                <driver_model>
                        <current_dm>N/A</current_dm>
                        <pending_dm>N/A</pending_dm>
                </driver_model>
                <serial>0425014010187</serial>
                <uuid>GPU-d9d10961-ab5c-ef07-2cf9-9537838af362</uuid>
                <minor_number>1</minor_number>
                <vbios_version>80.04.FE.00.07</vbios_version>
                <multigpu_board>No</multigpu_board>
                <board_id>0xa00</board_id>
                <gpu_part_number>N/A</gpu_part_number>
                <inforom_version>
                        <img_version>2004.0503.01.02</img_version>
                        <oem_object>1.1</oem_object>
                        <ecc_object>N/A</ecc_object>
                        <pwr_object>N/A</pwr_object>
                </inforom_version>
                <gpu_operation_mode>
                        <current_gom>N/A</current_gom>
                        <pending_gom>N/A</pending_gom>
                </gpu_operation_mode>
                <gpu_virtualization_mode>
                        <virtualization_mode>None</virtualization_mode>
                        <host_vgpu_mode>N/A</host_vgpu_mode>
                </gpu_virtualization_mode>
                <ibmnpu>
                        <relaxed_ordering_mode>N/A</relaxed_ordering_mode>
                </ibmnpu>
                <pci>
                        <pci_bus>0A</pci_bus>
                        <pci_device>00</pci_device>
                        <pci_domain>0000</pci_domain>
                        <pci_device_id>11B410DE</pci_device_id>
                        <pci_bus_id>00000000:0A:00.0</pci_bus_id>
                        <pci_sub_system_id>109610DE</pci_sub_system_id>
                        <pci_gpu_link_info>
                                <pcie_gen>
                                        <max_link_gen>2</max_link_gen>
                                        <current_link_gen>2</current_link_gen>
                                </pcie_gen>
                                <link_widths>
                                        <max_link_width>16x</max_link_width>
                                        <current_link_width>16x</current_link_width>
                                </link_widths>
                        </pci_gpu_link_info>
                        <pci_bridge_chip>
                                <bridge_chip_type>N/A</bridge_chip_type>
                                <bridge_chip_fw>N/A</bridge_chip_fw>
                        </pci_bridge_chip>
                        <replay_counter>0</replay_counter>
                        <replay_rollover_counter>0</replay_rollover_counter>
                        <tx_util>N/A</tx_util>
                        <rx_util>N/A</rx_util>
                </pci>
                <fan_speed>31 %</fan_speed>
                <performance_state>P0</performance_state>
                <clocks_throttle_reasons>
                        <clocks_throttle_reason_gpu_idle>Not Active</clocks_throttle_reason_gpu_idle>
                        <clocks_throttle_reason_applications_clocks_setting>Active</clocks_throttle_reason_applications_clocks_setting>
                        <clocks_throttle_reason_sw_power_cap>Not Active</clocks_throttle_reason_sw_power_cap>
                        <clocks_throttle_reason_hw_slowdown>Not Active</clocks_throttle_reason_hw_slowdown>
                        <clocks_throttle_reason_hw_thermal_slowdown>N/A</clocks_throttle_reason_hw_thermal_slowdown>
                        <clocks_throttle_reason_hw_power_brake_slowdown>N/A</clocks_throttle_reason_hw_power_brake_slowdown>
                        <clocks_throttle_reason_sync_boost>Not Active</clocks_throttle_reason_sync_boost>
                        <clocks_throttle_reason_sw_thermal_slowdown>Not Active</clocks_throttle_reason_sw_thermal_slowdown>
                        <clocks_throttle_reason_display_clocks_setting>Not Active</clocks_throttle_reason_display_clocks_setting>
                </clocks_throttle_reasons>
                <fb_memory_usage>
                        <total>4037 MiB</total>
                        <used>11 MiB</used>
                        <free>4026 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>
                <encoder_stats>
                        <session_count>0</session_count>
                        <average_fps>0</average_fps>
                        <average_latency>0</average_latency>
                </encoder_stats>
                <fbc_stats>
                        <session_count>0</session_count>
                        <average_fps>0</average_fps>
                        <average_latency>0</average_latency>
                </fbc_stats>
                <ecc_mode>
                        <current_ecc>N/A</current_ecc>
                        <pending_ecc>N/A</pending_ecc>
                </ecc_mode>
                <ecc_errors>
                        <volatile>
                                <single_bit>
                                        <device_memory>N/A</device_memory>
                                        <register_file>N/A</register_file>
                                        <l1_cache>N/A</l1_cache>
                                        <l2_cache>N/A</l2_cache>
                                        <texture_memory>N/A</texture_memory>
                                        <texture_shm>N/A</texture_shm>
                                        <cbu>N/A</cbu>
                                        <total>N/A</total>
                                </single_bit>
                                <double_bit>
                                        <device_memory>N/A</device_memory>
                                        <register_file>N/A</register_file>
                                        <l1_cache>N/A</l1_cache>
                                        <l2_cache>N/A</l2_cache>
                                        <texture_memory>N/A</texture_memory>
                                        <texture_shm>N/A</texture_shm>
                                        <cbu>N/A</cbu>
                                        <total>N/A</total>
                                </double_bit>
                        </volatile>
                        <aggregate>
                                <single_bit>
                                        <device_memory>N/A</device_memory>
                                        <register_file>N/A</register_file>
                                        <l1_cache>N/A</l1_cache>
                                        <l2_cache>N/A</l2_cache>
                                        <texture_memory>N/A</texture_memory>
                                        <texture_shm>N/A</texture_shm>
                                        <cbu>N/A</cbu>
                                        <total>N/A</total>
                                </single_bit>
                                <double_bit>
                                        <device_memory>N/A</device_memory>
                                        <register_file>N/A</register_file>
                                        <l1_cache>N/A</l1_cache>
                                        <l2_cache>N/A</l2_cache>
                                        <texture_memory>N/A</texture_memory>
                                        <texture_shm>N/A</texture_shm>
                                        <cbu>N/A</cbu>
                                        <total>N/A</total>
                                </double_bit>
                        </aggregate>
                </ecc_errors>
                <retired_pages>
                        <multiple_single_bit_retirement>
                                <retired_count>N/A</retired_count>
                                <retired_pagelist>N/A</retired_pagelist>
                        </multiple_single_bit_retirement>
                        <double_bit_retirement>
                                <retired_count>N/A</retired_count>
                                <retired_pagelist>N/A</retired_pagelist>
                        </double_bit_retirement>
                        <pending_blacklist>N/A</pending_blacklist>
                        <pending_retirement>N/A</pending_retirement>
                </retired_pages>
                <temperature>
                        <gpu_temp>46 C</gpu_temp>
                        <gpu_temp_max_threshold>102 C</gpu_temp_max_threshold>
                        <gpu_temp_slow_threshold>97 C</gpu_temp_slow_threshold>
                        <gpu_temp_max_gpu_threshold>80 C</gpu_temp_max_gpu_threshold>
                        <memory_temp>N/A</memory_temp>
                        <gpu_temp_max_mem_threshold>N/A</gpu_temp_max_mem_threshold>
                </temperature>
                <power_readings>
                        <power_state>P0</power_state>
                        <power_management>Supported</power_management>
                        <power_draw>42.17 W</power_draw>
                        <power_limit>110.00 W</power_limit>
                        <default_power_limit>110.00 W</default_power_limit>
                        <enforced_power_limit>110.00 W</enforced_power_limit>
                        <min_power_limit>100.00 W</min_power_limit>
                        <max_power_limit>130.00 W</max_power_limit>
                </power_readings>
                <clocks>
                        <graphics_clock>771 MHz</graphics_clock>
                        <sm_clock>771 MHz</sm_clock>
                        <mem_clock>2700 MHz</mem_clock>
                        <video_clock>540 MHz</video_clock>
                </clocks>
                <applications_clocks>
                        <graphics_clock>N/A</graphics_clock>
                        <mem_clock>N/A</mem_clock>
                </applications_clocks>
                <default_applications_clocks>
                        <graphics_clock>N/A</graphics_clock>
                        <mem_clock>N/A</mem_clock>
                </default_applications_clocks>
                <max_clocks>
                        <graphics_clock>888 MHz</graphics_clock>
                        <sm_clock>888 MHz</sm_clock>
                        <mem_clock>2700 MHz</mem_clock>
                        <video_clock>540 MHz</video_clock>
                </max_clocks>
                <max_customer_boost_clocks>
                        <graphics_clock>N/A</graphics_clock>
                </max_customer_boost_clocks>
                <clock_policy>
                        <auto_boost>N/A</auto_boost>
                        <auto_boost_default>N/A</auto_boost_default>
                </clock_policy>
                <supported_clocks>N/A</supported_clocks>
                <processes>
                </processes>
                <accounted_processes>
                </accounted_processes>
        </gpu>

</nvidia_smi_log>

 

Edited by jamerperson
added context
Link to comment

@jamerperson At this point I need something else to determine what is wrong.  nvidia-smi is returning N/A which means your card doesn't support PCI RX TX utilization reporting.  So you can't use it, but it shouldn't be erroring like this.  Disabling that metric in the settings should fix your plugin display issues.  If you can I need you to do something for me to figure out what's happening.

 

In the console:

 

cd /usr/local/emhttp/plugins/gpustat/lib/
nano -c ./Nvidia.php

Scroll down to Line 254 (nano -c will show you the line numbers as you go).  It will look like this:

if ($data->pci->rx_util !== 'N/A') {
	$this->pageData['rxutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->rx_util) / 1000);
}
if ($data->pci->tx_util !== 'N/A') {
	$this->pageData['txutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->tx_util) / 1000);
}

Replace these six lines with these:

if ($data->pci->rx_util !== 'N/A') {
	var_dump($data->pci->rx_util);
	$this->pageData['rxutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->rx_util) / 1000);
}
if ($data->pci->tx_util !== 'N/A') {
	var_dump($data->pci->tx_util);
	$this->pageData['txutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->tx_util) / 1000);
}

 

Then run the following:

 

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

 

And send me the result.

 

Once you've sent it, you can reinstall the plugin to set it back to normal.

Link to comment
On 2/18/2021 at 4:04 AM, b3rs3rk said:

@jamerperson At this point I need something else to determine what is wrong.  nvidia-smi is returning N/A which means your card doesn't support PCI RX TX utilization reporting.  So you can't use it, but it shouldn't be erroring like this.  Disabling that metric in the settings should fix your plugin display issues.  If you can I need you to do something for me to figure out what's happening.

 

In the console:

 


cd /usr/local/emhttp/plugins/gpustat/lib/
nano -c ./Nvidia.php

Scroll down to Line 254 (nano -c will show you the line numbers as you go).  It will look like this:

if ($data->pci->rx_util !== 'N/A') {
	$this->pageData['rxutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->rx_util) / 1000);
}
if ($data->pci->tx_util !== 'N/A') {
	$this->pageData['txutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->tx_util) / 1000);
}

Replace these six lines with these:

if ($data->pci->rx_util !== 'N/A') {
	var_dump($data->pci->rx_util);
	$this->pageData['rxutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->rx_util) / 1000);
}
if ($data->pci->tx_util !== 'N/A') {
	var_dump($data->pci->tx_util);
	$this->pageData['txutil'] = (string)$this->roundFloat($this->stripText(' KB/s', $data->pci->tx_util) / 1000);
}

 

Then run the following:

 


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

 

And send me the result.

 

Once you've sent it, you can reinstall the plugin to set it back to normal.

image.thumb.png.94d9a6221d8b4f2328b496222468d2fa.png

I don't think it worked. I don't see anything wrong with the syntax. Although I only have extremely basic programming skills.

 

Link to comment
4 hours ago, jamerperson said:

image.thumb.png.94d9a6221d8b4f2328b496222468d2fa.png

I don't think it worked. I don't see anything wrong with the syntax. Although I only have extremely basic programming skills.

 

 

You've removed a curly brace that you shouldn't have.

Just copy the entire contents of this gist and paste it into a separate file in the same directory as gpustatus.php.  You can name it gpustatus-test.php and run it then send me the result.  Make sure PCI RX TX is still enabled when you run it.

Link to comment
9 hours ago, b3rs3rk said:

 

You've removed a curly brace that you shouldn't have.

Just copy the entire contents of this gist and paste it into a separate file in the same directory as gpustatus.php.  You can name it gpustatus-test.php and run it then send me the result.  Make sure PCI RX TX is still enabled when you run it.

@b3rs3rk after some fidldling (because for some reason the entire thing wouldn't copy and paste at once) I got this result back when running the gpustatus-test.php

 

Fatal error: Uncaught Error: Class 'gpustat\lib\Main' not found in /usr/local/emhttp/plugins/gpustat/lib/gpustatus-test.php:31
Stack trace:
#0 {main}
  thrown in /usr/local/emhttp/plugins/gpustat/lib/gpustatus-test.php on line 31

Link to comment

I honestly have no idea what I was thinking. You need to replace Nvidia.php in lib with that file. You can just move the current Nvidia.php to Nvidia.php.old and then move the new file from gist as Nvidia.php into lib. Then just run gpustatus.php like normal from the gpustat directory. My bad.

Link to comment
6 minutes ago, b3rs3rk said:

I honestly have no idea what I was thinking. You need to replace Nvidia.php in lib with that file. You can just move the current Nvidia.php to Nvidia.php.old and then move the new file from gist as Nvidia.php into lib. Then just run gpustatus.php like normal from the gpustat directory. My bad.

hopefully this is it

image.png.9fd3db54e05ed9d4d662d996607b1220.png

  • Like 1
Link to comment
  • 2 weeks later...
3 hours ago, alitech said:

hi guys

 

I am on 6.9.0 stable as of yesterday and I installed the nvidia driver however, i dont see the GPU on the main dashboard. Is there a setting I need to activate somewhere to see that?

 

I just updated too, the plugin got moved to the error tab under plugins. Mostly due to the change in driver location or because 6.9 stable isn't whitelisted as compatible.

Link to comment
14 minutes ago, Eggman1414 said:

I just updated too, the plugin got moved to the error tab under plugins. Mostly due to the change in driver location or because 6.9 stable isn't whitelisted as compatible.

Sorry, I dont see it there, can you please point it out with a screenshot?

 

Link to comment
4 hours ago, alitech said:

hi guys

 

I am on 6.9.0 stable as of yesterday and I installed the nvidia driver however, i dont see the GPU on the main dashboard. Is there a setting I need to activate somewhere to see that?

 

 

You need to re-install the plugin.  It removes itself on startup if it doesn't detect the presence of the Nvidia driver or the Intel GPU top plugin.  The 6.8.3 -> 6.9.0 upgrade removes the custom kernel driver in favor of @ich777's Nvidia driver plugin.  But my plugin didn't see that installed on first boot and uninstalled.

Edited by b3rs3rk
  • Like 1
Link to comment
51 minutes ago, Eggman1414 said:

I just updated too, the plugin got moved to the error tab under plugins. Mostly due to the change in driver location or because 6.9 stable isn't whitelisted as compatible.

 

The 6.8.3 to 6.9.0 stable update removes the custom kernel driver.  My plugin checks if you have the Nvidia or Intel GPU top utilities or driver on boot and uninstalls if you do not.  You need to install the Nvidia driver or Intel GPU Top tool from @ich777 and re-install the plugin.

  • Like 1
Link to comment
1 minute ago, b3rs3rk said:

 

The 6.8.3 to 6.9.0 stable update removes the custom kernel driver.  My plugin checks if you have the Nvidia or Intel GPU top utilities or driver on boot and uninstalls if you do not.  You need to install the Nvidia driver or Intel GPU Top tool from @ich777 and re-install the plugin.

Thank you for this. 


According to your statement on your first post, it seems like this plugin is not needed if we install the nvidia driver by itself. 

 

"6.9.0 Beta35 and up no longer require a kernel build, but now require the Nvidia plugin by @ich777."

 

So just to give you some background. I upgraded the OS yesterday to 6.9.0 stable and then proceeded to install nVidia driver plugin. Everything works well so far, I can see hardware acceleration working well. The GPU stats is the only thing that is now missing. 

 

What you are suggesting now is that we have to install your GPU stats plugin after installing the nvidia driver plugin. That will show GPU stats on the dashboard. Yes?

 

Sorry just double checking because I have broken my unraid before by installing things in the wrong order. 

Link to comment
3 minutes ago, alitech said:

What you are suggesting now is that we have to install your GPU stats plugin after installing the nvidia driver plugin. That will show GPU stats on the dashboard. Yes?

Exactly, the Nvidia-Driver or Intel-GPU-TOP are working hand in hand and the GPU Statistics Plugin has to be installed after one of the first mentioned, actually because one of the first two is needed so that the GPU Statistics Plugin can work. ;)

 

Hope that makes sense to you.

  • Like 1
Link to comment
1 minute ago, ich777 said:

Exactly, the Nvidia-Driver or Intel-GPU-TOP are working hand in hand and the GPU Statistics Plugin has to be installed after one of the first mentioned, actually because one of the first two is needed so that the GPU Statistics Plugin can work. ;)

 

Hope that makes sense to you.

Yes it does. I have a Ryzen CPU so I installed the Nvidia driver. All seems to be working fine. 


Just one thing is confusing me still as there has been a mention of kernels being overwritten. Once this plugin is installed, after all the pre-requisites discussed above. It wont continue to get overwritten every time unraid starts yes? Once this plugin is installed, its permanent? Just checking, please be patient with me


Ali

 

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.