Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use psensor to monitor Linux system in real time

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

What this article shares to you is about how to use psensor to monitor the Linux system in real time. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.

Install psensor in the Linux desktop system

Using psensor to visually display system temperature needs to be based on data obtained by other tools such as lm-sensors and hddtemp. So you need to install both tools while installing psensor.

Install psensor under Debian or Ubuntu:

$sudo apt-get install lm-sensors hddtemp psensor

The latest version of psensor can also be installed through the PPA repository under Ubuntu:

$sudo add-apt-repository ppa:jfi/ppa

$sudo apt-get update

$sudo apt-get install lm-sensors hddtemp psensor

Install psensor under 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

Note here that psensor is not compatible with CentOS or RHEL 6 with GNOME2 desktops due to the need for support from the GTK3 library.

Configure psensor in Linux

Before starting psensor, you need to configure lm_sensors and hddtemp.

Lm_sensors configuration

Run the following command to configure lm_sensors, selecting YES for each item.

$sudo sensors-detect

This command will detect and detect the sensors embedded in your hardware (including CPUs, storage controller, and Imax O chips), and then automatically determine which driver module in the system needs to be loaded and monitor its temperature.

Once the sensor detection is complete, you need to add the detected driver modules to the / etc configuration so that they can be loaded automatically at boot time.

Under Debian or Ubuntu, the detected driver module will be added to / etc/modules. Under Fedora, driver information is added to / etc/sysconfig/lm_sersors.

Next, continue to load the necessary modules, as follows:

Ubuntu:

$sudo service module-init-tools start

Debian:

$sudo / etc/init.d/kmod start

Fedora

$sudo service lm_sensors start

Hddtemp configuration

You also need to start hddtemp to monitor the temperature of the hard drive.

Run the following command to start hddtemp as a daemon. Remember to replace "/ dev/sda" with the hard drive on your system.

$sudo hddtemp-d / dev/sda

Monitoring system temperature with psensor

To start psensor to monitor the temperature, simply run:

$psensor

The psensor window displays a list of available sensors and visually displays the temperature read out from the sensor. You can selectively enable or disable any sensor.

In addition, you can set the alarm level for each sensor so that you can be notified when the sensor temperature exceeds a certain threshold.

The default temperature unit for psensor is "degrees Celsius", and the latest version supports the conversion of temperature units between Celsius and Fahrenheit. If you are using an older version (e.g. 0.6.x) and do not support temperature unit conversion, Ubuntu users can install the latest version of psensor,Debian through the PPA warehouse while psensor,Debian users can install it through the source code.

The above is how to use psensor to monitor the Linux system in real time. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report