Cpu log temperature linux

Does Linux typically log system temperature data?

Do mainstream Linux distributions typically log system temperature data, e.g. CPU or HDD temperature? If so, where can those logs be found?

No, unless the distro sees a benefit in doing this per default you’ll have to set it up yourself. Ages ago I used rrdtool (as I didn’t need long historic data) for this and I’m not surprised it is still being used for this. See a tutorial here: oss.oetiker.ch/rrdtool-trac/wiki/SystemMonitorScripts

No they do not; however it is pretty easy with lm_sensors to either put monitoring on a terminal real-time or direct output to a log file. But you will need to set it up — that is easy; you even can set it up for multiple servers with minimum fuss. See wiki.archlinux.org/index.php/… as well as: linuxjournal.com/article/6712

Thanks for all these comments. Thomas R. Koll and r0berts, feel free to post your helpful comments as answers instead. After all, answers can be upvoted for points!

3 Answers 3

I’m not aware of a mainstream Linux distribution which logs this type of information by default. Most mainstream Linux distributions do include various packages which can log temperatures, and some of these packages are set up to log by default.

Taking Debian as an example, sensord will periodically log all the information it knows about (system temperatures, voltages etc.) to the system log, but it needs to be configured manually before it can log anything useful; hddtemp can be set up to periodically log hard drive temperatures. Many other tools can retrieve this type of information (using IPMI, SNMP, etc.) but again in most cases they need to be configured, either to be able to access the information in the first place, or to be able to interpret it, or both.

This configuration requirement means that it would be difficult to set up a generic distribution which logs temperatures by default in a meaningful way. (Most of the systems I’ve seen have at least one, invalid, monitoring entry which would set off alarms if it was auto-configured!) Of course it’s entirely possible to set up an installer image for your own systems since you know what they are and how they’re configured. Once you’ve configured the various tools required to extract temperature information, you’d be better off using a proper monitoring tool (such as Munin) to log the temperatures instead of relying on the system logs. That way you can also set up alerts to be notified when things start going wrong.

Читайте также:  Linux hex to string

Expanding on the sensord example, you can find its output in the system log, with sensord as the process name; so either look for sensord in /var/log/syslog (by default), or run journalctl -u sensord . You’ll see periodic logs like the following (I’ve removed the date and hostname):

