Ubuntu – How to monitor & log server hardware temperatures & load

cpu loadhardwareloggingmonitortemperature

I am looking for a way to log & monitor my server hardware temperatures and load (like for CPU or RAM). How might I do that?

Objective is to:

  • ensure hardware is not heating up
  • identify what should be upgraded & what is in excess (like perhaps to learn maybe not to get such a good CPU for example)

Ok I can use one of the applets that live in the task bar but what about logging?

Best Answer

  • If you want something that does not depend on a desktop:

    Have a look at lm-sensors Install lm-sensors. From the description:

    Lm-sensors is a hardware health monitoring package for Linux. It allows 
    you to access information from temperature, voltage, and fan speed 
    sensors. It works with most newer systems.
    This package contains programs to help you set up and read data from

    From their project page (2016 edit: project is dead. Our own wiki has some info):

    • Unattended high-end server, router or other mission-critical machine automated monitoring. Easily create a cron job to query the status of your hardware and email you in the event of a problem before it becomes critical. That way, you can be alerted within seconds of a failing critical component such as a power supply, fan, other cooling mechanism, or even detect if the case has been opened.
    • Embedded systems running Linux. These can use this package to monitor voltages, temperatures, fan speeds, etc. using off-the-shelf components and utilizing a range of bus interfaces (e.g. ISA, SMBus, I2C or SPI).
    • More generally, data acquisition. Easily measure various types of data (rotational speeds, voltages, temperatures, etc.) using cheap off-the-shelf parts. Very useful for systems automation (in the home, workshop, weather station, you name it).

    lm-sensors has a daemon, called sensord, that uses RRDtool for 'data logging and graphing system for time series data'. So it includes graphics like this that can be shown through a webserver:


    (taken from lm-sensors project page).

    To install the sensord daemon you will likely have to install the sensord package.

    Example from my notebook:


    The config file for this is located at /etc/sensors3.conf

    lm-sensors is sort of the basic of any temperature measuring. Desktop items are more than likely to get their information from this package. An example If you want something that depends on a desktop


    • motherboard and CPU sensors (requires lm-sensors to be installed).
    • NVidia GPUs
    • Hard Disk Drives (requires hddtemp to be installed).
    • Fan speed (again, requires lm-sensors to be installed).

    Installation by adding a PPA:
    sudo add-apt-repository ppa:jfi/ppa
    sudo apt-get update && sudo apt-get install psensor

    (Oneiric will have psensor included)

    (old) example from ubuntugeek.com: im6