It is currently March 29th, 2024, 7:29 am

Monitoring every hardware GPU usage with the UsageMonitor plugin

General topics related to Rainmeter.
Andearoid
Posts: 7
Joined: September 1st, 2018, 10:01 pm

Monitoring every hardware GPU usage with the UsageMonitor plugin

Post by Andearoid »

Hello,

Is someone able to get GPU's loads detail ? something showing like that :
GPU 0 - Intel HD Graphics 630
3D = 10.0%
Video Decode = 45.0%

GPU 1 - NVidia Geforce GTX 1050
3D = 2.0%
Video Encode = 83.0%
Video Decode = 0.0%
This stats are available via GPU-Z. Or via the Windows 10's Task Manager (if Windows is >= Fall Creators and the video display driver >= WDDM 2.0).



I tried with UsageMonitor plugin but I'm not able to set a list of instance. When a GPU task start a list of instance is dynamicaly create in Perfmon. And create a random Pid value for each instance like this :

pid_9524_luid_0x00000000_0x000095CA_phys_0_eng_0_engtype_3D

I understand "engtype_3D" means that's a 3D instance.
And "0x000095CA" is my NVidia video card.

Or as another example :
pid_14904_luid_0x00000000_0x0000A18D_phys_0_eng_4_engtype_VideoDecode

"engtype_VideoDecode" is a video instance.
And "0x0000A18D" is my Intel's GPU.


So the measure to get the global 3D load of my Intel HD Graphics 630 should be something like that :

Code: Select all

[GPU03D]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Name=SUM(pid_*_luid_0x00000000_0x0000A18D_phys_*_eng_*_engtype_3D)

[GPU03D_Display]
Meter=String
Text=[GPU:1]%
Or the measure to get the global video encode load of my Geforce 1050 should be something like that :

Code: Select all

[GPU1VideoEncode]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Name=SUM(pid_*_luid_0x00000000_0x000095CA_phys_*_eng_*_engtype_VideoEncode)

[GPU1VideoEncode_Display]
Meter=String
Text=[GPU:1]%
I don't know if UsageMonitor plugin can do that. Or if I have to think the problem differently to get this values from Perfmon. I tried some GPU plugin's but usages values are not expanded and they don't support Intel GPUs.


Any helps or ideas are welcome :17flag
Last edited by Andearoid on September 4th, 2018, 11:39 pm, edited 1 time in total.
Andearoid
Posts: 7
Joined: September 1st, 2018, 10:01 pm

Re: Monitoring every hardware GPU usage with the UsageMonitor plugin

Post by Andearoid »

Finally here is what I did.

At GPU meter's start, I search the GPU signature I want to monitor with UsageMonitor. I grab this information in the GPU Local Adapter Memory and save the full signature (ex: 0x0000A05D) as variable.

I seen the GPU signature used by Perfmon is renewed after each Windows restart. It's not always the same. But my Nvidia adapter always start by "0x00009" and my Intel GPU always start by "0x0000A".

Then I monitor the ten first process that using GPUs and I filter them. I only keep processes having the GPU signature and I sort them by job : 3D usage, Video Encoding, Video Decoding. I also keep the Copy and Compute usages because it seems interesting to monitor this loads on my Nvidia video card.

And I make the sum of loads for all processes by kind of job to get a detailled GPU charge. It's usefull because your GPU can reach 99% of charge in video decoding and display a global load of 30%. Todays GPUs are not just good for video gaming.

I think monitoring the ten first processes is enough. Because we have rarely more than ten threads using our GPUs at the same time.
Andearoid
Posts: 7
Joined: September 1st, 2018, 10:01 pm

Re: Monitoring every hardware GPU usage with the UsageMonitor plugin

Post by Andearoid »

Here is the source code of my GPU meter. It works pretty well with my Intel HD Graphics and Nvidia Geforce cards. But I didn't test with other devices.

For testing, all you have to do is set your GPU signature by changing the value of IDVideoAdapterSearch=0x00009 by your GPU value.

