CPU Temperature displayed in Admin area
Posted
#4903
(In Topic #989)
requires TLP
Hello,Just was worried recently as my server is running hot so I researched, found and installed TLP which is supposed to keep an eye on it and help cool things...
TLP info: TLP - Optimize Linux Laptop Battery Life - TLP 1.8.0 documentation
TLP install: TLP - Optimize Linux Laptop Battery Life - TLP 1.8.0 documentation
For fun I made a quick miniblock for composr.
in sources_custom/miniblocks create a file called cputemp.php
Code
<?php
$output = array();
$command = 'tlp-stat -t';
exec($command, $output);
$output = implode($output);
$output = str_replace('--- TLP 1.1 --------------------------------------------+++ Temperatures',"",$output);
$output = str_replace('[°C]',"°C<BR>",$output);
$output = str_replace('Fan speed',"",$output);
$output = str_replace('= (not available)',"",$output);
echo $output ;
now edit your admin area page and add the new cputemp miniblock and you should see the CPU temp displayed.
0 guests and 0 members have recently viewed this.
