CPU Temperature displayed in Admin area
Posted
#5244
(In Topic #1185)

Standard member

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.6 documentation
TLP install: TLP - Optimize Linux Laptop Battery Life - TLP 1.6 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.
———–
Publisher of IronFeather Journal since 1987. Host of KGNU Colorado Radio for 20 years.
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido: Nandalow.com
Composr site for my freelance work: Futurecode.jp
My Compsr edits : http://ironfeather.com/bbs/viewtopic.php?f=12&t=2862
Twitter: https://twitter.com/futurecodejp
Publisher of IronFeather Journal since 1987. Host of KGNU Colorado Radio for 20 years.
Currently in Japan & decided to focus on Composr as my number one CMS.
Composr site for community of Hokkaido: Nandalow.com
Composr site for my freelance work: Futurecode.jp
My Compsr edits : http://ironfeather.com/bbs/viewtopic.php?f=12&t=2862
Twitter: https://twitter.com/futurecodejp
1 guest and 0 members have just viewed this.