System monitoring with xfce4-sensors-plugin

The xfce4-sensors-plugin provides a handy way to monitor your hard disk, processor, fans, and other critical hardware right on your Xfce panel. It doesn’t offer advanced features such as alarms, initiating an unattended shutdown, or scripting, but it does what it was designed to do very well.

This article assumes you have set up hardware monitoring and are using the Xfce desktop environment.

Many distributions have the xfce4-sensors-plugin in their package manager; simply install it in the usual way.

Maybe your distro doesn’t include it, or maybe your distro’s package does not work for you. That was my experience with Mandriva 2008.1 and xfce4-sensors-plugin- it could read from lm_sensors but not from hddtemp. In such cases, download and install from source code. I like to use checkinstall for such tasks.

I never could get xfce4-sensors-plugin to see hddtemp in Mandriva and gave up, but for the record here’s what I tried:

  • Remove “-F” from line 286 in panel-plugin/hddtemp.c. to eliminate this error on xfce4-sensors-plugin launch: “An error occurred when executing “/usr/sbin/hddtemp -F -n -q /dev/sda”: /usr/sbin/hddtemp: invalid option — F”. Some versions of hddtemp have the -F switch but two different versions I tried (-0.3-0.beta15.8mdv2008.1 and -0.3-0.beta15.8.1mib2008.1) do not. This impedes xfce4-sensors-plugin from seeing hddtemp data.
  • The source code contained the doc file NOTES that checkinstall would not pick up on its own, so I manually created a doc-pak directory for checkinstall (see below).
  • Per the NOTES file, I made hddtemp suid root and restarted the daemon (see below).
  • I created the directory /usr/local/share/locale. If this is not done, “make install” would choke.

The commands I ran were:

$ cd /path/to/xfce4-sensors-plugin-unpacked-source
$ mkdir doc-pak
$ ./configure
$ make
$ su
# chmod u+s /usr/sbin/hddtemp
# service hddtemp restart
# mkdir /usr/local/share/locale
# checkinstall
# rpm -ih /usr/src/rpm/RPMS/i586/xfce4-sensors-plugin-

Wait a few seconds before continuing so the Xfce panel will have time to notice that a new plugin is available.

Right click on the Xfce panel and choose “Add new item”. Select the sensors plugin and press “Add”. It now appears on the panel. Right click on it and select “Properties”. In the first tab, “Sensors,” a drop-down control allows you to select sensor data from each available sources (lm_sensor-supported chips, ACPI, etc.). Configure as desired. In the third tab, “Miscellaneous,” I like to specify “xfce4-terminal –execute htop” to execute on double-click. When finished, press “Close”.

Freshmeat page
Xfce goodies page


About Warren Post

So far: Customer support guy, jungle guide, IT consultant, beach bum, entrepreneur, teacher, diplomat, over-enthusiastic cyclist. Tomorrow: who knows?
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

2 Responses to System monitoring with xfce4-sensors-plugin

  1. Pingback: Setting up a lightweight workstation | A maze of twisty little passages

  2. Pingback: Hard disk temperature monitoring on Linux | A maze of twisty little passages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s