hwmonã¢ã¸ã¥ã¼ã«+lm_sensorsã¨hddtempã§æ¸©åº¦ãåå¾
Linuxã«ã¼ãã«ã«ã¯ãã»ã³ãµã¼ãããããã®æ
å ±ãåå¾ããhwmonã¨ããä»çµã¿ãããããã¶ã¼ãã¼ãã«ã»ã³ãµã¼ãããããã£ã¦ããã¤ãhwmonã®ã»ã³ãµã¼ãã©ã¤ãã®ä¸ã«ã使ç¨ãã¦ããã»ã³ãµã¼ãããã«å¯¾å¿ãã¦ãããã®ãããã°*1ãlm_sensorsã¨ãããã¼ã«ãç¨ãã¦å種温度ãåå¾ã§ããã対å¿ãã¦ããã°ãå種é»å§ããã¡ã³å転æ°ãåå¾ã§ããã
ãã¼ããã£ã¹ã¯ã®æ¸©åº¦ã«é¢ãã¦ã¯ã温度åå¾ã®çµè·¯ãæ¹æ³ãç°ãªããããå¥ã®ãã¼ã«hddtempãç¨ãã¦åå¾ããã
ã«ã¼ãã«ã®è¨å®
ãã£ã¹ããªã®ã«ã¼ãã«ã§ã¯ã¢ã¸ã¥ã¼ã«ã«ãªã£ã¦ããå¯è½æ§ãé«ããã«ã¹ã¿ã ã«ã¼ãã«ã§ãã©ã®ãã©ã¤ããé¸ã¹ã°ããã®ãåãããªãå ´åã使ç¨ãããã¢ã¸ã¥ã¼ã«ãå¤æããã¾ã§ã¯ä¸éãã¢ã¸ã¥ã¼ã«ã¨ãã¦ãã«ããã次åã®ã«ã¼ãã«ãã«ã以éã使ç¨ããã¦ããªããã®ããã«ãããªã(ç¡å¹ã«ãã)ããã«ããã®ãããã
Device Drivers ---> <M> Hardware Monitoring support ---> <M> ãã©ã¤ãå <M> ãã©ã¤ãå ... <M> ãã©ã¤ãå [ ] Hardware Monitoring Chip debugging messages <M> I2C support --->
lm_sensorsã®ã¤ã³ã¹ãã¼ã«
ãã£ã¹ããªã®ããã±ã¼ã¸ã«ãªã£ã¦ãããã¨ãå¤ãããããlm_sensorsãããlm-sensorsããã®éãããã£ãããããã¨ã¯ããã®ã§ãã©ã¡ããªã®ããããã±ã¼ã¸åæ¤ç´¢ãã¦ããã¨ãããããããªããGentoo Linuxã§ã¯ãlm_sensorsããDebian,Ubuntuã§ã¯ãlm-sensorsãã
Gentoo Linuxã®å ´åãlm_sensorsããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ã»è¨å®ããå¾ã«ãã·ã¹ãã èµ·åæã«èªåã§èµ·åãããããã«
$ sudo rc-update add lm_sensors default
ãå®è¡ãã¦ããã¨ãããå¾ã§è¨å®ãå®äºããã
$ sudo /etc/init.d/lm_sensors start
ã§ãã¼ã¢ã³ãéå§ããã
lm_sensorsã®è¨å®
$ sudo sensors-detect
ã®å¾ãæ示ã«å¾ã£ã¦ã»ã³ãµã¼ãããã®æ¤åºä½æ¥ãé²ãã¦(ããåãããªããã°Enteré£æã§ãOK)ãæå¾ã«è¨å®ãã¡ã¤ã«*2ã¸ãã®è¨å®ãæ¸ãåºããã©ããã質åãããã®ã§ããyesãã¨ããã°è¨å®å®äºã
sensorsã³ãã³ãã§å®é¨
sensorsã³ãã³ãã§ãåå¾å¯è½ãªæ
å ±ãä¸éã表示ããããå®éã«ã¯ä»ã®ãã¼ã«çµç±ã§ä½¿ç¨ããããã¨ãå¤ãã
ç°å¢ã«ãããåå¾ã§ããæ
å ±ã«ã¯éããåºãã
$ sensors k8temp-pci-00c3 Adapter: PCI adapter Core0 Temp: +45°C Core1 Temp: +45°C w83627ehf-i2c-9191-a10 ERROR: Can't get adapter or algorithm?!? VCore: +1.00 V (min = +0.00 V, max = +1.74 V) in1: +13.46 V (min = +2.90 V, max = +3.64 V) ALARM AVCC: +3.30 V (min = +1.66 V, max = +2.96 V) ALARM 3VCC: +3.30 V (min = +3.20 V, max = +2.77 V) ALARM in4: +1.69 V (min = +0.26 V, max = +0.39 V) ALARM in5: +1.91 V (min = +0.21 V, max = +0.01 V) ALARM in6: +6.12 V (min = +1.48 V, max = +2.97 V) ALARM VSB: +3.30 V (min = +3.15 V, max = +2.21 V) ALARM VBAT: +3.10 V (min = +1.39 V, max = +2.94 V) ALARM in9: +1.58 V (min = +0.32 V, max = +1.36 V) ALARM Case Fan: 1534 RPM (min = 14062 RPM, div = 8) ALARM CPU Fan: 0 RPM (min = 1318 RPM, div = 128) ALARM Aux Fan: 0 RPM (min = 5273 RPM, div = 128) ALARM fan4: 691 RPM (min = 2280 RPM, div = 16) ALARM fan5: 0 RPM (min = 1171 RPM, div = 128) ALARM Sys Temp: +36°C (high = -7°C, hyst = +122°C) CPU Temp: +43.0°C (high = +75.0°C, hyst = +127.0°C) AUX Temp: +46.5°C (high = +80.0°C, hyst = +75.0°C)
表示ãããé
ç®åã¨å®éã®é
ç®ã¯ãç°ãªããã¨ããããä¸ã®ä¾ã§ã¯ãCPUãã¡ã³ããfan4ãã«ãªã£ã¦ãããBIOSè¨å®ã§ãCPUã®æ¸©åº¦ã«å¿ãã¦CPUãã¡ã³å転æ°ãå¤ããããã«ãã¦ããããããã¢ã¤ãã«æã«ã¯å¤ãä½ãããè² è·ããããã¨2,000ãè¶ãããã¨ãããã¨ããåãããä»ã«ã¯ãã·ã³ã°ã«ã³ã¢CPUãªã®ã«ãk8tempã§åå¾ãã¦ãã温度ã®è¡¨ç¤ºã§ãCore0ããCore1ãã¨è¡¨ç¤ºãåããã¦ããããããããåä½ä¸ãåé¡ãããããã§ã¯ãªãã
(2007/7/28)ãã®è¡¨ç¤ºãå®éã¨åããããã®ã§ããã°ã/etc/sensors.confã調æ´ãããæå
ã®ç°å¢ã§ã¯
--- /etc/sensors.conf.orig +++ /etc/sensors.conf @@ -2635,15 +2635,27 @@ chip "w83627ehf-*" label in0 "VCore" - label in2 "AVCC" - label in3 "3VCC" - label in7 "VSB" - label in8 "VBAT" + ignore in1 + ignore in2 +# label in2 "AVCC" +# label in3 "3VCC" + ignore in3 + ignore in4 + ignore in5 + ignore in6 +# label in7 "VSB" + ignore in7 +# label in8 "VBAT" + ignore in8 + ignore in9 # +12V is in1 and +5V is in6 as recommended by datasheet - compute in1 @*(1+(56/10)), @/(1+(56/10)) - compute in6 @*(1+(22/10)), @/(1+(22/10)) +# compute in1 @*(1+(56/10)), @/(1+(56/10)) +# compute in6 @*(1+(22/10)), @/(1+(22/10)) + # VCore (1.00V - 1.25V) + set in0_min 1.0*0.95 + set in0_max 1.25*1.05 # set in1_min 12.0*0.9 # set in1_max 12.0*1.1 # set in6_min 5.0*0.95 @@ -2661,23 +2673,23 @@ # Fans label fan1 "Case Fan" - label fan2 "CPU Fan" - label fan3 "Aux Fan" -# ignore fan3 -# ignore fan4 -# set fan1_min 1200 -# set fan2_min 1700 + ignore fan2 + ignore fan3 + label fan4 "CPU Fan" + ignore fan5 + set fan1_min 1000 + set fan4_min 600 # Temperatures label temp1 "Sys Temp" - label temp2 "CPU Temp" + ignore temp2 label temp3 "AUX Temp" # ignore temp3 -# set temp1_over 45 -# set temp1_hyst 40 -# set temp2_over 45 -# set temp2_hyst 40 + set temp1_over 50 + set temp1_hyst 45 + set temp3_over 55 + set temp3_hyst 50 # Fintek F71805F/FG configuration @@ -2807,7 +2819,7 @@ chip "k8temp-*" - label temp1 "Core0 Temp" - label temp2 "Core0 Temp" - label temp3 "Core1 Temp" - label temp4 "Core1 Temp" + label temp1 "CPU Temp" + ignore temp2 + ignore temp3 + ignore temp4
ã¨ä¿®æ£ãããã¨ã§
$ sensors k8temp-pci-00c3 Adapter: PCI adapter CPU Temp: +45°C w83627ehf-i2c-9191-a10 ERROR: Can't get adapter or algorithm?!? VCore: +0.97 V (min = +0.95 V, max = +1.31 V) Case Fan: 1480 RPM (min = 1004 RPM, div = 8) CPU Fan: 697 RPM (min = 602 RPM, div = 16) Sys Temp: +37°C (high = +50°C, hyst = +45°C) AUX Temp: +45.5°C (high = +55.0°C, hyst = +50.0°C)
ã®ããã«ãªã£ããä¸è¦ãªé
ç®ã¯ãignoreãæå®ããã¦ããã¨ãå¾è¿°ã®GKrellMã§è¨å®ããã¨ãã«ã楽ãããããã¨ã«ã»ã¯ã·ã§ã³åãããã¦ããã®ã§ã使ç¨ãã¦ãããããåã«å¿ããã»ã¯ã·ã§ã³(æå
ã§ã¯ãchip "w83627ehf-*"ã)ãç·¨éãããã¾ããå種ãã¼ã¿ç¯å²ãè¨å®ããk8tempã®ã·ã³ã°ã«ã³ã¢CPUã§ã®è¡¨ç¤ºã1ã¤ã«ãã¦ããã
(w83627ehfã§ã®)é»å§ã«é¢ãã¦ã¯ã3.3Vã¯æ£å¸¸ã«å¤ãåºã¦ããã®ã ãã/etc/sensors.confã§ã®è¨ç®(ä¸ã®å·®åã®ä¸ã«ããã®é¨åãè¦ãã)ãããããã®ããin1ã¨in6ã¯ã12Vã¨5Vã¨ã¯ç¨é ãå¤*3ãBIOSä¸ã®è¡¨ç¤ºã§ã¯ããã¡ãã¨åã£ã¦ãããããããã©ãããè¨ç®ãããã°æå
ã®ãã¶ã¼ãã¼ãã«åãã®ããåãããªãã®ã§ãignoreã«ãã¦ãã¾ã£ãã
ãã¼ããã£ã¹ã¯ã®æ¸©åº¦ãåå¾(hddtemp)
ãã¼ããã£ã¹ã¯ã®æ¸©åº¦ã(ãS.M.A.R.T.ãçµç±ã§)åå¾ããhddtempããã£ã¹ããªã®ããã±ã¼ã¸ã«ãªã£ã¦ãããã¨ãå¤ãããã¼ã¢ã³åä½ãããã¨ã
$ nc 127.0.0.1 7634
ã§ä¸è¬ã¦ã¼ã¶ã§ã温度ãåå¾ã§ãã*4ãGentoo Linuxã§ã¯
$ sudo rc-update add hddtemp default
ã§èªåèµ·åãããããã«ãããã¤ã³ã¹ãã¼ã«å¾ãæåã§ãã¼ã¢ã³ãéå§ãããã«ã¯
$ sudo /etc/init.d/hddtemp start
ãå®è¡ã
GKrellMã§å種æ å ±ã表示ããã
GKrellMã®æ¸©åº¦è¡¨ç¤ºæ©è½ãlm_sensorsã¨hddtempã«å¯¾å¿ãã¦ããããã常ã«æ¸©åº¦ãç£è¦ãããã¨ãã§ãããã»ã³ãµã®è¨å®ãããã§ãã¯ãå ¥ããã ããªã®ã§ç°¡åããã¡ã³å転æ°ã¨é»å§ãã対å¿ãã¦ãããã®ã«é¢ãã¦ã¯è¡¨ç¤ºã§ããã
hwmonã®ãã¼ã¿ãã«ã¼ãã«(/sys/bus/ 以ä¸)ããç´æ¥åã(cactiã§ä½¿ç¨ä¸ã®åå¾æ¹æ³)
æãåä½ã®è»½ã表示æ¹æ³ã§ã¯ããã®ã ããè¦ã¤ãã£ãé
ç®(temp1_inputãªã©)ãããã¼ãã¦ã§ã¢ä¸ã®ã©ãã®å¤ãªã®ãããã£ããã¨ææ¡ãã¦ããå¿
è¦ããããã¾ããæ ¼ç´ããã¦ããå¤ãã®ã¾ã¾ã®å½¢ã§ã¯ä½¿ç¨ã§ãããå¤å°ã®å å·¥ä½æ¥ãå¿
è¦ãªãã®ãå¤ãã
ãã®åå¾æ¹æ³ã¯ãcactiã§ã°ã©ããä½ãããã¨ãã«å½¹ã«ç«ã¤ãããããªããããããä¾ãæ¸ãã¦ãããã¼ã¿ã®ãã¹å(/sys/bus/i2c/devices/9191-0a10/fan4_inputãªã©)ãç°å¢ã«ãã£ã¦ç°ãªããããåèã«ã¯ãªããªããããããªãã対å¿é¢ä¿ã¯ãsensorsã³ãã³ãã®åºåçµæã¨ç
§ããåãããã®ãããã
以ä¸ãcactiã§ãã¼ã¿åå¾ã«ä½¿ç¨ãã¦ããã¹ã¯ãªããããã®ã¾ã¾è²¼ãä»ããã/bin/dashã¯ç¶´ããã¹ã§ã¯ãªããdashã¨ãã軽ãã·ã§ã«ã使ãããæå®ãã¦ããã
#! /bin/dash cputempsrc=/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input systempsrc=/sys/bus/i2c/devices/9191-0a10/temp1_input cpufansrc=/sys/bus/i2c/devices/9191-0a10/fan4_input vcoresrc=/sys/bus/i2c/devices/9191-0a10/in0_input cputemp=$(cut -c 1-2 $cputempsrc).$(cut -c 3- $cputempsrc | sed -e s/00$//) systemp=$(cut -c 1-2 $systempsrc).$(cut -c 3- $systempsrc | sed -e s/00$//) vcore=$(printf %04d $(cat $vcoresrc) | cut -c 1).$(printf %04d $(cat $vcoresrc) | cut -c 2-) printf "CPUTemp:$cputemp SYSTemp:$systemp CPUFan:$(cat $cpufansrc) CPUVCore:$vcore"
(2007/10/23)Linux 2.6.23ããã¯ãç´æ¥/sys/以ä¸ããåãå ´åã®å ´æãä¸é¨å¤æ´ãããããã ã
#! /bin/dash cputempsrc=/sys/bus/pci/drivers/k8temp/0000:00:18.3/temp1_input systempsrc=/sys/devices/platform/w83627ehf.2576/temp1_input cpufansrc=/sys/devices/platform/w83627ehf.2576/fan4_input vcoresrc=/sys/devices/platform/w83627ehf.2576/in0_input cputemp=$(cut -c 1-2 $cputempsrc).$(cut -c 3- $cputempsrc | sed -e s/00$//) systemp=$(cut -c 1-2 $systempsrc).$(cut -c 3- $systempsrc | sed -e s/00$//) vcore=$(printf %04d $(cat $vcoresrc) | cut -c 1).$(printf %04d $(cat $vcoresrc) | cut -c 2-) printf "CPUTemp:$cputemp SYSTemp:$systemp CPUFan:$(cat $cpufansrc) CPUVCore:$vcore"
ã®ããã«ãããã¨ã§å¤ãåãã¦ããã
ãã®ä»ãcactiç¨ã®(hwmonã¨ç¡é¢ä¿ãª)ãã¼ã¿åéã¹ã¯ãªãããè²¼ã£ã¦ããã
CPUã®ã¯ããã¯(cpufrequtilsã®cpufreq-infoã使ç¨)
#! /bin/dash printf $(cpufreq-info -f) | sed -e s/000$//
NVIDIA GPUã®æ¸©åº¦(nvidia-settingsã§åå¾ã§ããå ´å)
#! /bin/dash nvidia-settings -q GPUCoreTemp | grep Attr | awk '{printf $4}' | sed -e s/\.$//
NVIDIA GPUã®æ¸©åº¦(nvidia-settingsã§ã¯åããªãããnvclockã§ã¯åããå ´åã»è¥å¹²å¦çãéã)
#! /bin/dash nvclock -T | tail -n 1 | awk '{printf $4}' | sed -e s/C//
cactiã®ä¸ã§ã®ä½¿ãæ¹ã¨ãã¦ã¯ã
- ãData Input Methodsããä½æãããScript/Commandãã¨ãã種é¡ã§è¨å®ãåã¹ã¯ãªããã®å ´æ(ãã¹å)ãæ¸ãã¦ä½¿ã
- ãData Templatesããä½æããè¤æ°ã®ãã£ã¼ã«ããæã£ã¦ãããã®ã¯ããData Source Itemããããããè¨å®(çµæ§é¢å)
- 対å¿ãããã¼ã¿ãã³ãã¬ã¼ããæå®ãã¦ãData Sourcesããä½æ
- ãGraph Templatesãã§ã°ã©ããã³ãã¬ã¼ããä½ã(çµæ§é¢å)
- 対å¿ããã°ã©ããã³ãã¬ã¼ããæå®ãã¦ãGraph Managementãã§å®éã®ã°ã©ããä½æ
ã¨ããæµããcactiã¯æºåãè¨å®ãé¢åã§ãä»çµã¿ãä½æ¥æé ãé£ããã
http://www.aconus.com/~oyaji/suse9.3/cacti_linux2.htm
ã大å¤åèã«ãªã£ã¦ããã詳ããè¨å®æ¹æ³ã¯ãã¡ããåç
§ã
cacti以å¤ã§ã¯ãåæ§ã®è¦é ã§ãGNU screenã§表示ããããã¨ãã§ããã
*1:èªåæ¤åºã»èªåè¨å®ãã¦ããããããæéã¯ããããªã
*2:ãã£ã¹ããªã«é©ãããã¡ã¤ã«ã«æ¸ãã¦ãããããã«ãªã£ã¦ãã
*3:å ã ã®å¤ã試ãã«åã£ã¦ã¿ãã¨ãããin1ã2040ãin6ã1912ã§ã/etc/sensors.confã§ã®è¨ç®(compute)ã®çµæãåãã®sensorsã®çµæã«ãªã£ã¦ãããã¨ã確èª
*4:ãã¼ãçªå·ã¯è¨å®ã§å¤æ´å¯è½