[PLUGIN] GPU Statistics


Recommended Posts

I'm having this issue too on a arc 380 card.

Statistics addon not updating, but intel_gpu_top will happily show the data in terminal.

 

GPU Statistics 2023.10.29d

Intel GPU TOP 2023.09.13

 

I'm getting some info in /var/log/phplog that might be of use.

[09-Nov-2023 19:43:26 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /usr/local/emhttp/plugins/gpustat/lib/Main.php:130
Stack trace:
#0 /usr/local/emhttp/plugins/gpustat/lib/Main.php(130): in_array('0000:83:00.0', false)
#1 /usr/local/emhttp/plugins/gpustat/lib/Intel.php(95): gpustat\lib\Main->checkVFIO('0000:83:00.0')
#2 /usr/local/emhttp/plugins/gpustat/gpustatusmulti.php(71): gpustat\lib\Intel->getStatistics()
#3 {main}
  thrown in /usr/local/emhttp/plugins/gpustat/lib/Main.php on line 130

 

Output of cat /tmp/gpujson

Time = Thu, 09 Nov 2023 19:29:22 +0100
[]

 

Edited by kaares
More details
Link to comment
24 minutes ago, kaares said:

I'm having this issue too on a arc 380 card.

Statistics addon not updating, but intel_gpu_top will happily show the data in terminal.

 

GPU Statistics 2023.10.29d

Intel GPU TOP 2023.09.13

 

I'm getting some info in /var/log/phplog that might be of use.

[09-Nov-2023 19:43:26 Europe/Berlin] PHP Fatal error:  Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /usr/local/emhttp/plugins/gpustat/lib/Main.php:130
Stack trace:
#0 /usr/local/emhttp/plugins/gpustat/lib/Main.php(130): in_array('0000:83:00.0', false)
#1 /usr/local/emhttp/plugins/gpustat/lib/Intel.php(95): gpustat\lib\Main->checkVFIO('0000:83:00.0')
#2 /usr/local/emhttp/plugins/gpustat/gpustatusmulti.php(71): gpustat\lib\Intel->getStatistics()
#3 {main}
  thrown in /usr/local/emhttp/plugins/gpustat/lib/Main.php on line 130

 

Output of cat /tmp/gpujson

Time = Thu, 09 Nov 2023 19:29:22 +0100
[]

 

Can you edit the following to see if this fixes your issue and then I will release a fix.

 

nano /usr/local/emhttp/plugins/gpustat/lib/Main.php line 130

 

to if ($files) $vfio = in_array($pciid, $files) ; else $vfio = $files ;

 

    /**
     * Checks if card is bound to VFIO
     *
     * @param string $pciid
     * @return bool $vfio
     */
    protected function checkVFIO(string $pciid)
    {
        $files = scandir("/sys/bus/pci/drivers/vfio-pci/") ;
        if ($files) $vfio = in_array($pciid, $files) ; else $vfio = $files ;
        return $vfio ;
    }

 

Link to comment

My dashboard widget no longer stays expanded.  I have get it to expand by minimizing then expanding but quickly closes.  I was able to get a screenshot and it says "GPU not available bound to VFIO or inuse in a VM." 

 

I am not passing it through and not being used by VM.  Could this be because I have unraid said to launch in GUI mode?  It has been running in GUI mode for a while not but only recently noticed that the widget no longer shows correctly.  It is still being used by Plex correctly when its needed.

 

image.png.f94ad3d54cae2b2157adcc710020e531.png

 

image.png.a492809de89791bc494bdc0244be6b6e.png

 

image.png.cc1b8627c4037cfa08941e886d6c52d4.png

 

 

Link to comment
6 hours ago, B_Sinn3d said:

My dashboard widget no longer stays expanded.  I have get it to expand by minimizing then expanding but quickly closes.  I was able to get a screenshot and it says "GPU not available bound to VFIO or inuse in a VM." 

 

I am not passing it through and not being used by VM.  Could this be because I have unraid said to launch in GUI mode?  It has been running in GUI mode for a while not but only recently noticed that the widget no longer shows correctly.  It is still being used by Plex correctly when its needed.

 

image.png.f94ad3d54cae2b2157adcc710020e531.png

 

image.png.a492809de89791bc494bdc0244be6b6e.png

 

image.png.cc1b8627c4037cfa08941e886d6c52d4.png

 

 

Which version are you using and can you provide cat /tmp/gpujson & unraid vers

 

also try ctrl + F5 in dashboard to see if that fixes.

Link to comment

I am on the latest version 2023-11-09 but when I noticed it I was on 2023-10-29.  Unraid is 6.12.4.

 

cntrl + F5 didn't help but I just cleared browser data from all time and it appears to be working now and the message is no longer showing that the GPU is not available. 

 

I appreciate you taking the time on this.

Link to comment
2 hours ago, alturismo said:

may expand your Info what you expect to see, which app is currently using your dGPU, Plex, Jelly, Emby, ... ?

 

you are sure your dGPU is currently in use ?

That is a good thought, I started a transcode in Emby and I see very little usage now. The active apps doesn't show anything, though that hasn't worked for me in a long time (I used the old plug-in before I upgraded to 6.12.4). 

Seems it is working, but the tasks I was running just aren't using the GPU as much as I thought 😛 thanks for the help!

 

image.png

  • Like 2
Link to comment
  • 3 weeks later...
6 hours ago, bogus-nationalization6850 said:

1784481717_Screenshot2023-12-05at8_49_51PM.thumb.png.fd93be94da5496999d4eb2c576ff3897.pngJust moved my usb to a different server and my gpu stats are flashing in and out, it was Nvidia now im using intel igpu, ive uninstalled the plugin, reinstalled it and selected the correct gpu, but the stats aren't displaying consistently. is there anywhere else I can look to fix this?2100739864_Screenshot2023-12-05at8_47_25PM.thumb.png.3bfcbc937f312f3b7b68a2fc15d11555.png1675292539_Screenshot2023-12-05at8_48_28PM.thumb.png.c7e02f166beeafc6b3e56d5849610ac1.png

Can you post diagnostics and also /tmp/gpujson?

 

and run

timeout -k .500 .600 intel_gpu_top -J -s 250 -d pci:slot=0000:00:02.0

Link to comment

Something odd happens when I add a second GPU to my UNRAID server.

Without a dGPU plugged in (Radeon WX4100) the GPU stats plugin display the Intel iGPU stats.

When I plug the dGPU in, the stats plugin refuses to show the iGPU stats but displays the dGPU stats.

Both GPUs are selectable in the drop-down menu.

Link to comment
44 minutes ago, mikeyosm said:

Something odd happens when I add a second GPU to my UNRAID server.

Without a dGPU plugged in (Radeon WX4100) the GPU stats plugin display the Intel iGPU stats.

When I plug the dGPU in, the stats plugin refuses to show the iGPU stats but displays the dGPU stats.

Both GPUs are selectable in the drop-down menu.

Also can you include  cat /tmp/gpujson 

Link to comment
56 minutes ago, SimonF said:

Also can you include  cat /tmp/gpujson 

Sure - 

 

cat /tmp/gpujson
Time = Wed, 06 Dec 2023 19:16:50 +0000
{"00:02.0":{"clock":"N\/A","fan":"N\/A","memclock":"N\/A","memutil":"N\/A","memused":"N\/A","power":"N\/A","powermax":"N\/A","rxutil":"N\/A","txutil":"N\/A","temp":"N\/A","tempmax":"N\/A","util":"N\/A","error":[{"code":301,"message":"Vendor command returned no data.","extra":""}],"vfio":false,"vfiochk":false,"vfiochkid":"0000:00:02.0","panel":1},"02:00.0":{"clock":0.21,"fan":"N\/A","memclock":0.3,"memutil":"0.1%","memused":5.69,"power":"N\/A","powermax":"N\/A","rxutil":"N\/A","txutil":"N\/A","temp":"32 \u00b0C","tempmax":99,"util":"0%","vendor":"AMD","name":"Radeon Pro WX 4100","event":"0%","vertex":"0%","texture":"0%","shaderexp":"0%","sequencer":"0%","shaderinter":"0%","scancon":"0%","primassem":"0%","depthblk":"0%","colorblk":"0%","gfxtrans":"0%","transused":6.39,"memclockutil":"20%","clockutil":"17.8%","tempunit":"C","voltage":0.72,"voltageunit":"V","vfio":false,"vfiochk":false,"vfiochkid":"0000:02:00.0","panel":2}}

 

image.png.10dc39a4d668386cb067cd80ea43fd56.pngimage.thumb.png.0e47de20b368876297af52a4990dbc96.png

diagnostics-20231206-1917.zip

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.