Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PLUGIN] GPU Statistics

Featured Replies

Hi,

 

Here you have:

 

nvidia-smi -q -x -g 0 | grep clocks_
        <clocks_event_reasons>
            <clocks_event_reason_gpu_idle>Not Active</clocks_event_reason_gpu_idle>
            <clocks_event_reason_applications_clocks_setting>Not Active</clocks_event_reason_applications_clocks_setting>
            <clocks_event_reason_sw_power_cap>Not Active</clocks_event_reason_sw_power_cap>
            <clocks_event_reason_hw_slowdown>Not Active</clocks_event_reason_hw_slowdown>
            <clocks_event_reason_hw_thermal_slowdown>Not Active</clocks_event_reason_hw_thermal_slowdown>
            <clocks_event_reason_hw_power_brake_slowdown>Not Active</clocks_event_reason_hw_power_brake_slowdown>
            <clocks_event_reason_sync_boost>Not Active</clocks_event_reason_sync_boost>
            <clocks_event_reason_sw_thermal_slowdown>Not Active</clocks_event_reason_sw_thermal_slowdown>
            <clocks_event_reason_display_clocks_setting>Not Active</clocks_event_reason_display_clocks_setting>
        </clocks_event_reasons>

  • Replies 2.1k
  • Views 355.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • juan11perez
    juan11perez

    Good day, plugin also stopped working for me.   root@Unraid:/usr/local/emhttp/plugins/gpustat# cd /usr/local/emhttp/plugins/gpustat/ && php ./gpustatus.php Fatal error: Uncaught TypeE

  • I did some more work to get it to look like the CPU sidebar that comes with unraid 

  • I have created a PR for b3rs3rk's plugin to add MultiGPU support for 6.12 as Dashboard panels are different in 6.12. The PR works on pre realeases but does not provide Multi support. There are some ot

Posted Images

43 minutes ago, vmonjo said:

Hi,

 

Here you have:

 

nvidia-smi -q -x -g 0 | grep clocks_
        <clocks_event_reasons>
            <clocks_event_reason_gpu_idle>Not Active</clocks_event_reason_gpu_idle>
            <clocks_event_reason_applications_clocks_setting>Not Active</clocks_event_reason_applications_clocks_setting>
            <clocks_event_reason_sw_power_cap>Not Active</clocks_event_reason_sw_power_cap>
            <clocks_event_reason_hw_slowdown>Not Active</clocks_event_reason_hw_slowdown>
            <clocks_event_reason_hw_thermal_slowdown>Not Active</clocks_event_reason_hw_thermal_slowdown>
            <clocks_event_reason_hw_power_brake_slowdown>Not Active</clocks_event_reason_hw_power_brake_slowdown>
            <clocks_event_reason_sync_boost>Not Active</clocks_event_reason_sync_boost>
            <clocks_event_reason_sw_thermal_slowdown>Not Active</clocks_event_reason_sw_thermal_slowdown>
            <clocks_event_reason_display_clocks_setting>Not Active</clocks_event_reason_display_clocks_setting>
        </clocks_event_reasons>

Just release 2023.06.10 with fixes.

Fixed!!!!

 

Great job!

On 6/9/2023 at 7:41 AM, SimonF said:

There was an issue with cookie name that stores the location not being unique. I have created a fix in 2023.06.09

 

Thanks. I can confirm that this issue has been resolved in the latest version of the plug-in. 

Hi, how soon can we expect an update for this to be compatible with 6.12 out the box? Thanks for your fantastic work!

30 minutes ago, Zeragonii said:

Hi, how soon can we expect an update for this to be compatible with 6.12 out the box? Thanks for your fantastic work!

 

6.12 - There is another plugin called 'GPU STATISTICS' install that and remove 'GPU Stat'

2 hours ago, Zeragonii said:

Hi, how soon can we expect an update for this to be compatible with 6.12 out the box? Thanks for your fantastic work!

Install my version from app store

6 hours ago, SimonF said:

Install my version from app store


Yeah I'm a total moron, I was typing in "gpustat" wondering why it wasnt showing up.

Typed in "gpu statistics" and hey presto.. 

Thanks hahaha!

30 minutes ago, Zeragonii said:


Yeah I'm a total moron, I was typing in "gpustat" wondering why it wasnt showing up.

Typed in "gpu statistics" and hey presto.. 

Thanks hahaha!

Glad you have it working now.

On 6/10/2023 at 2:46 PM, SimonF said:

2023.06.10 should fix this for you.

Thank you !

Thanks for this cool plugin.  I just updated it yesterday to the newest version.

 

