Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
In any computer system, monitoring the CPU temperature is crucial for maintaining its health and preventing overheating. Linux provides several tools and commands to monitor the CPU temperature, ensuring that the system remains within safe operating limits.
To monitor the CPU temperature in Linux, we can use the lm-sensors package, which provides a command-line interface to access the hardware monitoring sensors. This package includes the sensors
command, which displays temperature readings from various sensors, including the CPU.
To install the lm-sensors package on Ubuntu or Debian-based systems, use the following command:
sudo apt-get install lm-sensors
After the installation, you need to detect and configure the sensors on your system. Run the following command:
sudo sensors-detect
This command will prompt you with a series of questions to detect and configure the sensors. Press Enter to accept the default options for most questions. At the end, it will ask if you want to add the detected sensors to the /etc/modules
file. Press Enter to confirm.
Once the sensors are configured, you can use the sensors
command to display the CPU temperature. Simply run:
sensors
This will provide you with temperature readings for various components, including the CPU.
If you prefer a graphical interface to monitor CPU temperature, you can use the psensor
package. To install it on Ubuntu or Debian-based systems, use the following command:
sudo apt-get install psensor
After installation, you can launch the Psensor application from the system menu. It will display real-time temperature readings for various sensors, including the CPU.
Examples:
Example 1: Using the sensors
command
$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +45.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +43.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +42.0°C (high = +100.0°C, crit = +100.0°C)
Example 2: Using the Psensor application
$ psensor
This will launch the Psensor application, displaying real-time temperature readings.