Coder Social home page Coder Social logo

cpu_throttle's Introduction

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:

  -i, --interval	 Time to wait before scaling again, in ms.
  -f, --max-freq		 Maximum frequency cpus can attain, in MHz.
  -s, --cpu-step	 Scaling step, in MHz
  -a, --fan-step	 Fan scaling step.
  -t, --temp		 Target temperature, in degrees.
  -e, --minimum-fan-speed	 Minimum speed fan can reach.
  -r, --hysteresis	 Hysteresis deviation range in degrees.
  -u, --reset-threshold	 Number of intervals spent consecutively
			 in hysteresis before fan speed and cpu clock are reset.
  -o, --config		 Path to read/write binary config.
  -w, --write-config		 Just save the new configuration and exit.
  -c, --cores		 Number of (physical) cores on the system.
  -l, --log		 Path to log file.
  -v, --verbose		 Print detailed throttling information.
  -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.

cpu_throttle's People

Contributors

vince2678 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cpu_throttle's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.