sensord[2489]: Chip: acpitz-virtual-0 sensord[2489]: Adapter: Virtual device sensord[2489]: temp1: 27.8 C sensord[2489]: temp2: 29.8 C sensord[2489]: Chip: coretemp-isa-0000 sensord[2489]: Adapter: ISA adapter sensord[2489]: Physical id 0: 33.0 C sensord[2489]: Core 0: 29.0 C sensord[2489]: Core 1: 30.0 C sensord[2489]: Core 2: 26.0 C sensord[2489]: Core 3: 29.0 C sensord[2489]: Chip: nct6776-isa-0a30 sensord[2489]: Adapter: ISA adapter sensord[2489]: in0: +1.80 V (min = +1.60 V, max = +2.00 V) sensord[2489]: in1: +1.86 V (min = +1.55 V, max = +2.02 V) sensord[2489]: in2: +3.41 V (min = +2.90 V, max = +3.66 V) sensord[2489]: in3: +3.39 V (min = +2.83 V, max = +3.66 V) sensord[2489]: in4: +1.50 V (min = +1.12 V, max = +1.72 V) sensord[2489]: in5: +1.26 V (min = +1.07 V, max = +1.39 V) sensord[2489]: in6: +1.04 V (min = +0.80 V, max = +1.20 V) sensord[2489]: in7: +3.31 V (min = +2.90 V, max = +3.66 V) sensord[2489]: in8: +3.22 V (min = +2.50 V, max = +3.60 V) sensord[2489]: fan1: 1251 RPM (min = 200 RPM) sensord[2489]: fan2: 0 RPM (min = 0 RPM) sensord[2489]: fan3: 299 RPM (min = 200 RPM) sensord[2489]: fan4: 1315 RPM (min = 0 RPM) sensord[2489]: fan5: 628 RPM (min = 200 RPM) sensord[2489]: SYSTIN: 32.0 C (limit = 80.0 C, hysteresis = 70.0 C) sensord[2489]: CPUTIN: 33.0 C (limit = 85.0 C, hysteresis = 80.0 C) sensord[2489]: AUXTIN: 24.0 C (limit = 80.0 C, hysteresis = 75.0 C) sensord[2489]: PECI Agent 0: 31.0 C (limit = 95.0 C, hysteresis = 92.0 C) sensord[2489]: PCH_CHIP_CPU_MAX_TEMP: 57.0 C (limit = 95.0 C, hysteresis = 90.0 C) sensord[2489]: PCH_CHIP_TEMP: 0.0 C sensord[2489]: PCH_CPU_TEMP: 0.0 C sensord[2489]: beep_enable: Sound alarm enabled sensord[2489]: Chip: jc42-i2c-9-18 sensord[2489]: Adapter: SMBus I801 adapter at 0580 sensord[2489]: temp1: 32.8 C (min = 0.0 C, max = 60.0 C) sensord[2489]: Chip: jc42-i2c-9-19 sensord[2489]: Adapter: SMBus I801 adapter at 0580 sensord[2489]: temp1: 33.5 C (min = 0.0 C, max = 60.0 C) sensord[2489]: Chip: jc42-i2c-9-1a sensord[2489]: Adapter: SMBus I801 adapter at 0580 sensord[2489]: temp1: 34.0 C (min = 0.0 C, max = 60.0 C) sensord[2489]: Chip: jc42-i2c-9-1b sensord[2489]: Adapter: SMBus I801 adapter at 0580 sensord[2489]: temp1: 33.2 C (min = 0.0 C, max = 60.0 C) 

To get this I had to determine which modules were needed (using sensors-detect ): by default the system only knew about the ACPI-reported temperatures, which don’t actually correspond to anything (they never vary). coretemp gives the CPU core temperatures on Intel processors, nct6776 is the motherboard’s hardware monitor, and jc42 is the temperature monitor on the DIMMs. To make it useful for automated monitoring, I should at least disable the ACPI values and re-label the fans, and correct fan4 ‘s minimum value. There are many other configuration possibilities, lm_sensors ‘ example configuration file gives some idea.

Источник

linux cpu temperature log

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.

Читайте также:  Python os mkdir linux

How can I check the temp of my CPU?

Follow these steps to check CPU temperature with Core Temp: Step 1: Open the application from your desktop. Step 2: Locate the temperatures of your processors at the bottom of the widget. Step 3: Maneuver to the bottom of your taskbar and select “show hidden icons” to quickly access core temps.

How do I check my CPU and GPU temp in Linux?

  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. .
  2. Sensors. Sensors is a simple command-line utility that displays the current readings of all sensor chips including the CPU. .
  3. Hardinfo. .
  4. i7z.

How do I check my CPU temperature Debian?

To quickly check the temperature readout of your CPU (and other devices that Lm-Sensors detected), open up a terminal window with Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, run the sensors command to view a readout of various sensor temperatures.

What is normal CPU temp?

A good temperature for your desktop computer’s CPU is around 120℉ when idle, and under 175℉ when under stress. If you’re using a laptop, you should look for CPU temperatures between 140℉ and 190℉. If your CPU heats up beyond about 200℉, your computer can experience glitches, or simply shut down.

What is a high CPU temp?

No matter the case, a CPU temperature should play around 75-80 degrees celsius when gaming. When the computer is doing small processes or in an idle state, it should be around 45 degrees celsius to a little over 60 degrees celsius at most.

Can you check CPU temp Windows 10?

There is no such option to check CPU temperature in Windows 10. You can either check the temperature in BIOS or you can use third-party applications.