Minor issue(s), The Power Draw graph is always at 100% no matter the amount of power being used by the Intel GPU.  The numbers in watts change next to the graph, but the graph always stays at 100%.

 

Also, the Blitter Load never seems to change.  Is that measurable on my system?

 

 SuperMicro X11SCZ-F, Xeon E-2288G, with unRAID 6.12.0.  GPU Statistics 2023.06.10.

 

image.png.23205622675ccf6e2691cb2eb8ad3fc5.png

 

image.png.22a6e6223c774182e69a7fbe41a687af.png

 

root@unRAID:~# timeout -k .500 .400 intel_gpu_top -J -s 250

{
        "period": {
                "duration": 14.276773,
                "unit": "ms"
        },
        "frequency": {
                "requested": 0.000000,
                "actual": 0.000000,
                "unit": "MHz"
        },
        "interrupts": {
                "count": 0.000000,
                "unit": "irq/s"
        },
        "rc6": {
                "value": 0.000000,
                "unit": "%"
        },
        "power": {
                "GPU": 0.000000,
                "Package": 75.122702,
                "unit": "W"
        },
        "imc-bandwidth": {
                "reads": 5214.525316,
                "writes": 1257.441683,
                "unit": "MiB/s"
        },
        "engines": {
                "Render/3D/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "Blitter/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "Video/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "VideoEnhance/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                }
        },
        "clients": {

        }
}
{
        "period": {
                "duration": 262.660651,
                "unit": "ms"
        },
        "frequency": {
                "requested": 0.000000,
                "actual": 0.000000,
                "unit": "MHz"
        },
        "interrupts": {
                "count": 11.421581,
                "unit": "irq/s"
        },
        "rc6": {
                "value": 0.000000,
                "unit": "%"
        },
        "power": {
                "GPU": 0.004647,
                "Package": 37.973180,
                "unit": "W"
        },
        "imc-bandwidth": {
                "reads": 5000.416753,
                "writes": 611.634141,
                "unit": "MiB/s"
        },
        "engines": {
                "Render/3D/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "Blitter/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "Video/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                },
                "VideoEnhance/0": {
                        "busy": 0.000000,
                        "sema": 0.000000,
                        "wait": 0.000000,
                        "unit": "%"
                }
        },
        "clients": {

        }
}root@unRAID:~# 

 

root@unRAID:~# cd /usr/local/emhttp/plugins/gpustat/ && php ./gpustatus.php
Array
(
    [code] => 200
    [message] => Configuration file contains invalid settings.
    [extra] => 
)
root@unRAID:/usr/local/emhttp/plugins/gpustat#

 

MULTIGPU = "00:02.0"
TEMPFORMAT = "C"
UIREFRESH = 1
UIREFRESHINT = 1000
DISPCLOCKS = 1
DISPPCIUTIL = 1
DISPPWRDRAW = 1
DISPPWRSTATE = 1
DISPMEMUTIL = 0
DISPTEMP = 0
DISPFAN = 0
DISPENCDEC = 0
DISPTHROTTLE = 0
DISPSESSIONS = 0
DISP3DRENDER = 1
DISPBLITTER = 1
DISPVIDEO = 1
DISPVIDENH = 1
DISPINTERRUPT = 1
DISPPWRDRWSEL = "GPU"
DISPEVENT = 0
DISPVERTEX = 0
DISPTEXTURE = 0
DISPSHADEREXP = 0
DISPSEQUENCER = 0
DISPSHADERINTER = 0
DISPSCANCON = 0
DISPPRIMASSEM = 0
DISPDEPTHBLK = 0
DISPCOLORBLK = 0
DISPGFXTRANS = 0
MULTIGPUJSON = "%7B%2200%3A02.0%22%3A%7B%22id%22%3A%2200%3A02.0%22%2C%22model%22%3A%22Coffee+Lake-S+GT2+%5BUHD+Graphics+P630%5D%22%2C%22vendor%22%3A%22intel%22%2C%22guid%22%3A%220000%3A00%3A02.0%22%7D%7D"

 

Thanks again!

Edited by craigr

11 minutes ago, craigr said:
root@unRAID:~# cd /usr/local/emhttp/plugins/gpustat/ && php ./gpustatus.php
Array
(
    [code] => 200
    [message] => Configuration file contains invalid settings.
    [extra] => 
)
root@unRAID:/usr/local/emhttp/plugins/gpustat#

You need to look at gpustatusmulti.php for > 6.12

 

I do create a json file in /tmp/ with the values being passed to the panel. Will look at the bar.

 

