php-linux-cpu/README.md

466 B

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.