It should be easy to add more process monitors (if necessary). The meter show many value for debug. You will need to hide/remove some of them to make a beautiful skin. Probably code could be optimized. I just started with Rainmeter on last sunday.

Code: Select all


[Rainmeter]
Update=1000
;AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[AllStyle]
FontColor=255,255,255
FontFace=Tahoma
FontSize=8
AntiAlias=1
DynamicVariables=1

[Variables]
IDVideoAdapterSearch=0x00009
IDVideoAdapter=NA

GPU3D_1=0.00
GPU3D_2=0.00
GPU3D_3=0.00
GPU3D_4=0.00
GPU3D_5=0.00
GPU3D_6=0.00
GPU3D_7=0.00
GPU3D_8=0.00
GPU3D_9=0.00
GPU3D_10=0.00

GPUVideoDecode_1=0.00
GPUVideoDecode_2=0.00
GPUVideoDecode_3=0.00
GPUVideoDecode_4=0.00
GPUVideoDecode_5=0.00
GPUVideoDecode_6=0.00
GPUVideoDecode_7=0.00
GPUVideoDecode_8=0.00
GPUVideoDecode_9=0.00
GPUVideoDecode_10=0.00

GPUVideoEncode_1=0.00
GPUVideoEncode_2=0.00
GPUVideoEncode_3=0.00
GPUVideoEncode_4=0.00
GPUVideoEncode_5=0.00
GPUVideoEncode_6=0.00
GPUVideoEncode_7=0.00
GPUVideoEncode_8=0.00
GPUVideoEncode_9=0.00
GPUVideoEncode_10=0.00

GPUCopy_1=0.00
GPUCopy_2=0.00
GPUCopy_3=0.00
GPUCopy_4=0.00
GPUCopy_5=0.00
GPUCopy_6=0.00
GPUCopy_7=0.00
GPUCopy_8=0.00
GPUCopy_9=0.00
GPUCopy_10=0.00

GPUCompute_1=0.00
GPUCompute_2=0.00
GPUCompute_3=0.00
GPUCompute_4=0.00
GPUCompute_5=0.00
GPUCompute_6=0.00
GPUCompute_7=0.00
GPUCompute_8=0.00
GPUCompute_9=0.00
GPUCompute_10=0.00

----- Measure Adapter ------

[MeasureVideoAdapter_1]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Local Adapter Memory
Counter=Local Usage
Index=1
RegExpSubstitute=1
Substitute="^(.{16})(.{10})(.*$)":"\2"

IfMatch=^#IDVideoAdapterSearch#
IfMatchAction=[!SetVariable "IDVideoAdapter" "[MeasureVideoAdapter_1]"]
IfMatchMode=1

[MeasureVideoAdapter_2]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Local Adapter Memory
Counter=Local Usage
Index=2
RegExpSubstitute=1
Substitute="^(.{16})(.{10})(.*$)":"\2"

IfMatch=^#IDVideoAdapterSearch#
IfMatchAction=[!SetVariable "IDVideoAdapter" "[MeasureVideoAdapter_2]"]
IfMatchMode=1

;[MeasureVideoAdapter_3]
;Measure=Plugin
;Plugin=UsageMonitor
;Category=GPU Local Adapter Memory
;Counter=Local Usage
;Index=3
;RegExpSubstitute=1
;Substitute="^(.{16})(.{10})(.*$)":"\2"

;IfMatch=^#IDVideoAdapterSearch#
;IfMatchAction=[!SetVariable "IDVideoAdapter" "[MeasureVideoAdapter_3]"]
;IfMatchMode=1

----- Measure GPU ------

