-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnvtop.plg
123 lines (98 loc) · 3.55 KB
/
nvtop.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
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "nvtop">
<!ENTITY author "ich777">
<!ENTITY version "2023.06.11">
<!ENTITY gitURL "https://github.com/&author;/unraid-&name;/releases/download">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&author;/unraid-&name;/master/&name;.plg">
<!ENTITY md5 "c964881ae6c0ea29720a8d772df72731">
<!ENTITY plugin "/boot/config/plugins/&name;">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]>
<PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;" min="6.9.0" support="https://forums.unraid.net/topic/98978-plugin-nvidia-driver/">
<CHANGES>
###2023.06.11
- Bumped version - based on NVTOP v3.0.2
###2023.03.23
- Made configuration persistent
###2023.03.06a
- Changed NVTOP package to properly support AMD and Intel GPUs/iGPUs
###2023.03.06
- Added support for AMD and Intel GPUs/iGPUs to the plugin
- Changed README.md
###2022.10.02
- Bumped version - based on NVTOP v3.0.1
###2022.10.02
- Bumped version - based on NVTOP v2.0.4
###2022.08.26
- Bumped version - based on NVTOP v2.0.3
###2022.06.11
- Bumped version - based on NVTOP v2.0.2
###2022.04.18
- Bumped version - based on NVTOP v2.0.1
###2021.12.13
- Added exit status if Nvidia Driver plugin is not found - thank you for the heads up Squid
###2021.09.28
- Initial release based on NVTOP v1.2.2
</CHANGES>
<FILE Run="/bin/bash">
<INLINE>
rm -f $(ls /boot/config/plugins/&name;/&name;*.tgz 2>/dev/null|grep -v '&version;')
</INLINE>
</FILE>
<FILE Name="/boot/config/plugins/&name;/&name;-&version;.tgz" Run="upgradepkg --install-new">
<URL>&gitURL;/&version;/&name;-&version;.tgz</URL>
<MD5>&md5;</MD5>
</FILE>
<FILE Name="&emhttp;/README.md">
<INLINE>
**NVTOP**
NVTOP stands for Neat Videocard TOP, a (h)top like task monitor for AMD, Intel and NVIDIA GPUs. It can handle multiple GPUs and print information about them in a htop familiar way.
This Plugin is based on: https://github.com/Syllo/nvtop
</INLINE>
</FILE>
<FILE Run="/bin/bash">
<INLINE>
if [ ! -d /boot/config/plugins/radeontop ] && [ ! -d /boot/config/plugins/intel-gpu-top ] && [ ! -d /boot/config/plugins/nvidia-driver ]; then
echo "---------------------------------------------------------------------------------------"
echo "| ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR"
echo "|"
echo "| No vendor utility installed! Please install at least on of the following three"
echo "| plugins form the CA App that NVTOP (Neat Videocard TOP) is able to work properly:"
echo "|"
echo "| - Radeon-TOP"
echo "| - Intel-GPU-TOP"
echo "| - Nvidia-Driver"
echo "|"
echo "| ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR - ERROR"
echo "---------------------------------------------------------------------------------------"
removepkg &name;-&version; 2>/dev/null
rm -rf &emhttp;
rm -rf &plugin;
exit 1
fi
if [ ! -L /root/.config/nvtop/interface.ini ]; then
if [ ! -d /root/.config/nvtop ]; then
mkdir -p /root/.config/nvtop
fi
ln -s &plugin;/interface.ini /root/.config/nvtop/interface.ini
fi
</INLINE>
</FILE>
<FILE Run="/bin/bash" Method="remove">
<INLINE>
echo "------------------------"
echo "---Uninstalling NVTOP---"
echo "------------------------"
# Remove plugin related files
removepkg &name;-&version;
rm -rf &emhttp;
rm -rf &plugin;
echo
echo "---------------------------------------"
echo "---Uninstallation of NVTOP complete!---"
echo "---------------------------------------"
echo
</INLINE>
</FILE>
</PLUGIN>