root@computenode:/mnt/user/appdata/tasmotapm-unraid# cat /tmp/gpu*
Time = Sat, 17 Jun 2023 07:14:46 +0100
{"00:02.0":{"clock":0,"fan":"N\/A","memclock":"N\/A","memutil":"N\/A","memused":"N\/A","power":"0W","powermax":"N\/A","rxutil":"N\/A","txutil":"N\/A","temp":"N\/A","tempmax":"N\/A","util":"0%","vendor":"Intel","name":"AlderLake-S GT1","3drender":"0%","blitter":"0%","interrupts":0,"powerutil":"0%","video":"0%","videnh":"0%","panel":1},"09:00.0":{"clock":"324","fan":"30%","memclock":"324","memutil":"0%","memused":"1","power":"8W","powermax":"87","rxutil":"N\/A","txutil":"N\/A","temp":"37 \u00b0C","tempmax":"101 \u00b0C","util":"0%","vendor":"NVIDIA","name":"Quadro K4000","clockmax":"810","memclockmax":"2808","memtotal":"3018","encutil":"0%","decutil":"0%","pciemax":250,"perfstate":"P8","throttled":"Yes","thrtlrsn":" (gpu_idle)","pciegen":1,"pciegenmax":2,"pciewidth":1,"pciewidthmax":16,"sessions":0,"uuid":"GPU-ef6c0299-f1bc-7b5c-5291-7cd1a012f8bd","plexusing":false,"plexmem":0,"plexcount":0,"jellyfinusing":false,"jellyfinmem":0,"jellyfincount":0,"handbrakeusing":false,"handbrakemem":0,"handbrakecount":0,"embyusing":false,"embymem":0,"embycount":0,"tdarrusing":false,"tdarrmem":0,"tdarrcount":0,"unmanicusing":false,"unmanicmem":0,"unmaniccount":0,"dizquetvusing":false,"dizquetvmem":0,"dizquetvcount":0,"ersatztvusing":false,"ersatztvmem":0,"ersatztvcount":0,"fileflowsusing":false,"fileflowsmem":0,"fileflowscount":0,"frigateusing":false,"frigatemem":0,"frigatecount":0,"deepstackusing":false,"deepstackmem":0,"deepstackcount":0,"nsfminerusing":false,"nsfminermem":0,"nsfminercount":0,"shinobiprousing":false,"shinobipromem":0,"shinobiprocount":0,"foldinghomeusing":false,"foldinghomemem":0,"foldinghomecount":0,"appssupp":["plex","jellyfin","handbrake","emby","tdarr","unmanic","dizquetv","ersatztv","fileflows","frigate","deepstack","nsfminer","shinobipro","foldinghome"],"panel":2},"0d:00.0":{"clock":0.5,"fan":0,"memclock":0.1,"memutil":"1.2%","memused":47.51,"power":"N\/A","powermax":"N\/A","rxutil":"N\/A","txutil":"N\/A","temp":"43 \u00b0C","tempmax":105,"util":"0%","vendor":"AMD","name":"Radeon RX 6400\/6500 XT\/6500M","event":"0%","vertex":"0%","texture":"0%","shaderexp":"0%","sequencer":"0%","shaderinter":"0%","scancon":"0%","primassem":"0%","depthblk":"0%","colorblk":"0%","gfxtrans":"0.1%","transused":11.57,"memclockutil":"9.6%","clockutil":"21.6%","tempunit":"C","fanmax":5550,"voltage":0.7,"voltageunit":"V","panel":3}}
root@computenode:/mnt/user/appdata/tasmotapm-unraid# 

 

My bar is zero as below.

 

image.png

9 hours ago, SimonF said:

You need to look at gpustatusmulti.php for > 6.12

 

I do create a json file in /tmp/ with the values being passed to the panel. Will look at the bar.

 

root@computenode:/mnt/user/appdata/tasmotapm-unraid# cat /tmp/gpu*

 

I don't seem to have a tasmotapm-unraid directory or a gpustatusmulti.php file?!?

 

image.thumb.png.b0f96be64f27e99062e663cd69976230.png

25 minutes ago, craigr said:

 

I don't seem to have a tasmotapm-unraid directory or a gpustatusmulti.php file?!?

 

image.thumb.png.b0f96be64f27e99062e663cd69976230.png

plugins are in /usr/local/emhttp/plugins/

10 hours ago, SimonF said:

plugins are in /usr/local/emhttp/plugins/

 

const ES = ' ';

include 'lib/Main.php';
include 'lib/Nvidia.php';
include 'lib/Intel.php';
include 'lib/AMD.php';
include 'lib/Error.php';

