mirror of
https://github.com/dnlbauer/dotfiles.git
synced 2026-09-10 21:45:30 +00:00
22 lines
366 B
Bash
Executable File
22 lines
366 B
Bash
Executable File
#!/bin/bash
|
|
|
|
t_warn=50
|
|
t_crit=70
|
|
|
|
GPU=$(nvidia-smi -q | grep Gpu | awk '{print $3}')
|
|
|
|
if [ $GPU -gt $t_crit ]
|
|
then
|
|
printf " %d%%" "$GPU"
|
|
printf "\n %d%%" "$GPU"
|
|
printf "\n#fb4934\n"
|
|
elif [ $GPU -gt $t_warn ]
|
|
then
|
|
printf " %d%%" "$GPU"
|
|
printf "\n %d%%" "$GPU"
|
|
printf "\n#fabd2f\n"
|
|
else
|
|
printf " %d%%" "$GPU"
|
|
printf "\n %d%%" "$GPU"
|
|
fi
|