noccylabs/linux-cpu

$ git tag
0.1.0
0.1.0.1

$ git branch
* master

linux/cpu

Installing using composer

Install from the command line:

$ composer require linux/cpu:0.1.*

Or add to your composer.json:

"require": {
    "linux/cpu": "0.1.*"
}

Using

use Linux\Cpu\Cpu;

$cpu = new Cpu();
$governors = $cpu->getAvailableGovernors();
$cpu->setGovernor("ondemand");

NOTE: You probably need to run the script using linux/cpu as root, for example using sudo or su.