How do I know if my PC is too hot?

  1. System boots up but shuts down automatically after a short period of time.
  2. Reported CPU operating frequency is less than expected.
  3. Evidence of CPU throttling.
  4. General slowness of system.
  5. CPU/system fan noise is excessive.

What is normal temperature for CPU while gaming?

Optimal CPU Temperature While Gaming

It doesn’t matter whether you’re running an AMD or Intel processor, the temperature threshold for all processors varies greatly. These days, the optimal CPU temperature for gaming should not exceed 176°F (80°C) and on average, should run anywhere between 167°-176°F (75°-80°C).

How can I check the temperature of my Raspberry Pi CPU?

The performance of the Raspberry Pi SBC will suffer due to temperature. This is also known as thermal throttling. If the temperature of the processor of your Raspberry Pi is above 80 degrees Celsius, you will see a thermometer icon on the top right corner of the screen.

How do you run an LM sensor?

Install the lm-sensors package (see InstallingSoftware). Run sudo sensors-detect and choose YES to all YES/no questions. At the end of sensors-detect, a list of modules that needs to be loaded will displayed. Type «yes» to have sensors-detect insert those modules into /etc/modules, or edit /etc/modules yourself.

Читайте также:  Linux for amlogic s905

Bash if… else Statement

Statement

How do you write an IF ELSE statement in bash?What is else if in bash?Can you put IF statement in if statement?How does Elif work in bash?What is $? I.

French City Toulouse Saved 1 Million Euro With LibreOffice

Migrating

Toulouse, France’s 4th largest city located in south-west France, has saved one million Euro by migrating to Open Source office suite LibreOffice. Mig.

How To Create a New MySQL User with Grant Permissions

User

For example, to grant insert privileges to a MySQL user you would run the command: GRANT INSERT ON *. * TO ‘username’@’localhost’; You can replace the.

Latest news, practical advice, detailed reviews and guides. We have everything about the Linux operating system

Источник

How to monitor & log server hardware temperatures & load

Ok I can use one of the applets that live in the task bar but what about logging?

7 Answers 7

If you want something that does not depend on a desktop:

Have a look at lm-sensors . From the description:

Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems. This package contains programs to help you set up and read data from lm-sensors.

From their project page (2016 edit: project is dead. Our own wiki has some info):

  • Unattended high-end server, router or other mission-critical machine automated monitoring. Easily create a cron job to query the status of your hardware and email you in the event of a problem before it becomes critical. That way, you can be alerted within seconds of a failing critical component such as a power supply, fan, other cooling mechanism, or even detect if the case has been opened.
  • Embedded systems running Linux. These can use this package to monitor voltages, temperatures, fan speeds, etc. using off-the-shelf components and utilizing a range of bus interfaces (e.g. ISA, SMBus, I2C or SPI).
  • More generally, data acquisition. Easily measure various types of data (rotational speeds, voltages, temperatures, etc.) using cheap off-the-shelf parts. Very useful for systems automation (in the home, workshop, weather station, you name it).

lm-sensors has a daemon, called sensord, that uses RRDtool for ‘data logging and graphing system for time series data’. So it includes graphics like this that can be shown through a webserver:

im1

(taken from lm-sensors project page).

To install the sensord daemon you will likely have to install the sensord package.

im2

The config file for this is located at /etc/sensors3.conf

lm-sensors is sort of the basic of any temperature measuring. Desktop items are more than likely to get their information from this package. An example If you want something that depends on a desktop

  • motherboard and CPU sensors (requires lm-sensors to be installed).
  • NVidia GPUs
  • Hard Disk Drives (requires hddtemp to be installed).
  • Fan speed (again, requires lm-sensors to be installed).

Installation by adding a PPA:
sudo add-apt-repository ppa:jfi/ppa
sudo apt-get update && sudo apt-get install psensor

(Oneiric will have psensor included)

im6

(old) example from ubuntugeek.com:

Источник

Оцените статью
Adblock
detector