如何在Linux下监控系统温度

转载 2015年07月06日 17:05:11

In most cases, you are not supposed to be worried about the temperature of your computer. Barring manufacturing defects, hardware is designed so that its temperature does not exceed maximum operating temperature. But even without any hardware fault, overheating can occur due to various software issues, e.g., buggy graphics card driver, misconfigured fan control program, malfunctioning CPU frequency scaling daemon, etc. As pointed out by Ben in the comment, another quite common cause for overheating is dust, dirt and debris clogging the cooling system (fan, heat sink and ventilation openings). I can imagine this could happen quite often with older hardware.

Overheating may become serious enough to cause permanent damage on your hardware. So watch out for any overheating issue in your system. Even better, have temperature monitoring system in place, so that you will be alerted if system temperature suddenly goes up.

In this tutorial, I will describe how to monitor system temperature on Linux.

There are several user space tools on Linux, which allow you to check and monitor temperature of various system components.

lm-sensors is a software tool that draws from hardware embedded sensors to monitor temperatures, voltage, humidity and fans. hddtemp is a tool that can measure the temperature of hard drives from S.M.A.R.T. readings. psensor is a graphical front-end for temperature monitoring, which visualizes temperature readings from CPUs, NVidia/ATI/AMD GPUs, hard disks, etc.

In the following, I will describe how to set up psensor to monitor the temperature of CPUs and hard drives.

Install psensor on Linux Desktop

psensor can visualize system temperature based on the information obtained from other tools such as lm-sensors and hddtemp. Thus you need to install psensor along with those prerequisites.

To install psensor on Debian or Ubuntu:

$ sudo apt-get install lm-sensors hddtemp psensor

Another way to install psensor on Ubuntu is to use their PPA repository which contains a more recent version of psensor.

$ sudo add-apt-repository ppa:jfi/ppa
$ sudo apt-get update
$ sudo apt-get install lm-sensors hddtemp psensor

To install psensor on Fedora:

$ sudo yum install lm_sensors hddtemp
$ sudo yum install gcc gtk3-devel GConf2-devel lm_sensors-devel cppcheck libatasmart-devel libcurl-devel json-c-devel libmicrohttpd-devel help2man libnotify-devel libgtop2-devel make
$ wget http://wpitchoune.net/psensor/files/psensor-0.8.0.3.tar.gz
$ tar xvfvz psensor-0.8.0.3.tar.gz
$ cd psensor-0.8.0.3
$ ./configure
$ make
$ sudo make install

Due to the requirement for GTK3 libraries, psensor is not compatible with the GNOME 2 desktop of CentOS or RHEL 6.

Configure psensor on Linux

Before launching psensor, you need to configure lm_sensors and hddtemp first.

lm_sensors configuration

To configure lm_sensors, run the following command. Choose YES to every question.

$ sudo sensors-detect

This command will probe for and detect embedded sensors in your hardware (including CPUs, memory controllers, I/O chips), and automatically determine which driver modules need to be loaded to check temperature on your system.

Once sensor probing is completed, you will be asked to add detected driver module(s) to /etc configuration, so they can be loaded automatically upon boot.

On Debian or Ubuntu, detected driver modules will be added to /etc/modules. On Fedora, the driver information will be added to /etc/sysconfig/lm_sensors.

Next, proceed to load necessary modules as follows.

On Ubuntu:

$ sudo service module-init-tools start

On Debian:

$ sudo /etc/init.d/kmod start

On Fedora:

$ sudo service lm_sensors start

hddtemp configuration

You also need to launch hddtemp which monitors the temperature of hard drives.

Run the following command to launch hddtemp as a daemon. Replace "/dev/sda" with the disk drive to monitor on your system.

$ sudo hddtemp -d /dev/sda

Monitor System Temperature with psensor

To start monitoring temperature with psensor, simply run:

$ psensor

The psensor window will show a list of available sensors, and visualize temperature readings from these sensors. You can selectively enable or disable each sensor.

Optionally, you can set an alarm level for each sensor, so that you can be notified when the temperature from a sensor exceeds a threshold.

The default temperature unit used by psensor is Celsius. A recent version (0.7--0.8) of psensor can convert temperature unit between Celsius and Fahrenheit. If the version of psensor you are using is outdated (e.g., 0.6.x), and does not have unit conversion, install psensor from its PPA repository (for Ubuntu users) or build it from its source (for Debian users).

如何在Linux下监控系统温度

大多数情况下,你无需担心你的电脑温度。除非制造上的缺陷,否则硬件设计一般不会使其超过最高工作温度。但即使没有任何硬件故障,各种各样的软件问题也会导致硬件过热,例如,显卡驱动的严重bug,风扇控制程序的...

linux下ganglia监控系统搭建

linux下ganglia监控系统搭建 Ganglia监控软件主要是用来监控系统性能的软件,如:cpu 、mem、硬盘利用率, I/O负载、网络流量情况等,通过曲线很容易见到每个节点的工作状态,...

Linux下的motion detection(最简单的办公室监控系统)

2009-02-21 01:00:09|  分类: 学习|字号 订阅   这篇结合前面三篇(关于Linux内核的,关于motion介绍的,关于安装usb摄像头驱...

Linux下的motion detection(最简单的办公室监控系统) 邮件自动发送

http://caspian.dotconf.net/menu/Software/SendEmail/   邮件的地点 http://skpsun.blog.163.com/...

Linux下的motion detection(最简单的办公室监控系统) 邮件自动发送

http://caspian.dotconf.net/menu/Software/SendEmail/   邮件的地点 http://skpsun.blog.163.com/blog...

Linux下的motion detection(最简单的办公室监控系统)

原文: http://blog.csdn.net/mirkerson/article/details/7751047 这篇结合前面三篇(关于Linux内核的,关于motion介绍的,...

ARM-Linux下用Servfox和Spcaview 建立嵌入式视频监控系统

作者:liusaoyue 转自:http://blog.csdn.net/liusaoyue/article/details/5050718 一 移植摄像头驱动 目前摄像头(We...
  • whw8007
  • whw8007
  • 2014年03月27日 19:58
  • 862

温度监控系统

很可惜,当时用了记事本保存,导致现在的注释中文的都成了问号了,原来的文件早就被删除了,只留下了这么一个备份,已经一年多了啊,当初用了7279a,18b20,12864,8051等东西 CLK EQ...

基于Qt的车载GPS监控系统(5)温度设置

基于Qt的车载GPS监控系统(5)温度设置设置界面Created with Raphaël 2.1.0主界面主界面温度设置温度设置用户进行系统温度报警设置把新的用户设置保存到配置文件数据已保存,返回界...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:如何在Linux下监控系统温度
举报原因:
原因补充:

(最多只允许输入30个字)