[MeasureProcess_1]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=1
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_1 Text "[MeasureProcess_1] = [MeasureProcess_1:2]%"],[!SetVariable "GPU3D_1" "[MeasureProcess_1:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_1 Text "None = 0.00%"],[!SetVariable "GPU3D_1" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_1 Text "[MeasureProcess_1] = [MeasureProcess_1:2]%"],[!SetVariable "GPUVideoDecode_1" "[MeasureProcess_1:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_1 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_1" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_1 Text "[MeasureProcess_1] = [MeasureProcess_1:2]%"],[!SetVariable "GPUVideoEncode_1" "[MeasureProcess_1:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_1 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_1" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_1 Text "[MeasureProcess_1] = [MeasureProcess_1:2]%"],[!SetVariable "GPUCopy_1" "[MeasureProcess_1:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_1 Text "None = 0.00%"],[!SetVariable "GPUCopy_1" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_1 Text "[MeasureProcess_1] = [MeasureProcess_1:2]%"],[!SetVariable "GPUCompute_1" "[MeasureProcess_1:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_1 Text "None = 0.00%"],[!SetVariable "GPUCompute_1" "0.00"]
IfMatchMode5=1

[MeasureProcess_2]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=2
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_2 Text "[MeasureProcess_2] = [MeasureProcess_2:2]%"],[!SetVariable "GPU3D_2" "[MeasureProcess_2:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_2 Text "None = 0.00%"],[!SetVariable "GPU3D_2" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_2 Text "[MeasureProcess_2] = [MeasureProcess_2:2]%"],[!SetVariable "GPUVideoDecode_2" "[MeasureProcess_2:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_2 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_2" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_2 Text "[MeasureProcess_2] = [MeasureProcess_2:2]%"],[!SetVariable "GPUVideoEncode_2" "[MeasureProcess_2:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_2 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_2" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_2 Text "[MeasureProcess_2] = [MeasureProcess_2:2]%"],[!SetVariable "GPUCopy_2" "[MeasureProcess_2:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_2 Text "None = 0.00%"],[!SetVariable "GPUCopy_2" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_2 Text "[MeasureProcess_2] = [MeasureProcess_2:2]%"],[!SetVariable "GPUCompute_2" "[MeasureProcess_2:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_2 Text "None = 0.00%"],[!SetVariable "GPUCompute_2" "0.00"]
IfMatchMode5=1

[MeasureProcess_3]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=3
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_3 Text "[MeasureProcess_3] = [MeasureProcess_3:2]%"],[!SetVariable "GPU3D_3" "[MeasureProcess_3:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_3 Text "None = 0.00%"],[!SetVariable "GPU3D_3" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_3 Text "[MeasureProcess_3] = [MeasureProcess_3:2]%"],[!SetVariable "GPUVideoDecode_3" "[MeasureProcess_3:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_3 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_3" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_3 Text "[MeasureProcess_3] = [MeasureProcess_3:2]%"],[!SetVariable "GPUVideoEncode_3" "[MeasureProcess_3:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_3 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_3" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_3 Text "[MeasureProcess_3] = [MeasureProcess_3:2]%"],[!SetVariable "GPUCopy_3" "[MeasureProcess_3:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_3 Text "None = 0.00%"],[!SetVariable "GPUCopy_3" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_3 Text "[MeasureProcess_3] = [MeasureProcess_3:2]%"],[!SetVariable "GPUCompute_3" "[MeasureProcess_3:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_3 Text "None = 0.00%"],[!SetVariable "GPUCompute_3" "0.00"]
IfMatchMode5=1

[MeasureProcess_4]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=4
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_4 Text "[MeasureProcess_4] = [MeasureProcess_4:2]%"],[!SetVariable "GPU3D_4" "[MeasureProcess_4:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_4 Text "None = 0.00%"],[!SetVariable "GPU3D_4" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_4 Text "[MeasureProcess_4] = [MeasureProcess_4:2]%"],[!SetVariable "GPUVideoDecode_4" "[MeasureProcess_4:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_4 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_4" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_4 Text "[MeasureProcess_4] = [MeasureProcess_4:2]%"],[!SetVariable "GPUVideoEncode_4" "[MeasureProcess_4:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_4 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_4" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_4 Text "[MeasureProcess_4] = [MeasureProcess_4:2]%"],[!SetVariable "GPUCopy_4" "[MeasureProcess_4:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_4 Text "None = 0.00%"],[!SetVariable "GPUCopy_4" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_4 Text "[MeasureProcess_4] = [MeasureProcess_4:2]%"],[!SetVariable "GPUCompute_4" "[MeasureProcess_4:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_4 Text "None = 0.00%"],[!SetVariable "GPUCompute_4" "0.00"]
IfMatchMode5=1

[MeasureProcess_5]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=5
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_5 Text "[MeasureProcess_5] = [MeasureProcess_5:2]%"],[!SetVariable "GPU3D_5" "[MeasureProcess_5:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_5 Text "None = 0.00%"],[!SetVariable "GPU3D_5" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_5 Text "[MeasureProcess_5] = [MeasureProcess_5:2]%"],[!SetVariable "GPUVideoDecode_5" "[MeasureProcess_5:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_5 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_5" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_5 Text "[MeasureProcess_5] = [MeasureProcess_5:2]%"],[!SetVariable "GPUVideoEncode_5" "[MeasureProcess_5:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_5 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_5" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_5 Text "[MeasureProcess_5] = [MeasureProcess_5:2]%"],[!SetVariable "GPUCopy_5" "[MeasureProcess_5:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_5 Text "None = 0.00%"],[!SetVariable "GPUCopy_5" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_5 Text "[MeasureProcess_5] = [MeasureProcess_5:2]%"],[!SetVariable "GPUCompute_5" "[MeasureProcess_5:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_5 Text "None = 0.00%"],[!SetVariable "GPUCompute_5" "0.00"]
IfMatchMode5=1

[MeasureProcess_6]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=6
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_6 Text "[MeasureProcess_6] = [MeasureProcess_6:2]%"],[!SetVariable "GPU3D_6" "[MeasureProcess_6:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_6 Text "None = 0.00%"],[!SetVariable "GPU3D_6" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_6 Text "[MeasureProcess_6] = [MeasureProcess_6:2]%"],[!SetVariable "GPUVideoDecode_6" "[MeasureProcess_6:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_6 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_6" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_6 Text "[MeasureProcess_6] = [MeasureProcess_6:2]%"],[!SetVariable "GPUVideoEncode_6" "[MeasureProcess_6:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_6 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_6" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_6 Text "[MeasureProcess_6] = [MeasureProcess_6:2]%"],[!SetVariable "GPUCopy_6" "[MeasureProcess_6:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_6 Text "None = 0.00%"],[!SetVariable "GPUCopy_6" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_6 Text "[MeasureProcess_6] = [MeasureProcess_6:2]%"],[!SetVariable "GPUCompute_6" "[MeasureProcess_6:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_6 Text "None = 0.00%"],[!SetVariable "GPUCompute_6" "0.00"]
IfMatchMode5=1

[MeasureProcess_7]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=7
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_7 Text "[MeasureProcess_7] = [MeasureProcess_7:2]%"],[!SetVariable "GPU3D_7" "[MeasureProcess_7:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_7 Text "None = 0.00%"],[!SetVariable "GPU3D_7" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_7 Text "[MeasureProcess_7] = [MeasureProcess_7:2]%"],[!SetVariable "GPUVideoDecode_7" "[MeasureProcess_7:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_7 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_7" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_7 Text "[MeasureProcess_7] = [MeasureProcess_7:2]%"],[!SetVariable "GPUVideoEncode_7" "[MeasureProcess_7:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_7 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_7" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_7 Text "[MeasureProcess_7] = [MeasureProcess_7:2]%"],[!SetVariable "GPUCopy_7" "[MeasureProcess_7:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_7 Text "None = 0.00%"],[!SetVariable "GPUCopy_7" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_7 Text "[MeasureProcess_7] = [MeasureProcess_7:2]%"],[!SetVariable "GPUCompute_7" "[MeasureProcess_7:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_7 Text "None = 0.00%"],[!SetVariable "GPUCompute_7" "0.00"]
IfMatchMode5=1

[MeasureProcess_8]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=8
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_8 Text "[MeasureProcess_8] = [MeasureProcess_8:2]%"],[!SetVariable "GPU3D_8" "[MeasureProcess_8:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_8 Text "None = 0.00%"],[!SetVariable "GPU3D_8" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_8 Text "[MeasureProcess_8] = [MeasureProcess_8:2]%"],[!SetVariable "GPUVideoDecode_8" "[MeasureProcess_8:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_8 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_8" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_8 Text "[MeasureProcess_8] = [MeasureProcess_8:2]%"],[!SetVariable "GPUVideoEncode_8" "[MeasureProcess_8:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_8 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_8" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_8 Text "[MeasureProcess_8] = [MeasureProcess_8:2]%"],[!SetVariable "GPUCopy_8" "[MeasureProcess_8:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_8 Text "None = 0.00%"],[!SetVariable "GPUCopy_8" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_8 Text "[MeasureProcess_8] = [MeasureProcess_8:2]%"],[!SetVariable "GPUCompute_8" "[MeasureProcess_8:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_8 Text "None = 0.00%"],[!SetVariable "GPUCompute_8" "0.00"]
IfMatchMode5=1

[MeasureProcess_9]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=9
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_9 Text "[MeasureProcess_9] = [MeasureProcess_9:2]%"],[!SetVariable "GPU3D_9" "[MeasureProcess_9:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_9 Text "None = 0.00%"],[!SetVariable "GPU3D_9" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_9 Text "[MeasureProcess_9] = [MeasureProcess_9:2]%"],[!SetVariable "GPUVideoDecode_9" "[MeasureProcess_9:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_9 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_9" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_9 Text "[MeasureProcess_9] = [MeasureProcess_9:2]%"],[!SetVariable "GPUVideoEncode_9" "[MeasureProcess_9:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_9 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_9" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_9 Text "[MeasureProcess_9] = [MeasureProcess_9:2]%"],[!SetVariable "GPUCopy_9" "[MeasureProcess_9:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_9 Text "None = 0.00%"],[!SetVariable "GPUCopy_9" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_9 Text "[MeasureProcess_9] = [MeasureProcess_9:2]%"],[!SetVariable "GPUCompute_9" "[MeasureProcess_9:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_9 Text "None = 0.00%"],[!SetVariable "GPUCompute_9" "0.00"]
IfMatchMode5=1

[MeasureProcess_10]
Measure=Plugin
Plugin=UsageMonitor
Category=GPU Engine
Counter=Utilization Percentage
Index=10
DynamicVariables=1

IfMatch=(?=.*#IDVideoAdapter#.*)(?=^.*_3D$)
IfMatchAction=[!SetOption MeterGPU3D_10 Text "[MeasureProcess_10] = [MeasureProcess_10:2]%"],[!SetVariable "GPU3D_10" "[MeasureProcess_10:2]"]
IfNotMatchAction=[!SetOption MeterGPU3D_10 Text "None = 0.00%"],[!SetVariable "GPU3D_10" "0.00"]
IfMatchMode=1

IfMatch2=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoDecode$)
IfMatchAction2=[!SetOption MeterGPUVideoDecode_10 Text "[MeasureProcess_10] = [MeasureProcess_10:2]%"],[!SetVariable "GPUVideoDecode_10" "[MeasureProcess_10:2]"]
IfNotMatchAction2=[!SetOption MeterGPUVideoDecode_10 Text "None = 0.00%"],[!SetVariable "GPUVideoDecode_10" "0.00"]
IfMatchMode2=1

IfMatch3=(?=.*#IDVideoAdapter#.*)(?=^.*_VideoEncode$)
IfMatchAction3=[!SetOption MeterGPUVideoEncode_10 Text "[MeasureProcess_10] = [MeasureProcess_10:2]%"],[!SetVariable "GPUVideoEncode_10" "[MeasureProcess_10:2]"]
IfNotMatchAction3=[!SetOption MeterGPUVideoEncode_10 Text "None = 0.00%"],[!SetVariable "GPUVideoEncode_10" "0.00"]
IfMatchMode3=1

IfMatch4=(?=.*#IDVideoAdapter#.*)(?=^.*_Copy$)
IfMatchAction4=[!SetOption MeterGPUCopy_10 Text "[MeasureProcess_10] = [MeasureProcess_10:2]%"],[!SetVariable "GPUCopy_10" "[MeasureProcess_10:2]"]
IfNotMatchAction4=[!SetOption MeterGPUCopy_10 Text "None = 0.00%"],[!SetVariable "GPUCopy_10" "0.00"]
IfMatchMode4=1

IfMatch5=(?=.*#IDVideoAdapter#.*)(?=^.*_Compute_[0-1]$)
IfMatchAction5=[!SetOption MeterGPUCompute_10 Text "[MeasureProcess_10] = [MeasureProcess_10:2]%"],[!SetVariable "GPUCompute_10" "[MeasureProcess_10:2]"]
IfNotMatchAction5=[!SetOption MeterGPUCompute_10 Text "None = 0.00%"],[!SetVariable "GPUCompute_10" "0.00"]
IfMatchMode5=1

[MeasureGPU3D_Total]
Measure=Calc
Formula=#GPU3D_1# + #GPU3D_2# + #GPU3D_3# + #GPU3D_4# + #GPU3D_5# + #GPU3D_6# + #GPU3D_7# + #GPU3D_8# + #GPU3D_9# + #GPU3D_10#
DynamicVariables=1

[MeasureGPU3D_Bar]
Measure=Calc
Formula=[MeasureGPU3D_Total] / 100
DynamicVariables=1

[MeasureGPUVideoDecode_Total]
Measure=Calc
Formula=#GPUVideoDecode_1# + #GPUVideoDecode_2# + #GPUVideoDecode_3# + #GPUVideoDecode_4# + #GPUVideoDecode_5# + #GPUVideoDecode_6# + #GPUVideoDecode_7# + #GPUVideoDecode_8# + #GPUVideoDecode_9# + #GPUVideoDecode_10#
DynamicVariables=1

[MeasureGPUVideoDecode_Bar]
Measure=Calc
Formula=[MeasureGPUVideoDecode_Total] / 100
DynamicVariables=1

[MeasureGPUVideoEncode_Total]
Measure=Calc
Formula=#GPUVideoEncode_1# + #GPUVideoEncode_2# + #GPUVideoEncode_3# + #GPUVideoEncode_4# + #GPUVideoEncode_5# + #GPUVideoEncode_6# + #GPUVideoEncode_7# + #GPUVideoEncode_8# + #GPUVideoEncode_9# + #GPUVideoEncode_10#
DynamicVariables=1

[MeasureGPUVideoEncode_Bar]
Measure=Calc
Formula=[MeasureGPUVideoEncode_Total] / 100
DynamicVariables=1

[MeasureGPUCopy_Total]
Measure=Calc
Formula=#GPUCopy_1# + #GPUCopy_2# + #GPUCopy_3# + #GPUCopy_4# + #GPUCopy_5# + #GPUCopy_6# + #GPUCopy_7# + #GPUCopy_8# + #GPUCopy_9# + #GPUCopy_10#
DynamicVariables=1

[MeasureGPUCopy_Bar]
Measure=Calc
Formula=[MeasureGPUCopy_Total] / 100
DynamicVariables=1

[MeasureGPUCompute_Total]
Measure=Calc
Formula=#GPUCompute_1# + #GPUCompute_2# + #GPUCompute_3# + #GPUCompute_4# + #GPUCompute_5# + #GPUCompute_6# + #GPUCompute_7# + #GPUCompute_8# + #GPUCompute_9# + #GPUCompute_10#
DynamicVariables=1

[MeasureGPUCompute_Bar]
Measure=Calc
Formula=[MeasureGPUCompute_Total] / 100
DynamicVariables=1


------ Adapter -----

[MeterVideoAdapter_1]
Meter=String
Y=3R
MeterStyle=AllStyle
Text="ID1 = [MeasureVideoAdapter_1]"

[MeterVideoAdapter_2]
Meter=String
Y=3R
MeterStyle=AllStyle
Text="ID2 = [MeasureVideoAdapter_2]"

[MeterVideoAdapter_3]
Meter=String
Y=3R
MeterStyle=AllStyle
Text="ID3 = [MeasureVideoAdapter_3]"

[MeterVideoAdapterVar]
Meter=String
Y=3R
MeterStyle=AllStyle
Text="Video Adapter = #IDVideoAdapter#"

------- 3D ------

[MeterGPU3D_1]
Meter=String
Y=6R
MeterStyle=AllStyle

[MeterGPU3D_2]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_3]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_4]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_5]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_6]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_7]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_8]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_9]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_10]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPU3D_Bar]
Meter=Bar
MeasureName=MeasureGPU3D_Bar
Y=3R
W=200
H=10
BarColor=255,255,255,255
SolidColor=255,255,255,50
BarOrientation=Horizontal
AntiAlias=1

[MeterGPU3D_Total]
Meter=String
Y=3R
NumOfDecimals=2
Text="Total 3D = [MeasureGPU3D_Total]%"
MeterStyle=AllStyle

------ Video Decode -----

[MeterGPUVideoDecode_1]
Meter=String
Y=10R
MeterStyle=AllStyle

[MeterGPUVideoDecode_2]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_3]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_4]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_5]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_6]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_7]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_8]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_9]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_10]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoDecode_Bar]
Meter=Bar
MeasureName=MeasureGPUVideoDecode_Bar
Y=3R
W=200
H=10
BarColor=255,255,255,255
SolidColor=255,255,255,50
BarOrientation=Horizontal
AntiAlias=1

[MeterGPUVideoDecode_Total]
Meter=String
Y=3R
NumOfDecimals=2
Text="Total Video Decode = [MeasureGPUVideoDecode_Total]%"
MeterStyle=AllStyle

------ Video Encode -----

[MeterGPUVideoEncode_1]
Meter=String
Y=10R
MeterStyle=AllStyle

[MeterGPUVideoEncode_2]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_3]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_4]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_5]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_6]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_7]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_8]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_9]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_10]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUVideoEncode_Bar]
Meter=Bar
MeasureName=MeasureGPUVideoEncode_Bar
Y=3R
W=200
H=10
BarColor=255,255,255,255
SolidColor=255,255,255,50
BarOrientation=Horizontal
AntiAlias=1

[MeterGPUVideoEncode_Total]
Meter=String
Y=3R
NumOfDecimals=2
Text="Total Video Encode = [MeasureGPUVideoEncode_Total]%"
MeterStyle=AllStyle

------ Copy -----

[MeterGPUCopy_1]
Meter=String
Y=10R
MeterStyle=AllStyle

[MeterGPUCopy_2]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_3]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_4]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_5]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_6]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_7]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_8]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_9]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_10]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCopy_Bar]
Meter=Bar
MeasureName=MeasureGPUCopy_Bar
Y=3R
W=200
H=10
BarColor=255,255,255,255
SolidColor=255,255,255,50
BarOrientation=Horizontal
AntiAlias=1

[MeterGPUCopy_Total]
Meter=String
Y=3R
NumOfDecimals=2
Text="Total Copy = [MeasureGPUCopy_Total]%"
MeterStyle=AllStyle

------ Compute -----

[MeterGPUCompute_1]
Meter=String
Y=10R
MeterStyle=AllStyle

[MeterGPUCompute_2]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_3]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_4]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_5]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_6]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_7]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_8]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_9]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_10]
Meter=String
Y=3R
MeterStyle=AllStyle

[MeterGPUCompute_Bar]
Meter=Bar
MeasureName=MeasureGPUCompute_Bar
Y=3R
W=200
H=10
BarColor=255,255,255,255
SolidColor=255,255,255,50
BarOrientation=Horizontal
AntiAlias=1

[MeterGPUCompute_Total]
Meter=String
Y=3R
NumOfDecimals=2
Text="Total Compute = [MeasureGPUCompute_Total]%"
MeterStyle=AllStyle