forked from b3rs3rk/gpustat-unraid
-
Notifications
You must be signed in to change notification settings - Fork 5
/
gpustat-dev.plg
284 lines (235 loc) · 8.66 KB
/
gpustat-dev.plg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "gpustat">
<!ENTITY author "b3rs3rk">
<!ENTITY version "2023.10.08">
<!ENTITY launch "Settings/GPUStatSettings">
<!ENTITY gitURL "https://raw.githubusercontent.com/SimonFair/&name;-unraid/master">
<!ENTITY pluginURL "&gitURL;/&name;.plg">
<!ENTITY pkgURL "&gitURL;/pkg">
<!ENTITY plgPATH "/boot/config/plugins/&name;">
<!ENTITY plgNAME "&name;-&version;-x86_64">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]>
<PLUGIN
name="&name;"
author="&author;"
version="&version;"
min="6.7.1"
support="https://forums.unraid.net/topic/89453-plugin-gpu-statistics/"
icon="icon-hardware"
launch="&launch;"
pluginURL="&pluginURL;"
>
<!--
MIT License
Copyright (c) 2020-2022 b3rs3rk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<CHANGES>
###2023-10-08
- Add VFIO detection support and hide metrics.
###2023-10-06
- Show model number if GeForce card.
###2023-09-07
- Fix for new Intel_gpu_top
###2023-06-10
- Fixes for new NVidia Driver. Power draw and Throttling.
###2023-06-09
- Fix location retention issue when moving panels. Note this will reset locations and will need to be move to the required location.
###2023-05-01
- Set default for refresh to 30 seconds for new installs.
###2023-04-12a
- Fix for iGPUs call Display Controller.
###2023-03-27
- Fix apply for Multilanguage.
###2023-03-21a
- Fix GPU removal if none selected.
- Fix Show only GPU if one panel selected rather than GPU1 as title
###2022-11-30
- Fix case sensitivity in parent app detection preventing matches
- Fix parent pid command so that it correctly pulls the PPID field
- Fix string literal issue with parent command awk
###2022-11-29
- Fix issue with parent PID causing plugin to fail
###2022-11-23
- Add parent process checking for app detection
- #40 Add Frigate app detection
- #41 Add FileFlows app detection
- #42 Add ErsatzTV app detection
- #44 Attempt to fix Intel monitoring issues in 6.11
###2022-02-22
- #35 Fix jellyfin app detection looking for the wrong image path
###2022-02-20
- PR #30 Add Shinobi Pro app detection for Nvidia (thanks @corgan2222!)
- PR #30 Add nsfminer app detection for Nvidia (thanks @corgan2222!)
- #32 Reactivate Emby app detection for Nvidia with specific emby command requirement (may not work for all containers)
- #33 Add Folding@Home app detection
- Loop application image display instead of repetitive HTML
###2021-04-24
- Add DizqueTV app detection (NVIDIA) #25
- Add deepstack app detection (NVIDIA) #26
###2021-03-28
- Fix for new Intel GPU Top not outputting proper JSON (backwards compatible)
- Add Unmanic app detection
- Refines app detection to allow argument searching instead of just the base command from nvidia-smi
###2021-03-25
- [RELEASE] AMD Sensor Support
* Implement lm-sensors support
* Adds dashboard output for Temperature (APU/GPU)
* Adds dashboard output for Power Draw and Fan Utilization (GPU only)
###2021-03-19
- [RELEASE] AMD GPU Support
* AMD GPU Support via RadeonTop Plugin by @ich777
* Handbrake App Detection (NVIDIA) #21
* Tdarr App Detection (NVIDIA) #19
* GPU Long name reduction #20
###2021-02-21
- [RELEASE] Various fixes and slight improvements
* Fix for Chrome showing active application icons stretched vertically (NVIDIA) - #17
* Fix for dashboard render issues relating to cards that don't support PCI utilization metrics (NVIDIA)
* Move total sessions display to dashboard header to avoid confusion
* Add hover (alt) to application icons so that individual app processes count and memory usage will be displayed
###2021-01-21
- Fix plugin errors on boot
* Switch pre-install script from php to bash
###2021-01-20
- [RELEASE] Basic App Support
* Fix PCI Util bug with older Nvidia GPUs
* Make metric collections settings deterministic
* Refactor error methodology
* Segmentation of scripts and styles from page code
* Refactor dashboard update code (replaced setTimeout recursion)
###2021-01-17
- [RELEASE] Various fixes
* Implement PCI Utilization slider for NVIDIA
* Fix issue with plugin not installing on boot
###2021-01-15
- Fix for default settings fiasco
###2021-01-13
- [RELEASE] Implement iGPU Support
* Slight Nvidia changes to reduce plugin size with all metrics enabled
* Add PCI/IMC Bus Utilization for NVIDIA/Intel
* Make dashboard refresh interval configurable
* Thanks to @ich777 for all of his help in testing Intel
###2021-01-08
- [RELEASE] Switch to slider bars instead of raw data output
* GPUStat plugin now refreshes data on 6.9
* Thanks to @mlapaglia for the contribution
###2020-04-18
- [BETA] Allow User selectable metrics to be displayed in widget
* Go to settings and select the desired metrics after update
###2020-03-14
- [BETA] Implement Multi-GPU Selectability
* Select desired GPU for dashboard display from retrieved inventory
* Select desired temperature format (F/C)
###2020-03-10
- [BETA] Implement more NVIDIA data readings
* Clock Speeds (GPU/MEM)
* Encoder/Decoder Utilization
* Power State (P0-8)
* Throttle Check/Reason
###2020-03-08
- [BETA] Fix formatting to be more UnRAID-like
###2020-03-06
- [BETA] Implements basic NVIDIA Support for single-GPU systems
</CHANGES>
<!-- The 'pre-install' script. -->
<FILE Run="/bin/bash">
<INLINE>
if [ "$(which nvidia-smi 2>/dev/null)" ] || [ -d /boot/config/plugins/nvidia-driver ]; then
echo "********************************************************************"
echo
echo "NVIDIA vendor utility found. Continuing install."
echo
echo "********************************************************************"
elif [ "$(which intel_gpu_top 2>/dev/null)" ] || [ -d /boot/config/plugins/intel-gpu-top ]; then
echo "********************************************************************"
echo
echo "Intel vendor utility found. Continuing install."
echo
echo "********************************************************************"
elif [ "$(which radeontop 2>/dev/null)" ] || [ -d /boot/config/plugins/radeontop ]; then
echo "********************************************************************"
echo
echo "AMD vendor utility found. Continuing install."
echo
echo "********************************************************************"
else
echo "********************************************************************"
echo
echo "No vendor utilities found. Plugin install terminated due to failed prerequisites."
echo
echo "********************************************************************"
rm -rf /boot/config/plugins/&name;
exit 1
fi
</INLINE>
</FILE>
<!-- The 'source' file. -->
<FILE Name="&plgPATH;/&plgNAME;.txz" Min="6.4" Run="upgradepkg --install-new">
<URL>&pkgURL;/&plgNAME;.txz</URL>
</FILE>
<!-- Install default plugin cfg -->
<FILE Name="/boot/config/plugins/gpustat/gpustat.cfg">
<INLINE>
<![CDATA[
VENDOR=""
GPUID=""
TEMPFORMAT="C"
DISPCLOCKS="1"
DISPENCDEC="1"
DISPPCIUTIL="1"
DISPTEMP="1"
DISPFAN="1"
DISPPWRDRAW="1"
DISPPWRSTATE="1"
DISPTHROTTLE="1"
DISPSESSIONS="1"
UIREFRESH="1"
UIREFRESHINT="1000"
DISPMEMUTIL="1"
DISP3DRENDER="1"
DISPBLITTER="1"
DISPVIDEO="1"
DISPVIDENH="1"
DISPINTERRUPT="1"
DISPEVENT="1"
DISPVERTEX="1"
DISPTEXTURE="1"
DISPSHADEREXP="1"
DISPSEQUENCER="1"
DISPSHADERINTER="1"
DISPSCANCON="1"
DISPPRIMASSEM="1"
DISPDEPTHBLK="1"
DISPCOLORBLK="1"
DISPGFXTRANS="1"
]]>
</INLINE>
</FILE>
<!-- The 'remove' script. -->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
echo "Removing &name;..."
removepkg &plgPATH;/*.txz
rm -rf &plgPATH;
rm -rf &emhttp;
echo "&name; has been removed"
</INLINE>
</FILE>
</PLUGIN>