use gpustat\lib\AMD;
use gpustat\lib\Main;
use gpustat\lib\Nvidia;
use gpustat\lib\Intel;
use gpustat\lib\Error;

if (!isset($gpustat_cfg)) {
    $gpustat_cfg = Main::getSettings();
}

// $gpustat_inventory should be set if called from settings page code
if (isset($gpustat_inventory) && $gpustat_inventory) {
    $gpustat_cfg['inventory'] = true;
    // Settings page looks for $gpustat_data specifically -- inventory all supported GPU types
    $gpustat_data = array_merge((new Nvidia($gpustat_cfg))->getInventorym(), (new Intel($gpustat_cfg))->getInventory(), (new AMD($gpustat_cfg))->getInventorym());
} else {


$array=json_decode($_GET['gpus'],true) ;


    $data = array() ;
    foreach ($array as $gpu) {
        $gpustat_cfg["VENDOR"] = $gpu['vendor'] ;
        $gpustat_cfg["GPUID"] = $gpu['guid'] ;

    switch ($gpu['vendor']) {
        case 'amd':
            $return=(new AMD($gpustat_cfg))->getStatistics();
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        case 'intel':
            $return=(new Intel($gpustat_cfg))->getStatistics();
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        case 'nvidia':
            $return = (new Nvidia($gpustat_cfg))->getStatistics() ;
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        default:
            print_r(Error::get(Error::CONFIG_SETTINGS_NOT_VALID));
    }
}
$json=json_encode($data) ;
#Test data
#$json='{"00:02.0":{"clock":100,"fan":50,"memclock":500,"memutil":55,"memused":55,"power":"100W","powermax":500,"rxutil":50,"txutil":60,"temp":50,"tempmax":200,"util":"40%","vendor":"Intel","name":"AlderLake-S GT1","3drender":"50%","blitter":"50%","interrupts":100,"powerutil":"10%","video":"20%","videnh":"30%","pa>
header('Content-Type: application/json');
header('Content-Length:' . ES . strlen($json));
echo $json;
file_put_contents("/tmp/gpujson","Time = ".date(DATE_RFC2822)."\n") ;
file_put_contents("/tmp/gpujson",$json."\n",FILE_APPEND) ;
}

 

1 hour ago, craigr said:

 

const ES = ' ';

include 'lib/Main.php';
include 'lib/Nvidia.php';
include 'lib/Intel.php';
include 'lib/AMD.php';
include 'lib/Error.php';

use gpustat\lib\AMD;
use gpustat\lib\Main;
use gpustat\lib\Nvidia;
use gpustat\lib\Intel;
use gpustat\lib\Error;

if (!isset($gpustat_cfg)) {
    $gpustat_cfg = Main::getSettings();
}

// $gpustat_inventory should be set if called from settings page code
if (isset($gpustat_inventory) && $gpustat_inventory) {
    $gpustat_cfg['inventory'] = true;
    // Settings page looks for $gpustat_data specifically -- inventory all supported GPU types
    $gpustat_data = array_merge((new Nvidia($gpustat_cfg))->getInventorym(), (new Intel($gpustat_cfg))->getInventory(), (new AMD($gpustat_cfg))->getInventorym());
} else {


$array=json_decode($_GET['gpus'],true) ;


    $data = array() ;
    foreach ($array as $gpu) {
        $gpustat_cfg["VENDOR"] = $gpu['vendor'] ;
        $gpustat_cfg["GPUID"] = $gpu['guid'] ;

    switch ($gpu['vendor']) {
        case 'amd':
            $return=(new AMD($gpustat_cfg))->getStatistics();
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        case 'intel':
            $return=(new Intel($gpustat_cfg))->getStatistics();
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        case 'nvidia':
            $return = (new Nvidia($gpustat_cfg))->getStatistics() ;
            $decode = json_decode($return,true);
            $decode["panel"] = $gpu['panel'] ;
            $data[$gpu["id"]] = $decode;
            break;
        default:
            print_r(Error::get(Error::CONFIG_SETTINGS_NOT_VALID));
    }
}
$json=json_encode($data) ;
#Test data
#$json='{"00:02.0":{"clock":100,"fan":50,"memclock":500,"memutil":55,"memused":55,"power":"100W","powermax":500,"rxutil":50,"txutil":60,"temp":50,"tempmax":200,"util":"40%","vendor":"Intel","name":"AlderLake-S GT1","3drender":"50%","blitter":"50%","interrupts":100,"powerutil":"10%","video":"20%","videnh":"30%","pa>
header('Content-Type: application/json');
header('Content-Length:' . ES . strlen($json));
echo $json;
file_put_contents("/tmp/gpujson","Time = ".date(DATE_RFC2822)."\n") ;
file_put_contents("/tmp/gpujson",$json."\n",FILE_APPEND) ;
}

 

