特殊:Badtitle/NS100:SensorInstallHowto
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SensorInstallHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/af | • {{#if: UbuntuHelp:SensorInstallHowto|Afrikaans| [[::SensorInstallHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ar | • {{#if: UbuntuHelp:SensorInstallHowto|العربية| [[::SensorInstallHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/az | • {{#if: UbuntuHelp:SensorInstallHowto|azərbaycanca| [[::SensorInstallHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/bcc | • {{#if: UbuntuHelp:SensorInstallHowto|جهلسری بلوچی| [[::SensorInstallHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/bg | • {{#if: UbuntuHelp:SensorInstallHowto|български| [[::SensorInstallHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/br | • {{#if: UbuntuHelp:SensorInstallHowto|brezhoneg| [[::SensorInstallHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ca | • {{#if: UbuntuHelp:SensorInstallHowto|català| [[::SensorInstallHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/cs | • {{#if: UbuntuHelp:SensorInstallHowto|čeština| [[::SensorInstallHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/de | • {{#if: UbuntuHelp:SensorInstallHowto|Deutsch| [[::SensorInstallHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/el | • {{#if: UbuntuHelp:SensorInstallHowto|Ελληνικά| [[::SensorInstallHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/es | • {{#if: UbuntuHelp:SensorInstallHowto|español| [[::SensorInstallHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/fa | • {{#if: UbuntuHelp:SensorInstallHowto|فارسی| [[::SensorInstallHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/fi | • {{#if: UbuntuHelp:SensorInstallHowto|suomi| [[::SensorInstallHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/fr | • {{#if: UbuntuHelp:SensorInstallHowto|français| [[::SensorInstallHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/gu | • {{#if: UbuntuHelp:SensorInstallHowto|ગુજરાતી| [[::SensorInstallHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/he | • {{#if: UbuntuHelp:SensorInstallHowto|עברית| [[::SensorInstallHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/hu | • {{#if: UbuntuHelp:SensorInstallHowto|magyar| [[::SensorInstallHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/id | • {{#if: UbuntuHelp:SensorInstallHowto|Bahasa Indonesia| [[::SensorInstallHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/it | • {{#if: UbuntuHelp:SensorInstallHowto|italiano| [[::SensorInstallHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ja | • {{#if: UbuntuHelp:SensorInstallHowto|日本語| [[::SensorInstallHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ko | • {{#if: UbuntuHelp:SensorInstallHowto|한국어| [[::SensorInstallHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ksh | • {{#if: UbuntuHelp:SensorInstallHowto|Ripoarisch| [[::SensorInstallHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/mr | • {{#if: UbuntuHelp:SensorInstallHowto|मराठी| [[::SensorInstallHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ms | • {{#if: UbuntuHelp:SensorInstallHowto|Bahasa Melayu| [[::SensorInstallHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/nl | • {{#if: UbuntuHelp:SensorInstallHowto|Nederlands| [[::SensorInstallHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/no | • {{#if: UbuntuHelp:SensorInstallHowto|norsk| [[::SensorInstallHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/oc | • {{#if: UbuntuHelp:SensorInstallHowto|occitan| [[::SensorInstallHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/pl | • {{#if: UbuntuHelp:SensorInstallHowto|polski| [[::SensorInstallHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/pt | • {{#if: UbuntuHelp:SensorInstallHowto|português| [[::SensorInstallHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ro | • {{#if: UbuntuHelp:SensorInstallHowto|română| [[::SensorInstallHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/ru | • {{#if: UbuntuHelp:SensorInstallHowto|русский| [[::SensorInstallHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/si | • {{#if: UbuntuHelp:SensorInstallHowto|සිංහල| [[::SensorInstallHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/sq | • {{#if: UbuntuHelp:SensorInstallHowto|shqip| [[::SensorInstallHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/sr | • {{#if: UbuntuHelp:SensorInstallHowto|српски / srpski| [[::SensorInstallHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/sv | • {{#if: UbuntuHelp:SensorInstallHowto|svenska| [[::SensorInstallHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/th | • {{#if: UbuntuHelp:SensorInstallHowto|ไทย| [[::SensorInstallHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/tr | • {{#if: UbuntuHelp:SensorInstallHowto|Türkçe| [[::SensorInstallHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/vi | • {{#if: UbuntuHelp:SensorInstallHowto|Tiếng Việt| [[::SensorInstallHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/yue | • {{#if: UbuntuHelp:SensorInstallHowto|粵語| [[::SensorInstallHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/zh | • {{#if: UbuntuHelp:SensorInstallHowto|中文| [[::SensorInstallHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/zh-hans | • {{#if: UbuntuHelp:SensorInstallHowto|中文(简体)| [[::SensorInstallHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SensorInstallHowto | UbuntuHelp:SensorInstallHowto | {{#if: | :}}SensorInstallHowto}}/zh-hant | • {{#if: UbuntuHelp:SensorInstallHowto|中文(繁體)| [[::SensorInstallHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SensorInstallHowto|:SensorInstallHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :SensorInstallHowto/zh | | {{#ifexist: SensorInstallHowto/zh | | {{#ifeq: {{#titleparts:SensorInstallHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SensorInstallHowto|1|-1|}} | zh | | }}
Ubuntu can monitor CPU and other system temperatures, fan speeds, and other system data, using an application called lm-sensors and another application to display lm-sensors's data on your desktop. Warning: IBM Thinkpad users should not install LM Sensors. Full story is available here. sensor homepage http://secure.netroedge.com/~lm78/download.html This Howto is from this Ubuntu Forums thread.
Install and Configure lm-sensors
Install the following packages lm-sensors
(see InstallingSoftware).
Run the mkdev.sh script in the lm-sensors source. It is extracted below:
Copy the script file below to a text editor and save it to a file named mkdev.sh.
#!/bin/bash # Here you can set several defaults. # The number of devices to create (max: 256) NUMBER=32 # The owner and group of the devices OUSER=root OGROUP=root # The mode of the devices MODE=600 # This script doesn't need to be run if devfs is used if [ -r /proc/mounts ] ; then if grep -q "/dev devfs" /proc/mounts ; then echo "You do not need to run this script as your system uses devfs." exit; fi fi i=0; while [ $i -lt $NUMBER ] ; do echo /dev/i2c-$i mknod -m $MODE /dev/i2c-$i c 89 $i || exit chown "$OUSER:$OGROUP" /dev/i2c-$i || exit i=$[$i + 1] done #end of file
Make the file executable:
chmod 755 mkdev.sh
Run mkdev.sh from the current directory
sudo ./mkdev.sh
3. Now run sensors-detect and answer YES to all YES/no questions. I generally use the ISA bus rather than the SMBus bus, your choice to this question!. At the end of the detection phase, a list of modules that needs to be loaded will displayed. You will need to write these down or print the list for the next steps.
sudo sensors-detect
Below is an example of results from sensors-detect:
#************************************************* ***************************** To make the sensors modules behave correctly, add these lines to /etc/modules: #----cut here---- # I2C adapter drivers i2c-viapro i2c-isa # I2C chip drivers eeprom it87 #----cut here----
Then, run /etc/init.d/module-init-tools To make the sensors modules behave correctly, add these lines to /etc/modprobe.d/local and run update-modules (* *):
#----cut here---- # I2C module options alias char-major-89 i2c-dev #----cut here---- #**********************************
In this example, we add the modules in reverse order (order is critical!) in "/etc/modules".
#*************************************************************** # /etc/modules: kernel modules to load at boot time. # # This file should contain the names of kernel modules that are # to be loaded at boot time, one per line. Comments begin with # a "#", and everything on the line after them are ignored. psmouse mousedev ide-cd ide-disk ide-generic lp #For lm-sensors, i2c modules it87 i2c-viapro i2c-isa #end of file! #*****************************************
Anchor(*) * I found that there was no "/etc/modprobe.d/local" and that "alias char-major-89 i2c-dev" was already listed in "/etc/modprobe.d/aliases". So, nothing to do here. Now load the modules manually using modprobe and update the dependencies.
sudo modprobe i2c-sensor sudo modprobe i2c-viapro sudo modprobe i2c-isa sudo modprobe it87 sudo depmod -a <may not be needed!> sudo update-modules <may not be needed!>
Now test the sensor output using the lm-sensors utility "sensors".
sensors ************************************************** ***************** it87-isa-0290 Adapter: ISA adapter VCore 1: +1.57 V (min == +1.42 V, max == +1.57 V) ALARM VCore 2: +2.66 V (min == +2.40 V, max == +2.61 V) ALARM +3.3V: +6.59 V (min == +3.14 V, max == +3.46 V) ALARM +5V: +5.11 V (min == +4.76 V, max == +5.24 V) +12V: +11.78 V (min == +11.39 V, max == +12.61 V) -12V: -19.14 V (min == -12.63 V, max == -11.41 V) ALARM -5V: +0.77 V (min == -5.26 V, max == -4.77 V) ALARM Stdby: +5.00 V (min == +4.76 V, max == +5.24 V) VBat: +3.12 V fan1: 3668 RPM (min == 0 RPM, div == fan2: 0 RPM (min == 664 RPM, div == ALARM fan3: 0 RPM (min == 2657 RPM, div == 2) ALARM M/B Temp: +39°C (low == +15°C, high == +40°C) sensor = thermistor CPU Temp: +36°C (low == +15°C, high == +45°C) sensor = thermistor Temp3: +96°C (low == +15°C, high == +45°C) sensor = diode ************************************************** ********************
Reboot Ubuntu and the sensors should now be detected during the boot process properly! The sensor output may be tweaked by editing the "/etc/sensors.conf" file. It is possible to correct inaccurate scaling too. For details check "man sensors.conf".
Get Sensor Information Displayed on your Desktop
Search Synaptic for either "sensors" to bring up a list of sensor-related applications, including xsensors and ksensors.
Ksensors seems to work better for many people, and be easier to configure. Install the ksensors
package (see InstallingSoftware). Start it from terminal with ksensors, and you should be able to choose which temperature, fan RPM, or other displays you want.
To get Ksensors to start when your computer starts, go System menu --> Preferences --> Sessions, and in the last tab, Startup Programs, add ksensors. (or whichever sensors display program you choose to use).
For a GNOME alternative, you can apt-get or Synaptic search/install of "sensors-applet", a GNOME panel applet that displays temperatures and fan speeds from lm-sensors. After installation, you right click on any panel that you want to have it displayed on, and click "add to panel". Under the category of "system and hardware" there should be a icon with the text "hardware system monitor". Click on this icon, and drag it to the panel where you want the information displayed. At first it will just display a bunch of text, but you can change it to a icon view and which temperatures/fan speeds get displayed by right clicking on the applet -> preferences.
sensors-applet also supports "hddtemp", so if you want it to also display your hard drive temperatures, you can apt-get or synaptic search/install for "hddtemp" and then restart the applet by removing it from the panel, and then it should be in the list of available sensors to show on the panel.
Comments
In Gutsy the process to configure lm-sensors is much simpler. I installed lm-sensors and sensors-applet, ran sudo sensors-detect (and said yes to everything). It asks if I want it to automatically add the modules to /etc/modules, I said yes. Then restart to get the modules (one could do some modprobing, but just restarting is easier) . Then I added the sensor applet to my panel. -- SamTygier