I asked my son to help - he came up with this personalised solution
based on lm-sensors and the RSS reader plugin.
Cut and paste the following code into a file called rss.php (edit
appropriately to select the parts of sensors output you require and
your specific IP address).
<?
exec('sensors |grep "Chip"|cut -d+ -f2|cut -d" "
-f1',$chip,$return_var);
exec('sensors |grep "CPU"|cut -d+ -f2|cut -d" "
-f1',$cpu,$return_var);
exec('sensors |grep "Sys"|cut -d+ -f2|cut -d" "
-f1',$sys,$return_var);
?>
<<? echo '?'; ?>xml version="1.0" encoding="UTF-8" <? echo '?'; ?>>
<rss version="2.0">
<channel>
<title>Thermal Info</title>
<link>http://192.168.0.199/rss.php</link>
<language>en</language>
<pubDate><? date -R ?></pubDate>
<lastBuildDate><? date -R ?></lastBuildDate>
<item>
<title>Chip Temp <? echo($chip[0]); ?></title>
<link></link>
<pubDate><? date -R ?></pubDate>
<description></description>
</item>
<item>
<title>CPU Temp <? echo($cpu[0]); ?></title>
<link></link>
<pubDate><? date -R ?></pubDate>
<description></description>
</item>
<item>
<title>Sys Temp <? echo($sys[0]); ?></title>
<link></link>
<pubDate><? date -R ?></pubDate>
<description></description>
</item>
<description>Thermal Info</description>
</channel>
</rss>
Place the file rss.php in the /var/www/ folder and change the
permissions
chmod 755 /var/www/rss.php
Use the RSS plug-in and add the following file to the menu items:
http://192.168.0.199/rss.php
(you need to replace 192.168.0.199 with your server IP address)
Add The RSS plugin to your menu items and you will now have a "Thermal
Info" menu item in you RSS menu giving CPU Temp/Sys Temp/Chip Temp as
seperate readable items.
At present there is no auto-update, the information is compiled each
time the menu item is called. I have no problems with anyone picking
this up and developing a more general plugin and I haven't tried
epoch's solution yet.
Just throwing this into the pot.
--
ian_heys
------------------------------------------------------------------------
ian_heys's Profile: http://forums.slimdevices.com/member.php?userid=2629
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins