Linux measure cpu temperature

How do I get the CPU temperature?

sudo apt-get install lm-sensors 

After installation type the following in terminal

It will ask you few questions. Answer Yes for all of them. Finally to get your CPU temperature type sensors in your terminal.

$ sensors coretemp-isa-0000 Adapter: ISA adapter Core 0: +41.0°C (high = +78.0°C, crit = +100.0°C) coretemp-isa-0001 Adapter: ISA adapter Core 1: +41.0°C (high = +78.0°C, crit = +100.0°C) w83627dhg-isa-0290 Adapter: ISA adapter Vcore: +1.10 V (min = +0.00 V, max = +1.74 V) in1: +1.60 V (min = +1.68 V, max = +1.44 V) ALARM AVCC: +3.30 V (min = +2.98 V, max = +3.63 V) VCC: +3.28 V (min = +2.98 V, max = +3.63 V) in4: +1.85 V (min = +1.66 V, max = +1.11 V) ALARM in5: +1.26 V (min = +1.72 V, max = +0.43 V) ALARM in6: +0.09 V (min = +1.75 V, max = +0.62 V) ALARM 3VSB: +3.30 V (min = +2.98 V, max = +3.63 V) Vbat: +3.18 V (min = +2.70 V, max = +3.30 V) fan1: 0 RPM (min = 10546 RPM, div = 128) ALARM fan2: 892 RPM (min = 2136 RPM, div = 8) ALARM fan3: 0 RPM (min = 10546 RPM, div = 128) ALARM fan4: 0 RPM (min = 10546 RPM, div = 128) ALARM fan5: 0 RPM (min = 10546 RPM, div = 128) ALARM temp1: +36.0°C (high = +63.0°C, hyst = +55.0°C) sensor = diode temp2: +39.5°C (high = +80.0°C, hyst = +75.0°C) sensor = diode temp3: +119.0°C (high = +80.0°C, hyst = +75.0°C) ALARM sensor = thermistor cpu0_vid: +2.050 V 

Install hddtemp

To see HDD temperature Install hddtemp

sudo apt-get install hddtemp 
$ sudo hddtemp /dev/sda /dev/sda: ST3160813AS: 34°C 

Источник

How to Measure CPU Temperature on Ubuntu/Linux: A Comprehensive Guide

Learn how to measure CPU temperature on Ubuntu/Linux using GUI tools like Psensor, command-line tools like lm-sensors and sensors, third-party apps like Glances, Hardinfo, and i7z, and BIOS and /sys directory. Follow our best practices to prevent overheating and system failure.

  • Using Psensor
  • Command-line tools
  • BIOS and /sys directory
  • Third-party apps and scripts
  • Tips and Best Practices
  • Other helpful code examples for measuring CPU temperature on Ubuntu/Linux
  • Conclusion
  • How to monitor CPU temperature in Linux?
  • How to check CPU temperature in Debian?
  • How do I monitor CPU and GPU temp in Linux?
  • How to check CPU temp?
Читайте также:  Login as another user in linux

Measuring CPU temperature on Ubuntu/Linux is an essential task for preventing overheating and improving system performance. There are several methods available, including GUI tools like Psensor and command-line tools like lm-sensors and sensors. In this blog post, we will explore different ways to measure CPU temperature on Ubuntu/Linux, along with some third-party apps and scripts.

Using Psensor

Psensor is a popular GUI tool for monitoring CPU temperature on Ubuntu/Linux. Users must first configure lm-sensors, a command-line tool that monitors hardware sensors, to use Psensor. We will provide a step-by-step guide to set up and use Psensor for monitoring CPU temperature.

To install Psensor, open the terminal and type the following command:

sudo apt-get install psensor 

After installing Psensor, you need to configure lm-sensors. To do this, type the following command in the terminal:

Follow the prompts and say yes to all the questions. After sensors-detect is done running, type the following command to update the sensors configuration:

Now you can start Psensor by searching for it in the applications menu. Once opened, you can see the CPU temperature in the main window.

Command-line tools

Command-line tools like lm-sensors and sensors are powerful tools to monitor CPU temperature on Ubuntu/Linux. We will explain how to install and use these tools to measure CPU temperature. The sensors command shows the most recent values from all sensor chips, including the CPU.

To install lm-sensors, open the terminal and type the following command:

sudo apt-get install lm-sensors 

After installing lm-sensors, you need to detect the sensors on your system by typing the following command:

Follow the prompts and say yes to all the questions. After sensors-detect is done running, type the following command to update the sensors configuration:

To check the CPU temperature, type the following command in the terminal:

This will display the CPU temperature along with other sensor information.

BIOS and /sys directory

Users can also check CPU temperature via BIOS or by using the /sys directory, a virtual file system for Linux kernel and hardware information. We will provide a walkthrough guide to accessing and using BIOS and /sys directory to measure CPU temperature.

To access the BIOS, restart your computer and press the key that appears on the screen to enter the BIOS setup. The key to enter the BIOS setup varies depending on your computer manufacturer.