cat you provide the output of cat /tmp/gpujson

root@unRAID:/usr/local/emhttp/plugins/gpustat# cat /tmp/gpujson
Time = Sat, 17 Jun 2023 23:02:17 -0500
{"00:02.0":{"clock":0,"fan":"N\/A","memclock":"N\/A","memutil":"N\/A","memused":"N\/A","power":"0W","powermax":"N\/A","rxutil":"6930.42 MB\/s","txutil":"2624.87 MB\/s","temp":"N\/A","tempmax":"N\/A","util":"0%","vendor":"Intel","name":"Coffee Lake-S GT2 [UHD Graphics P630]","3drender":"0%","blitter":"0%","interrupts":4,"powerutil":"0%","video":"0%","videnh":"0%","panel":1}}
root@unRAID:/usr/local/emhttp/plugins/gpustat#

 

Nothing running at the time.

Edited by craigr

root@unRAID:/usr/local/emhttp/plugins/gpustat# cat /tmp/gpujson
Time = Sun, 18 Jun 2023 01:07:32 -0500
{"00:02.0":{"clock":1086,"fan":"N\/A","memclock":"N\/A","memutil":"N\/A","memused":"N\/A","power":"8.7W","powermax":"N\/A","rxutil":"17841.73 MB\/s","txutil":"5069.22 MB\/s","temp":"N\/A","tempmax":"N\/A","util":"68%","vendor":"Intel","name":"Coffee Lake-S GT2 [UHD Graphics P630]","3drender":"68%","blitter":"0%","interrupts":3098,"powerutil":"100%","video":"80%","videnh":"64%","panel":1}}

 

Few transcodes running.

My power draw bar graph is suddenly working correctly.  Nothing that I know of has changed.  I have not even rebooted the server.

 

image.png.72b6e0ecaadc592d7c212a01b47cb231.png

Spoke too soon.  I tried a transcode and no matter how much power draw (0.1 - 10 w) the bar stayed at 100%.  Now with zero draw it's at 100% again.

On 6/18/2023 at 7:09 AM, craigr said:
root@unRAID:/usr/local/emhttp/plugins/gpustat# cat /tmp/gpujson
Time = Sun, 18 Jun 2023 01:07:32 -0500
{"00:02.0":{"clock":1086,"fan":"N\/A","memclock":"N\/A","memutil":"N\/A","memused":"N\/A","power":"8.7W","powermax":"N\/A","rxutil":"17841.73 MB\/s","txutil":"5069.22 MB\/s","temp":"N\/A","tempmax":"N\/A","util":"68%","vendor":"Intel","name":"Coffee Lake-S GT2 [UHD Graphics P630]","3drender":"68%","blitter":"0%","interrupts":3098,"powerutil":"100%","video":"80%","videnh":"64%","panel":1}}

 

Few transcodes running.

Playing with your values I get 100% bar.

 

change "powerutil":"100%" to 70% the bar is updated.

 

This value

On 6/17/2023 at 7:31 AM, craigr said:
     "rc6": {
                "value": 0.000000,
                "unit": "%"
        },

Is the percentage usage

 

            // According to the sparse documentation, rc6 is a percentage of how little the GPU is requesting power
            if ($this->settings['DISPPWRSTATE']) {
                if (isset($data['rc6']['value'])) {
                    $this->pageData['powerutil'] = $this->roundFloat(100 - $data['rc6']['value'], 2) . "%";
                }
            }
 

 

image.png

I'll give it a go when I get back from my business trip Thursday.

 

Thank you.

On 6/19/2023 at 12:36 PM, SimonF said:

Playing with your values I get 100% bar.

 

change "powerutil":"100%" to 70% the bar is updated.

 

Wait.  Sorry, but won't that only persist until reboot?

On 6/19/2023 at 9:17 AM, craigr said:

Spoke too soon.  I tried a transcode and no matter how much power draw (0.1 - 10 w) the bar stayed at 100%.  Now with zero draw it's at 100% again.

& @SimonF this is a common issue and is not related to the GPU Statistics plugin, this is actually caused by intel_gpu_top

 

Just issue intel_gpu_top from a terminal and you should see that it reports 0% even if no load is on the GPU (this is when it doesn't work correctly).

 

I've already reported that multiple times over on the Intel-GPU-Tools Gitlab but they can't reproduce this issue.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.