Upload card-temperature-angel.sh
Browse filesMore 3060+3090 users than anticipated ...
- card-temperature-angel.sh +85 -0
card-temperature-angel.sh
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
p0max=170
|
4 |
+
p1max=370
|
5 |
+
tmax=72
|
6 |
+
tmin=55
|
7 |
+
|
8 |
+
let p0=$p0max
|
9 |
+
let p1=$p1max
|
10 |
+
sudo nvidia-smi -i 0 -pl $p0
|
11 |
+
sudo nvidia-smi -i 1 -pl $p1
|
12 |
+
let s=0
|
13 |
+
|
14 |
+
while [ true ]
|
15 |
+
do
|
16 |
+
clear
|
17 |
+
nvidia-smi
|
18 |
+
|
19 |
+
zzz=10
|
20 |
+
d0=`nvidia-smi --query-gpu=temperature.gpu,gpu_name --format=csv,noheader | grep 3060`
|
21 |
+
t0="${d0:0:2}"
|
22 |
+
echo 3060 Temperature $t0. Present Watts $p0. Max Watts $p0max
|
23 |
+
p0action="3060 (=)"
|
24 |
+
|
25 |
+
if [[ $t0 -gt $tmax ]]
|
26 |
+
then
|
27 |
+
let p0=p0-1
|
28 |
+
sudo nvidia-smi -i 0 -pl $p0
|
29 |
+
zzz=1
|
30 |
+
p0action="3060 (-)"
|
31 |
+
s=0
|
32 |
+
fi
|
33 |
+
|
34 |
+
if [[ $t0 -le $tmin ]] && [[ $p0 -lt $p0max ]]
|
35 |
+
then
|
36 |
+
let p0=p0+1
|
37 |
+
sudo nvidia-smi -i 0 -pl $p0
|
38 |
+
zzz=2
|
39 |
+
p0action="3060 (+)"
|
40 |
+
s=0
|
41 |
+
fi
|
42 |
+
|
43 |
+
d1=`nvidia-smi --query-gpu=temperature.gpu,gpu_name --format=csv,noheader | grep 3090`
|
44 |
+
t1="${d1:0:2}"
|
45 |
+
echo 3090 Temperature $t1. Present Watts $p1. Max Watts $p1max
|
46 |
+
p1action="3090 (=)"
|
47 |
+
|
48 |
+
if [[ $t1 -gt $tmax ]]
|
49 |
+
then
|
50 |
+
let p1=p1-1
|
51 |
+
sudo nvidia-smi -i 1 -pl $p1
|
52 |
+
zzz=1
|
53 |
+
p1action="3090 (-)"
|
54 |
+
s=0
|
55 |
+
fi
|
56 |
+
|
57 |
+
if [[ $t1 -le $tmin ]] && [[ $p1 -lt $p1max ]]
|
58 |
+
then
|
59 |
+
let p1=p1+1
|
60 |
+
sudo nvidia-smi -i 1 -pl $p1
|
61 |
+
zzz=2
|
62 |
+
p1action="3090 (+)"
|
63 |
+
s=0
|
64 |
+
fi
|
65 |
+
|
66 |
+
if [[ $s -gt 10 ]]
|
67 |
+
then
|
68 |
+
s=0
|
69 |
+
if [[ $p0 -lt $p0max ]]
|
70 |
+
then
|
71 |
+
p0=p0+1
|
72 |
+
sudo nvidia-smi -i 0 -pl $p0
|
73 |
+
fi
|
74 |
+
if [[ $p1 -lt $p1max ]]
|
75 |
+
then
|
76 |
+
p1=p1+1
|
77 |
+
sudo nvidia-smi -i 1 -pl $p1
|
78 |
+
fi
|
79 |
+
fi
|
80 |
+
|
81 |
+
echo $p0action $p1action
|
82 |
+
sensors gigabyte_wmi-virtual-0
|
83 |
+
sleep $zzz
|
84 |
+
|
85 |
+
done
|