-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboost
More file actions
executable file
·32 lines (30 loc) · 953 Bytes
/
boost
File metadata and controls
executable file
·32 lines (30 loc) · 953 Bytes
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
#!/bin/bash
# Checking root user
#if [ "$(id -u)" != "0" ]; then
# echo "This script must be run as root" 1>&2
# exit 1
#fi
# Checking current state
if [ `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor` = 'performance' ]
then
# Lowest speed and ondemand governor for all cores
for CPU in /sys/devices/system/cpu/*/cpufreq/
do
#echo `cat ${CPU}cpuinfo_min_freq` | tee ${CPU}scaling_setspeed
echo powersave | tee ${CPU}scaling_governor
done
# Automatic fan control
echo level auto | tee /proc/acpi/ibm/fan
else
# Otherwise full fan speed
echo level full-speed | tee /proc/acpi/ibm/fan
# And full speed for all cores
for CPU in /sys/devices/system/cpu/*/cpufreq/
do
echo performance | tee ${CPU}scaling_governor
#echo 2600000 | tee ${CPU}scaling_setspeed
done
fi
TEMP=$((`cat /sys/class/thermal/thermal_zone0/temp`/1000))
echo "CPU Temp: ${TEMP}C"
# Developed by gear. You can contact me by misty.g3ar@gmail.com