Linux Monitoring CPU Temperature

Source: Internet
Author: User
Tags mrtg ibm server

Install the test system:hardware: Ordinary PC,software: Redhat Linux as 4 2.6.9, installation system comes with lm_sensors-2.8.7-2.i386You can also download it from [Url]http://www.edgedesign.us/about/lm_sensors[/url]This software can collect the system temperature under Linux. Then I show it with cacti. because it comes with the system. So I installed the system when the installation is ready. So if you can't find it. Can be found on the system disk, and then RPM installation. I'm not going to say that. let's look at the configuration:Run:/sbin/depmod–avi/etc/ld.so.confJoin this line:/usr/local/libRun: Ldconfigrun: Sensors-detect scan your host using those chipsets1:we can start with probing for (PCI) i²c or SMBus adapters.You don't need any special privileges for this.want to probe now? (yes/no): YES2:next Adapter:smbus I801 adapter at 0500 (algorithm unavailable)does want to scan it? (yes/no/selectively): YES3:do want to scan the ISA bus? (yes/no): YES4:do want to scan for Super I/O sensors? (yes/no): YES5:do want to scan for secondary Super I/O sensors? (yes/no): YES6:now follows a summary of the probes I had just done.Just Press ENTER to continue: Enter7:i'll now generate the commands needed to load the I²c modules.Sometimes, a chip is available both through the ISA bus and an i²c bus.ISA bus access is faster, and need to the load an additional driver moduleFor it. If you had the choice, do you want to use the ISA bus or theI2c/smbus (isa/smbus)? ISADisplay:to make the sensors modules behave correctly, add these lines to/etc/modules.conf: #----Cut here----# i²c Module Optionsalias char-major-89 I2c-dev#----Cut here---- to load everything, which is needed, the add this to some/etc/rc* file: #----Cut here----# I²C Adapter Driversmodprobe I2c-isa# I²C Chip Driversmodprobe W83627HF# sleep 2 # optional/usr/bin/sensors-s # recommended#----Cut here---- warning! If you had some things built into your kernel, the list aboveWould contain too many modules. Skip the appropriate ones! You really shouldtry these commands right now-make sure everything is working properly.monitoring programs won ' t work until it 's done.8:do want to generate/etc/sysconfig/lm_sensors? (yes/no): YESCopy prog/init/lm_sensors.init to/etc/rc.d/init.d/lm_sensorsFor initialization at boot time.completed. cat/etc/sysconfig/lm_sensorsDisplay:Module_0=i2c-isaMODULE_1=W83627HFStart[[email protected] etc]#/etc/rc.d/init.d/lm_sensors startstarting lm_sensors: [OK]test: Run sensorsDisplay:w83627thf-isa-0290Adapter:isa AdapterVCore: +1.53 V (min = +1.93 V, max = +1.93 v)+12v: +5.59 V (min = +10.82 V, max = +13.19 v)+ 3.3v: +3.26 V (min = +3.14 V, max = +3.47 v)+ + : +5.01 V (min = +4.75 V, max = +5.25 v)-12v: -14.91 V (min = -10.80 V, max = -13.18 v)V5SB: +4.44 V (min = +4.76 V, max = +5.24 v)VBat: +3.23 V (min = +2.40 V, max = +3.60 v)fan1:0 rpm (min = 225000 rpm, div = 2)CPU fan:3668 rpm (min =-1 rpm, div = 2)fan3:0 rpm (min = 14062 rpm, div = 8)m/b Temp: +35°c (high = +5°c, Hyst = +0°c) sensor = ThermistorCPU Temp: +42.0°c (high = + 100°c, Hyst = +95°c) sensor = Pii/celeron DiodeTemp3: +25.5â°c (high = +100â°c, Hyst = +95â°c) sensor = ThermistorError:can ' t get VID data!alarms:chassis intrusion Detection ALARMbeep_enable:Sound Alarm Disabled eeprom-i2c-0-50Adapter:smbus I801 Adapter at 0500Memory type:ddr SDRAM DIMMMemory Size (MB):Run: Ntsysvset the lm_sensors to start running. next setup integrates with cacti:editing a data acquisition scriptVi mrtg.sh#!/bin/shcputemp= ' sensors | grep "CPU Temp" | awk ' {print $} ' | cut-c 2-3 'systemp= ' sensors | grep Temp3 | awk ' {print $} ' | cut-c 2-3 'uptime= ' uptime | awk ' {print $ "" $4 "" $ $ "Echo $cputempEcho $systempEcho $uptimeEcho linux226Add Permission: chmod +x mrtg.shThe results of the acquisition are as follows: the -4:50, 2 users,linux226then rewrite the file .Workdir:/var/www/html/mrtg/temp/

  Language:big5

  Target[index]: '/var/www/html/mrtg/temp/mrtg.temp '

  Maxbytes[index]:60

  Options[index]: gauge, nopercent, growright

Ylegend[index]: Temp (degrees)

Shortlegend[index]: Degrees

Legendo[index]: System temperature;

Legendi[index]: CPU temperature;

Title[index]: Blue-moon City system Temperature Meter

Pagetop[index]: </H1>

  <TABLE>

<TR><TD> Systems:</td> <td>redhat 9.0+apache 2.0.40 </TD></TR>

</TABLE>MRTG add: Root#/usr/bin/mrtg/var/www/html/mrtg/temp/mrtg.cfg.tempThe above command is then added to the crontab to run in a timed way. I have no problem in PC test. The IBM server test did not succeed and always sensors-detect error. query: IBM server does not recommend the use of Lm_sensors software.

Linux Monitoring CPU Temperature

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.