How to Monitor Laptop CPU Temperature and Hard Disk in Linux – CLI Command Line and Visual

This is a small guide on How to Monitor Laptop CPU Temperature and Hard Disk in Linux – CLI Command Line and Visual. In this guide we will show few methods to get temperatures.

Commonly used tools to Monitor Laptop CPU Temperature and Hard Disk:

  1. cat temperature file. (no additional software required).
  2. Using ACPI tool (acpi installation required)
  3. Using sensors tools (lm-sensors installation required)

Laptop on Fire

 

1. The elite way, cat the temperature file:

# cat /proc/acpi/thermal_zone/THM/temperature

Sample outputs:

temperature:             55 C

That’s it, no software’s required.

2. Old school CLI, using ACPI

Installation

In Debian flavour linux such as Debian, Ubuntu, Kali, use the following command:

# apt-get install acpi

Usage

# acpi -t

Sample Output:

Thermal 0: ok, 55.0 degrees C
Thermal 1: ok, 54.0 degrees C

You can check all the status together:

# acpi -V

Sample Output:

Battery 0: Discharging, 96%, 02:33:55 remaining
Battery 0: design capacity 1773 mAh, last full capacity 1723 mAh = 97%
Adapter 0: off-line
Thermal 0: ok, 55.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 105.0 degrees C
Thermal 0: trip point 1 switches to mode passive at temperature 90.5 degrees C
Thermal 1: ok, 54.0 degrees C
Thermal 1: trip point 0 switches to mode critical at temperature 127.0 degrees C
Cooling 0: LCD 8 of 15
Cooling 1: Processor 0 of 10
Cooling 2: Processor 0 of 10

acpi can also be used to check battery and power status. See more in How to check your Laptop Battery Status from CLI Command Line in Linux

3. Using Sensors tools – The full thrust

Installation

The following packages need to be installed

lm-sensors – 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

hddtemp – monitors and reports the temperature of PATA, SATA or SCSI hard drives by reading Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.) information on drives that support this feature

sensors-applet – an applet for the GNOME panel that displays readings from hardware sensors, including temperatures, fan speeds and voltage readings

computertemp – little applet for the GNOME desktop that shows the temperature of your CPU and disks in the panel.

Both sensors-applet and computertemp are applets that can be added to GNOME panel – you do not need both. Which one to use is your personal preference.

Open terminal window and type the following command

# apt-get install lm-sensors hddtemp sensors-applet computertemp

Before we can monitor the temperatures we need to configure the sensors.sensors-detect command helps determine which kernel modules need to be loaded to use lm_sensors most effectively.

Open terminal window and type the following command

# sensors-detect

You will be asked a few questions. It is generally safe and recommended to accept the default answers to all questions except the last one – the default is NO. You need to answer yes so that the required entries are made in /etc/modules file. Next step is to load the new modules into the kernel

# /etc/init.d/module-init-tools

Now that you have everything in place you can monitor the CPU and hard drive temperatures either from the command line or add an applet to the GNOME panel.

CLI Options

Open terminal window and type the following command(s)

sensors

monitor-cpu-and-hard-drive-temperature-2

 

Check Hard Disk temperature from CLI

# hddtemp /dev/sda

Sample Output

monitor-cpu-and-hard-drive-temperatures-3

Using sensors applet

Add sensors applet to the panel

  1. Right click on the top or bottom panel
  2. Click Add to Panel
  3. Scroll down and select Hardware Sensors Monitor
  4. Click Add
  5. Click Close

monitor-cpu-and-hard-drive-temperatures-4

 

By default sensors applet does not display hard drive temperature. To add it.

  1. Right click on the applet and select preferences
  2. Select Sensors tab
  3. Expand hddtemp
  4. Check the box in Enabled
  5. Click Close

monitor-cpu-and-hard-drive-temperatures-5

 

You should now see the CPU and hard drive temperatures in your panel

monitor-cpu-and-hard-drive-temperatures-11

Using computertemp applet

  1. Right click on the top or bottom panel
  2. Click Add to Panel
  3. Scroll down and select Computer Temperature Monitor
  4. Click Add
  5. Click Close

monitor-cpu-and-hard-drive-temperatures-7

 

To display hard drive temperature you need to add another copy of the computertemp applet.

  1. Repeat the steps above and add the computertemp applet to the panel
  2. Right the newly added computertemp applet and select preferences
  3. Select HDDTEMP as the sensor to monitor
  4. Select /dev/sda as the Thermal Zone
  5. Click Close

monitor-cpu-and-hard-drive-temperatures-8

 

You should now see the CPU and hard drive temperatures in your panel

 

monitor-cpu-and-hard-drive-temperatures-9

 

 

monitor-cpu-and-hard-drive-temperatures-10

 

End of guide How to Monitor Laptop CPU Temperature and Hard Disk in Linux – CLI Command Line and Visual.

Check Also

How to fix You can’t access this shared folder because your organization’s security policies block unauthenticated guest access error on Windows 11

If you have the following error on Windows 11 “You can’t access this shared folder …

How to unhide menu bar in Virtualbox - blackMORE Ops - 2

How to unhide menu bar in Virtualbox

So I went in and hid the top menu bar and bottom status bar in Virtualbox. After they disappeared, now I cannot find out how to unhide those. Took me a little bit time to figure out, hence this post so that I don't forget it and someone else having the same to unhide menu bar in Virtualbox can find this.

6 comments

  1. “Package acpi is not available, but is referred to by another package”

  2. # /etc/init.d/module-init-tools gives this as the output in the shell “bash: /etc/init.d/module-init-tools: No such file or directory”

    • also, when I try installing computertemp it says E: Unable to locate package computertemp

    • I run sensors and the output is:

      acpitz-virtual-0
      Adapter: Virtual device
      temp1: +27.8°C (crit = +105.0°C)
      temp2: +29.8°C (crit = +105.0°C)

      coretemp-isa-0000
      Adapter: ISA adapter
      Physical id 0: +36.0°C (high = +80.0°C, crit = +100.0°C)
      Core 0: +32.0°C (high = +80.0°C, crit = +100.0°C)
      Core 1: +30.0°C (high = +80.0°C, crit = +100.0°C)
      Core 2: +30.0°C (high = +80.0°C, crit = +100.0°C)
      Core 3: +28.0°C (high = +80.0°C, crit = +100.0°C)

  3. Yep the same, you should update or erased this paper… Nor working anymore for few things.

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.