[Redhat7.4] Check CPU speed

1.Read the cpu info to check the intel Hyperthread function :                                                  lscpu

2.To check the intel EIST function:

    Step1:knownledge of the power modes

System run mode Descrise
performance run at the max frequency
powersave run at the min frequency
userspace run at the fixed frequency that user wanted
ondemand adjust CPU speed according to the dynamic requirement.Once CPU get an caculative task,will run at the max frequency and decrease the cpu speed if ilde.
conservative adjust CPU speed quickly according to the dynamic requirement,but the change is much smaller than ondemand
schedutil djust CPU speed  according to the schedutil

Step2:set the power mode as you need.                                                                                                                                   yum install cpupowerutils
//don’t neet install,cpupower package is inbox                                               cpupower -c all frequency-set -g performance                                                         //or  cpupower  frequency-set -g powersave

Step3:check the system power mode

cat  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Step4:check the cpu current frequency

cpupower monitor

watch grep \”cpu MHz\” /proc/cpuinfo

3.Turn on /off  Turbo mode under OS(if you need) :

turn off  Intel turbo mode in order to decrease the thermal.                                   echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo

Example:cat cpuspeed.sh

lscpu                                                                                                                      sleep 5                                                                                                                            echo “yourpassword” | sudo -S cpupower frequency-set -g performance
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep 2
watch grep \”cpu MHz\” /proc/cpuinfo

sudo cpupower frequency-set -g powersave
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
sleep 2
watch grep \”cpu MHz\” /proc/cpuinfo


Knowlegde Reference