Mar 18, 2016

how to get temperature in ubuntu system



sudo apt-get install lm-sensors
Then you need to run sensors-detect.
sudo sensors-detect
and just follow the prompts. Add the recommended lines to /etc/modules.
Now, if you don't want to reboot, you'll have to manually activate the modules.
sudo modprobe module1 module2
where module1 etc. = the module names provided from sensors-detect.
Next, you need to create your fancontrol file. The easiest way is to run pwmconfig.
sudo pwmconfig
and work your way through the instructions there.
Finally, run sensors -s to make your fan configuration take effect.
sudo sensors -s
Now, you can check your temps.
sensors
Now to run fan control, type:
sudo /usr/sbin/fancontrol &
To have fancontrol run on startup, follow the instructions on the Ubuntu Forums. Note: This step is no longer required in 9.10 Karmic Koala. The fancontrol script is already included in the build. It will start automatically the next time you boot.
To monitor temps and speeds, I like gkrellm. To get it:
sudo apt-get install gkrellm
Here's a screenshot of Gkrellm.
Gkrellm System Monitor
Gkrellm System Monitor

Overheating of laptops is a common issue one faces these days. Monitoring hardware temperature may help you to diagnose why laptop is getting overheated. In this article, we’ll see how to check CPU temperature in Ubuntu.

We are going to use a GUI tool Psensor that allows you to monitor hardware temperature in Linux. With Psensor you can:
  • monitor the temperature of the motherboard and CPU sensors
  • monitor the temperature of the NVidia GPUs
  • monitor the temperature of the Hard Disk Drives
  • monitor the rotation speed of the fans
  • monitor the CPU usage
Latest version of Psensor also provides applet indicator for Ubuntu and thus it makes the monitoring of hardware temperature even easier in Ubuntu. You can choose to display the temperature right in the top panel itself. It even sends a desktop notification when the temperature exceeds the limit.

How to install Psensor in Ubuntu 15.04 and 14.04

Before you install Psensor, you need to install and configure lm-sensors, a command line utility for hardware monitoring. If you want to measure hard disk temperature, you need to install hddtemp as well. To install these tools, run the following command in a terminal:
sudo apt-get install lm-sensors hddtemp
Then start the detection of your hardware sensors:
sudo sensors-detect
To make sure that it works, run the command below:
sensors
It will give you an output like:
acpitz-virtual-0
Adapter: Virtual device
temp1: +43.0°C (crit = +98.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +44.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +41.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +40.0°C (high = +100.0°C, crit = +100.0°C)
If everything seems alright, proceed with the installation of Psensor by using the command below:
sudo apt-get install psensor
Once installed, run the application by looking for it in Unity Dash. At first run, you should configure on what stats do you want to collect in Psensor.
configure psensor to measure temperature in Ubuntu

Display temperature in the panel

If you want to show the temperature in the top panel, go to Sensor Preferences:
show temperature in psensor ubuntu
Then under the Application Indicator menu, select the component for which you want to display the temperature and then check the Display sensor in the label option.
display temperature in top panel with psensor in Ubuntu

Start Psensor at each start up

Go to Preferences->Startup and the check Launch on session startup to start Psensor at each boot.
Psensor_Ubuntu_3
That’s it. All you need to monitor the CPU temperature is here. You can keep an eye on it and it may help you find out which process is overheating your computer.

sudo apt-get install lm-sensors 
After installation type the following in terminal
sudo sensors-detect
You may also need to run
sudo service kmod start
It will ask you few questions.Answer Yes for all of them.Finally to get your CPU temperature typesensors in terminal.
sensors
Output:
karthick@Ubuntu-desktop:~$ 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
To see HDD temperature Install hddtemp Install hddtemp
sudo apt-get install hddtemp
Output:
karthick@Ubuntu-desktop:~$ sudo hddtemp /dev/sda        
/dev/sda: ST3160813AS: 34°C

No comments:

Post a Comment