Читайте также:  Узнать свой видеодрайвер linux

To check the CPU temperature using the /sys directory, open the terminal and type the following command:

cat /sys/class/thermal/thermal_zone0/temp 

This will display the CPU temperature in Celsius.

Third-party apps and scripts

There are various third-party apps and scripts available to monitor CPU temperature on Linux. Glances is a cross-platform system monitoring tool that can monitor CPU and GPU temperature in Ubuntu. Hardinfo is another GUI tool that provides detailed hardware information, including CPU temperature. i7z is a command-line tool that provides per-core CPU temperature readings. We will explain how to install and use these tools to monitor CPU temperature.

To install Glances, open the terminal and type the following command:

sudo apt-get install glances 

To start Glances, type the following command in the terminal:

This will display the CPU temperature along with other system information.

To install Hardinfo, open the terminal and type the following command:

sudo apt-get install hardinfo 

To start Hardinfo, search for it in the applications menu. Once opened, you can see the CPU temperature in the Sensors tab.

To install i7z, open the terminal and type the following command:

To check the CPU temperature using i7z, type the following command in the terminal:

This will display the per-core CPU temperature readings.

Tips and Best Practices

Regularly monitoring CPU temperature is essential to prevent hardware damage and improve system performance. We will provide some best practices and tips for monitoring CPU temperature, including using third-party apps like system-monitor extension for GNOME Shell and Psensor for graphical frontends. We will also provide a cheatsheet for command-line options and syntax for tools like lm-sensors and sensors. Finally, we will discuss common issues such as compatibility issues with certain processors or Linux distributions.

Best Practices

  • Regularly monitor CPU temperature to prevent hardware damage and improve system performance.
  • Keep your computer in a well-ventilated area to prevent overheating.
  • Clean your computer’s fans and heatsinks regularly to prevent dust buildup that can cause overheating.
  • Use high-quality thermal paste when installing or replacing the CPU or heatsink.

Tips

  • Use third-party apps like system-monitor extension for GNOME Shell and Psensor for graphical frontends to monitor CPU temperature.
  • Use command-line tools like lm-sensors and sensors for advanced monitoring and automation.
  • Create a script to monitor CPU temperature and send alerts when the temperature exceeds a certain threshold.
Читайте также:  Nfs config in linux

Cheatsheet

  • To detect sensors on your system: sudo sensors-detect
  • To update sensors configuration: sudo service kmod start
  • To check CPU temperature using lm-sensors: sensors
  • To check CPU temperature using /sys directory: cat /sys/class/thermal/thermal_zone0/temp
  • To start Glances: glances
  • To start Hardinfo: search for it in the applications menu
  • To check CPU temperature using i7z: sudo i7z

Other helpful code examples for measuring CPU temperature on Ubuntu/Linux

In Shell as proof, cpu temp on ubuntu code example

sudo apt-get install lm-sensors

Conclusion

Measuring CPU temperature on Ubuntu/Linux is crucial for preventing hardware damage and improving system performance. There are several methods available, including GUI tools like Psensor and command-line tools like lm-sensors and sensors. Third-party apps and scripts like Glances, Hardinfo, and i7z can also help monitor CPU temperature. Regularly monitoring CPU temperature and following best practices can help prevent overheating and system failure.

Frequently Asked Questions — FAQs

How do I check my CPU temperature in Ubuntu/Linux?

To check CPU temperature in Ubuntu/Linux, you can use GUI tools like Psensor or command-line tools like lm-sensors and sensors. You can also access BIOS or use the /sys directory to check CPU temperature.

What is the normal CPU temperature range in Ubuntu/Linux?

The normal CPU temperature range in Ubuntu/Linux is between 30°C to 70°C. However, it may vary depending on the CPU model and usage.

How often should I monitor my CPU temperature on Ubuntu/Linux?

You should monitor your CPU temperature on a regular basis to prevent overheating and system failure. It’s recommended to check CPU temperature after installing new hardware or software, during heavy usage or gaming, and during hot weather.

How can I prevent overheating on Ubuntu/Linux?

To prevent overheating on Ubuntu/Linux, you can follow some best practices like keeping your system clean and dust-free, using a cooling pad or fan, avoiding heavy usage or gaming for extended periods, and monitoring CPU temperature regularly.

Can I use third-party apps for CPU temperature monitoring on Ubuntu/Linux?

Yes, there are various third-party apps available for CPU temperature monitoring on Ubuntu/Linux, like Glances, Hardinfo, and i7z. You can install and use them to monitor CPU temperature.

What are the common issues with CPU temperature monitoring on Ubuntu/Linux?

Some common issues with CPU temperature monitoring on Ubuntu/Linux include compatibility issues with certain processors or Linux distributions, inaccurate readings due to faulty sensors, and difficulty in accessing BIOS or /sys directory for some users.

Источник

Оцените статью
Adblock
detector