vortexbox.org

27 Apr 09 How to integrate temperature readings into the phpsysinfo screen using lm-sensors and hddtemp

How to integrate temperature readings into the phpsysinfo screen using lm-sensors and hddtemp.

Note: lm-sensors only works with a select number of motherbaord chipsets. It does not work with the VortexBox appliance. Check out http://www.lm-sensors.org for more information.

Install lm-sensors and hddtemp packages:

yum -y install lm_sensors
yum -y install hddtemp

Run sensors-detect, and answer Y to all questions:

sensors-detect

To check motherboard parameters use:

sensors

The default settings can be tweaked by editing the config file:

nano /etc/sensors3.conf

Changes to the config file are loaded with:

sensors -s

To display hard drive temperatures on the command line use:

hddtemp /dev/sda

To add this information to the VB phpsysinfo screen edit this config file:

nano /var/www/html/phpsysinfo/config.php

And alter %sensor_program = “lmsensors”;

Remove comment (//) from %hddtemp_avail = “suid”;

Change the temperature format if you desire.

Reload your phpsysinfo page and temperature and voltage information should be visible.

Article by blazingtortoise

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • PDF
  • Propeller
  • Technorati
  • Twitter