- How to check CPU temperature on Ubuntu Linux
- Procedure for monitoring CPU and HDD temperatures on Ubuntu
- Check CPU temperature in Ubuntu Linux
- Install lm-sensors in Ubuntu Linux
- Display CPU temperature in the command line
- How can I show the CPU temperature in the GNOME panel
- How to install hddtemp in Ubuntu Linux
- How to see hard disk temperature in Ubuntu
- Use disks & storage GUI tool to view hard disk temp
- How to monitor Nvme ssd temperature in Ubuntu
- What to do when a laptop gets way too hot
- Conclusion
- 4 Useful Tools to Monitor CPU and GPU Temperature in Ubuntu
- 1. Glances
- 2. Sensors
- 3. Hardinfo
- 4. i7z
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- Мониторинг температуры Linux
- Что мы будем использовать?
- Установка компонентов
- Настройка мониторинга температуры Linux
- 1. Настройка lm_sensors
- Настройка hddtemp
- Измерение и мониторинг температуры
- Выводы
How to check CPU temperature on Ubuntu Linux
H ow do I check CPU temperature in Ubuntu Linux using a command line and GUI tools on my Thinkpad laptop or Desktop computer?
One of the most common complaints is the overheating laptop, especially older models. Laptop components are tightly put together to each other. So there is very little room for air movement in thinner laptops. If your laptop overheats, it can cause some damage to your body as well as the hardware parts. Therefore monitoring hardware temperature is essential. In this tutorial, you will learn how to check CPU temperature in Ubuntu Linux.
Tutorial details | |
---|---|
Difficulty level | Easy |
Root privileges | Yes |
Requirements | Ubuntu Linux |
Est. reading time | 4 minutes |
Procedure for monitoring CPU and HDD temperatures on Ubuntu
- Open the terminal application.
- Install the lm-sensors and hddtemp packages in Ubuntu using the sudo apt install hddtemp lm-sensors .
- Run hddtemp command to see SSD and hard drive temperature in Ubuntu.
- Execute sensors command to find out CPU temperature in Ubuntu Linux.
Let us view processor temperature including SSD/HDD in details for Ubuntu desktop or server.
Check CPU temperature in Ubuntu Linux
The sensors command is used in Linux to show the current readings of all sensor chips including CPU temp. The hddtemp command will show you the temperature for SSD and HDD. You need to install and configure the lm-sensors package as well as hddtemp. You can search it using the following syntax:
apt-cache search lm-sensors
apt-cache search hddtemp
To install these packages on Ubuntu, run the following apt command or apt-get command in a terminal:
sudo apt update
sudo apt upgrade
Install lm-sensors in Ubuntu Linux
- Sensors embedded in CPUs and other super I/O chips
- Hardware monitoring chips accessed through I/O ports and SMBus/I2C bus on your system
Type the following command:
sudo sensors-detect
Display CPU temperature in the command line
How can I show the CPU temperature in the GNOME panel
Install Freon and Sensors extension for Ubuntu Linux desktop:
How to install hddtemp in Ubuntu Linux
Run the following apt command:
sudo apt install hddtemp
How to see hard disk temperature in Ubuntu
Simply type:
hddtemp
sudo hddtemp SATA:/dev/sda
Sample outputs:
Use disks & storage GUI tool to view hard disk temp
Hard disks have a built-in health-check tool called SMART (Self-Monitoring, Analysis, and Reporting Technology), which continually checks the disk for potential problems. SMART also warns you if the disk is about to fail, helping you avoid loss of important data. It also displays hard disk temperature. Run:
gnome-disks
How to monitor Nvme ssd temperature in Ubuntu
First install nvme-cli, run:
sudo apt install nvme-cli
Now use the nvme command as follows to get list of all NVMe devices and namespaces on machine:
sudo nvme list
Sample outputs:
sudo nvme smart-log /dev/nvme0
One can filter output using the grep command:
sudo nvme smart-log /dev/nvme0 | grep temperature
- No ads and tracking
- In-depth guides for developers and sysadmins at Opensourceflare✨
- Join my Patreon to support independent content creators and start reading latest guides:
- How to set up Redis sentinel cluster on Ubuntu or Debian Linux
- How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
- How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
- A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
- How to protect Linux against rogue USB devices using USBGuard
Join Patreon ➔
What to do when a laptop gets way too hot
- Open your laptop and remove (blow out) all the dust from fans and hardware.
- Buy a good laptop cooler to place your laptop on.
- Make sure your Thinkpad laptop positioned on a flat and hard surface.
- Shutdown unwanted Linux apps that use lots of CPU, ram, hard drive, and stress out your system.
- Above all use power saving mode on your laptop.
Conclusion
In conclusion, keep your laptop fan clean and dust free to reduce the temperature. In some extreme cases, you may need to replace a heat sink to keep a hot component such as a processor cool. Similarly, use the quality thermal paste to fill in the gaps and allow for better transfer of heat from the heat spreader to the heatsink. I hope to find out CPU temperature in Ubuntu Linux help you to keep your laptop healthy and use it for a longer time.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via
Источник
4 Useful Tools to Monitor CPU and GPU Temperature in Ubuntu
The CPU or GPU temperature depends entirely on the usage of running programs or applications. Sensitive computer components such as CPUs have a finite lifespan and running them at a temperature that exceeds a certain limit (or at higher temperatures generally) can shorten it. Besides, it can also cause thermal throttling especially when the fan is not providing adequate cooling.
So it is important to monitor your system’s CPU temperature to avoid damaging it as a result of overheating. In this article, we will share some useful command-line tools to help you keep a close eye on the temperature of your CPU and GPU.
1. Glances
Glances is a cross-platform, advanced and popular real-time system monitoring tool that uses the psutil library to gather information from various system resources.
It can display information from sensors using the psutil and/or hddtemp tools. One of its intriguing features is the webserver mode which allows you to access it via a web browser to remotely monitor your Linux server.
There are various methods to install Glances on your system, but the preferred way of installing glances is using an auto-install script, which will install the latest production-ready version.
To install Glances on your system, use curl or wget command as shown.
Once you have installed it, start Glances and press f key to view sensors information.
Glances – Monitor CPU and GPU Temperature
2. Sensors
Sensors is a simple command-line utility that displays the current readings of all sensor chips including the CPU. It comes pre-installed some Linux distributions such as Ubuntu by default, otherwise install it as shown.
Then you can run the following command to detect all sensors on your system.
Detect Sensors in Linux
Once detected, you can run the following command to check CPU temperature, GPU temperature, fan speed, voltage, etc.
Sensors – Show CPU and GPU Temperature
3. Hardinfo
Hardinfo is a lightweight system profiler and benchmark tool designed for hardware analysis and report generation. It features comprehensive reports on system hardware and allows for the generation of HTML reports on your system’s hardware.
To install the hardinfo package on your Ubuntu Linux system, run the following command.
After the installation is complete, you can launch hardinfo to view devices’ information by running the following command.
View Device Information in Linux
To launch the GUI app, simply run the following command or search for ‘System Profiler and Benchmark’ in the system menu or Dash and open it.
Then click on sensors to view sensors information as shown in the following screenshot.
View Sensors Information in Ubuntu
4. i7z
i7z is a tiny command-line utility that reports Intel Core i7, i5, i3 CPU information including temperatures. You can install it on your Ubuntu system by running the following command.
Once installed, run i7z with root privileges as shown.
Show Intel Core Information with Temperature
You might also like to read these useful related articles.
That’s all for now! In this article, we have shared the useful command-line tools for viewing CPU and GPU temperatures in a Ubuntu system. Have your say about this article or ask questions via the feedback form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Источник
Мониторинг температуры Linux
В большинстве случаев нам не нужно беспокоиться о температуре компьютера. Все устроено так что температура не будет превышать максимальную если у вашего оборудования нет никаких производственных дефектов. Но перегрев могут вызвать не только аппаратные ошибки, это также может произойти из-за багов в драйвере графической карты или неправильно настроенной программы управления вентилятором. Частой причиной перегрева также может быть пыль, грязь, мусор попавшие в систему охлаждения (вентилятор, радиатор). Такое часто происходит со старым оборудованием.
Перегрев может вызвать очень серьезные повреждения вашего компьютера, так что следите за температурой вашей системы. Еще лучше если есть служба контроля температуры, которая предупредит вас если температура начнет сильно расти. В этой инструкции я расскажу как настроить мониторинг температуры Linux. В операционной системе Linux есть специальный набор утилит, которые предназначены для того, чтобы выполнять контроль температуры linux.
Что мы будем использовать?
Давайте рассмотрим утилиты, которые мы сегодня будем использовать:
- lm-sensors — программный инструмент, извлекающий данные из аппаратных датчиков на материнской плате для мониторинга температуры, напряжения, влажности и т д;
- hddtemp — инструмент для измерения температуры жестких дисков;
- psensor — графическая утилита для мониторинга температуры, которая позволяет посмотреть температуру Linux, для процессора, видеокарты, жестких дисков и других компонентов, которые поддерживают эту функцию.
Установка компонентов
Программа psensor отображает температуру на основе информации, полученной от lm-sensors и hddtemp. Поэтому сначала необходимо установить эти инструменты. Для установки в Debian или Ubuntu выполните:
sudo apt install lm-sensors hddtemp psensor
Если вы хотите установить самую новую версию этих компонентов, нужно добавить сначала PPA от разработчиков в систему:
sudo add-apt-repository ppa:jfi/ppa
sudo apt update
sudo apt install lm-sensors hddtemp psensor
Установка psensor в Fedora и других дистрибутивах, основанных на Red Hat будет выглядеть аналогично:
sudo yum install lm_sensors hddtemp psensor
Настройка мониторинга температуры Linux
Сначала нужно настроить низкоуровневые инструменты для считывания данных о температуре компонентов lm_sensors и hddtemp. Начнем с lm_sensors. После этого вы уже сможете посмотреть температуру linux.
1. Настройка lm_sensors
Для запуска мастера настройки ls_sensors выполните команду:
Отвечайте Y на все вопросы. Утилита попытается обнаружить все доступные в системе встроенные аппаратные датчики (для процессора, видеокарты, памяти и других микросхем), а также автоматически определить подходящие драйвера для них.
Когда сканирование датчиков завершится вам будет предложено добавить обнаруженные модули ядра в автозагрузку:
В Ubuntu или Debian модули будут добавлены в /etc/modeuls. А в Fedora будет создан файл /etc/sysconfig/lm_sensors. Для автоматической загрузки нужных модулей достаточно добавить lm_sensors в автозагрузку:
sudo systemctl enable lm-sensors
Теперь вы можете посмотреть температуру процессора Linux и других аппаратных компонентов с помощью команды sensors:
Настройка hddtemp
Еще вам нужно запустить hddtemp для контроля температуры жестких дисков. Выполните эту команду для запуска hddtemp в качестве демона, /dev/sda замените на адрес своего диска.
sudo hddtemp -d /dev/sda
Это нужно сделать для каждого диска. Также необходимо добавить эту программу в автозагрузку.
Измерение и мониторинг температуры
Теперь можно начать мониторинг температуры linux с помощью psensor. Для этого просто запустите программу. Вы можете сделать это с помощью главного меню или же выполнив команду:
Вызовите контекстное меню в главном окне программы и выберите Параметры. Здесь вы увидите список доступных датчиков. Вы можете выбрать за какими датчиками нужно наблюдать.
Еще можно установить уровень тревоги для каждого датчика на вкладке Alarm. Когда температура Linux превысит заданную вы получите уведомление.
По умолчанию температура в psensor измеряется в градусах Цельсия. В последних версиях также есть поддержка конвертации в градусы по Фаренгейту.
Выводы
Дальше, чтобы программа работала постоянно осталось добавить ее в автозагрузку. Теперь температура процессора linux всегда будет под контролем и ваш компьютер точно не перегреется. Если у вас остались вопросы, спрашивайте в комментариях!
Источник