项目作者: vince2678

项目描述 :
Small proram to throttle cpu temps and keep them at reasonable levels.
高级语言: C
项目地址: git://github.com/vince2678/cpu_throttle.git
创建时间: 2017-02-20T20:28:56Z
项目社区:https://github.com/vince2678/cpu_throttle

开源协议:

下载


cpu_throttle

A simple cpu temperature control daemon/program for cpufreq-compatible systems.

How to use

  1. Clone the repository:
    git clone https://github.com/vince2678/cpu_throttle

  2. Compile the program:
    cd cpu_throttle && make

  3. Install the program:
    make install

  4. Run the program. The default settings are ok, but they can be tweaked for better performance.

Why did you write this?

The tools available already for such a task were either too difficult to configure and get going, or simply didn’t cut it when it came to maintaining balance between cpu speed and overall system temperature.
This program is simple enough to set up in a minute and can lower system temperature without cutting too much into cpu speed when the system is under load.

How do I configure the program?

The tool provides a systemd service which is intalled when make install is run. This enables the service by default.
The program accepts the following command line switches:

  1. -i, --interval Time to wait before scaling again, in ms.
  2. -f, --max-freq Maximum frequency cpus can attain, in MHz.
  3. -s, --cpu-step Scaling step, in MHz
  4. -a, --fan-step Fan scaling step.
  5. -t, --temp Target temperature, in degrees.
  6. -e, --minimum-fan-speed Minimum speed fan can reach.
  7. -r, --hysteresis Hysteresis deviation range in degrees.
  8. -u, --reset-threshold Number of intervals spent consecutively
  9. in hysteresis before fan speed and cpu clock are reset.
  10. -o, --config Path to read/write binary config.
  11. -w, --write-config Just save the new configuration and exit.
  12. -c, --cores Number of (physical) cores on the system.
  13. -l, --log Path to log file.
  14. -v, --verbose Print detailed throttling information.
  15. -h, --help Print this message.

The program saves the configurations in a binary format if a path to a config file is provided.
By default the systemd script is set to read the binary configuration from /etc/cpu_throttle/cpu_throttle.dat . A binary configuration can be generated like this for example:
sudo cpu_throttle --fan-step 20 --temp 57 --hysteresis 6 --log /var/log/cpu_throttle.log -o /etc/cpu_throttle/cpu_throttle.dat --verbose --write-config

The service can then be started (or reloaded) and the settings will take effect.