Monitoring Hardware Health on Ubuntu

So, having a working (if barely) Ubuntu server install, I was itching to try and set up the RAIDZ2 array…

But before that, I need a way to monitor all the hardware (e.g. CPU, GPU and HDD temperatures, fans, voltages, HDD SMART information, etc.)…

So, back to Google!

Read further to see the step-by-step of installing and using these…

Motherboard Sensors

Google brought me to this page… To install the motherboard sensors, I needed the lm-sensors package.

apt-get install lm-sensors
apt-get install mbmon
apt-get install xmbmon
sensors-detect
/etc/init.d/kmod start

2016-10-19_22-13-11

Running sensors manages to return all the seemingly correct output (after a reboot):

2016-10-19_22-52-23

HDD SMART Sensors

HDD SMART sensors on Ubuntu requires a separate set of tools/libraries. A “trick” from another page (refer to the comments) mentioned that smartmontools automatically “recommended” to install Postfix, an MTA (a big “no no”)… So, with a “specialised” command:

apt-get install smartmontools --no-install-recommends
apt-get install gsmartcontrol

That brought me to running gsmartcontrol (warning: requires sudo):

2016-10-19_22-50-19

2017/09/11 Update: As I was beginning to start investigating some shutdown/forced rebooting issue/s post M/B, CPU and RAM upgrade/swap, I found it easier to use the (dated) hddtemp software.

apt install hddtemp

Due to the need for non-root user logging, I had to also set the “sticky bit” on /usr/sbin/hddtemp (and yes, my hard drives are cooking – no thanks to the hot-running Seagates):

chmod u+s /usr/sbin/hddtemp

Putting It All Together…

Now that both the motherboard sensor piece and the HDD SMART sensor pieces are in place, I now need to find a way to make them all run in the background but warn me if something is “off”…

This will probably use sensord (needing some RRDtool), as well as running smartmontools as a daemon (with all the associated trigger configuration and resulting action scripts); but I am really tired and will push this off till some other day…

Leave a Reply