-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinfo_script.sh
executable file
·48 lines (45 loc) · 1.39 KB
/
info_script.sh
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
#!/usr/bin/env bash
temps(){
echo "CPU $(lscpu | grep "CPU MHz:" | sed "s/[ \t]*//g" | sed "s/CPUMHz://g") Mhz "
echo ""
for i in /dev/sd[a-z]; do ./hdd_temperature "${i: -1}"; done
echo ""
sensors
# echo "CPU $(lscpu | grep "CPU MHz:" | sed "s/[ \t]*//g" | sed "s/CPUMHz://g") Mhz "
# sensors | grep °C | cut -f1 -d"("
# echo "-----------------------------------"
# nvidia-smi --query-gpu=name --format=csv,noheader | tr -d '\n'
# printf " Ver. "
# nvidia-smi --query-gpu=driver_version --format=csv,noheader
# printf "Core "
# nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader | tr -d '\n'
# printf "°C\nVRAM "
# nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits | tr -d '\n'
# printf "/"
# nvidia-smi --query-gpu=memory.total --format=csv,noheader
#
# nvidia-smi --query-gpu=clocks.video --format=csv,noheader | tr -d '\n'
# printf " "
# nvidia-smi --query-gpu=clocks.mem --format=csv,noheader
#
# nvidia-smi --query-gpu=power.draw --format=csv,noheader
}
if [[ "$1" == "-c" ]];then
temps
elif [[ "$1" == "-t" ]]; then
#top -b -n 1 | head -n 50
export COLUMNS=150
export LINES=70
echo q | htop | aha --line-fix | tail -n +12 | head -n -4
elif [[ "$1" == "-d" ]]; then
df -h
else
temps
echo -e "\n\n"
#top -b -n 1 | head -n 50
export COLUMNS=150
export LINES=70
echo q | htop | aha --line-fix | tail -n +12 | head -n -4
echo -e "\n\n"
df -h
fi