CPU Temperature displayed in Admin area

Post

Posted
Rating:
Item has a rating of 5 (Liked by Chris GrahamLiked by Jason Verhagen)
#5244 (In Topic #1185)
Avatar
Standard member
ironfeather is in the usergroup ‘Well-settled’

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: linrunner.de: TLP - Linux Advanced Power Management
TLP install: linrunner.de: TLP - Linux Advanced Power Management

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
Composr site for my freelance work: "Partners in Progress" - Future Code Japan
My Compsr edits : 
http://ironfeather.com/bbs/viewtopic.php?f=12&amp;t=2862

 
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Vaiva, babu, MVLipwig, Paul D, Salman, amit.nigam

Forum statistics: Birthdays:
Back to Top