我对命令如何sensors
工作感到有些困惑?
我的 CPU 型号是Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
当我打开笔记本电脑时,它显示我的平均温度为 50 摄氏度,如果我在 Android Studio 中构建一个项目,它会立即升高到 80+,而当构建完成时它又会立即下降到 50?怎么可能在一秒钟之内如此迅速地上升和下降温度?
它是显示准确的温度还是根据正在运行的进程进行猜测?
我对命令如何sensors
工作感到有些困惑?
我的 CPU 型号是Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
当我打开笔记本电脑时,它显示我的平均温度为 50 摄氏度,如果我在 Android Studio 中构建一个项目,它会立即升高到 80+,而当构建完成时它又会立即下降到 50?怎么可能在一秒钟之内如此迅速地上升和下降温度?
它是显示准确的温度还是根据正在运行的进程进行猜测?
是否有终端命令以简单的方式在单个屏幕中显示使用的内存、温度度和 GPU 使用的摘要?
我想在终端中以使用内存(而不是交换等)、GPU 使用(百分比)和温度度的摘要方式向我提供信息 - CPU 有多热?
现在,我必须使用三个不同的终端命令:
watch free -m # For Memory use
watch sensors # For Temperature
watch ndivia-smi # For GPU use
有没有办法在一个屏幕上显示这些信息?这些命令会产生很多人可能不需要的信息。
第一行可能显示内存使用情况。第二行可能显示 GPU 使用情况。第三行可能显示温度。
我想从free -m
“可用”。例如,我想从nvidia-smi
“Volatile GPU-Util”和sensors
所有温度百分比中显示它们的限制(从那个到那个)
Available memory 5500000
Volatile GPU-Util 20%
CPUtemp1 40oC
Fantemp1 41oC
FanTemp2 42oC
etc...
那可能吗?
示例输出:
free -m
输出
$ free -m
total used free shared buff/cache available
Mem: 7815 1938 3548 188 2328 5391
Swap: 2047 57 1990
nvidia-smi
输出
$ nvidia-smi
Fri Jul 31 18:35:45 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.138 Driver Version: 390.138 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 1030 Off | 00000000:01:00.0 On | N/A |
| 32% 44C P8 N/A / 30W | 220MiB / 1998MiB | 1% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1770 G /usr/lib/xorg/Xorg 82MiB |
| 0 8182 G /usr/bin/krunner 6MiB |
| 0 8184 G /usr/bin/plasmashell 55MiB |
| 0 26370 G ...AAAAAAAAAAAACAAAAAAAAAA= --shared-files 74MiB |
+-----------------------------------------------------------------------------+
sensors
输出
$ sensors
it8620-isa-0a30
Adapter: ISA adapter
in0: +0.01 V (min = +0.00 V, max = +3.06 V) ALARM
in1: +2.05 V (min = +0.00 V, max = +3.06 V)
in2: +2.00 V (min = +0.00 V, max = +3.06 V)
in3: +2.02 V (min = +0.00 V, max = +3.06 V)
in4: +0.01 V (min = +0.00 V, max = +3.06 V)
in5: +1.74 V (min = +0.00 V, max = +3.06 V)
in6: +1.50 V (min = +0.00 V, max = +3.06 V)
3VSB: +3.38 V (min = +0.00 V, max = +6.12 V)
Vbat: +3.05 V
fan1: 2986 RPM (min = 0 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
temp1: +47.0°C (low = +127.0°C, high = +127.0°C) sensor = thermistor
temp2: -128.0°C (low = +127.0°C, high = +127.0°C) sensor = disabled
temp3: +35.0°C (low = +127.0°C, high = +127.0°C) sensor = Intel PECI
temp4: +45.0°C
temp5: +42.0°C
temp6: +45.0°C
intrusion0: ALARM
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +97.0°C)
temp2: +29.8°C (crit = +97.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +45.0°C (high = +86.0°C, crit = +92.0°C)
Core 0: +43.0°C (high = +86.0°C, crit = +92.0°C)
Core 1: +44.0°C (high = +86.0°C, crit = +92.0°C)
Core 2: +42.0°C (high = +86.0°C, crit = +92.0°C)
Core 3: +40.0°C (high = +86.0°C, crit = +92.0°C)
我的风扇有噪音问题。之后pwmconfig
,我发现从 120 到 255(我猜这些被称为 pwm 速度),大多数都是损坏的。有什么办法可以修复它吗?任何应用程序?对 linux 和 windows 应用程序都很好。对不起,如果无法正确解释并提前感谢。
编辑-1
PWM 255 FAN 1962
PWM 240 FAN 1467
PWM 225 FAN 2385 (probably incorrect)
PWM 210 FAN 3245 (probably incorrect)
PWM 195 FAN 3013 (probably incorrect)
PWM 180 FAN 2755 (probably incorrect)
PWM 165 FAN 2436 (probably incorrect)
PWM 150 FAN 2136 (probably incorrect)
PWM 135 FAN 1790 (probably incorrect)
PWM 120 FAN 1486
PWM 105 FAN 1397
PWM 90 FAN 1344
PWM 75 FAN 1290
PWM 60 FAN 1247
PWM 45 FAN 1201
PWM 30 FAN 1171
PWM 28 FAN 1165
PWM 26 FAN 1161
PWM 24 FAN 1157
PWM 22 FAN 1153
PWM 20 FAN 1149
PWM 18 FAN 1146
PWM 16 FAN 1144
PWM 14 FAN 1140
PWM 12 FAN 1134
PWM 10 FAN 1134
PWM 8 FAN 1130
PWM 6 FAN 1128
PWM 4 FAN 1123
PWM 2 FAN 1121
PWM 0 FAN 1117
我安装lm-senosrs
并运行sudo sensors-detect
. 这是我得到的:
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# System: Gigabyte Technology Co., Ltd. Z390 GAMING X [Default string]
# Board: Gigabyte Technology Co., Ltd. Z390 GAMING X-CF
# Kernel: 5.3.0-42-generic x86_64
# Processor: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (6/158/12)
This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.
Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): yes
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD Family 10h thermal sensors... No
AMD Family 11h thermal sensors... No
AMD Family 12h and 14h thermal sensors... No
AMD Family 15h thermal sensors... No
AMD Family 16h thermal sensors... No
AMD Family 15h power sensors... No
AMD Family 16h power sensors... No
Intel digital thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Intel 5500/5520/X58 thermal sensor... No
VIA C7 thermal sensor... No
VIA Nano thermal sensor... No
Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): yes
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... Yes
Found unknown chip with ID 0x8688
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... No
Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): yes
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No
Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): yes
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): yes
Found unknown SMBus adapter 8086:a323 at 0000:00:1f.4.
Sorry, no supported PCI bus adapters found.
Next adapter: NVIDIA i2c adapter 1 at 1:00.0 (i2c-0)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 2 at 1:00.0 (i2c-1)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 4 at 1:00.0 (i2c-2)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 6 at 1:00.0 (i2c-3)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 7 at 1:00.0 (i2c-4)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 8 at 1:00.0 (i2c-5)
Do you want to scan it? (yes/NO/selectively): yes
Next adapter: NVIDIA i2c adapter 9 at 1:00.0 (i2c-6)
Do you want to scan it? (yes/NO/selectively): yes
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)
To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!
Do you want to add these lines automatically to /etc/modules? (yes/NO)yes
Successful!
Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.
Unloading cpuid... OK
当我跑步时,sensors
我得到:
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
我试图重新启动,但它没有帮助。跑步/etc/init.d/kmod start
也无济于事。
我试过psensors
了,但似乎看不到 CPU 核心温度。Python
我还尝试使用名为的库读取温度,psutil
但它也看不到 CPU。
>>> import psutil
>>> psutil.sensors_temperatures()
{'acpitz': [shwtemp(label='', current=16.8, high=18.8, critical=18.8), shwtemp(label='', current=27.8, high=119.0, critical=119.0)]}
我还尝试注释掉blacklist i2c_i801
并/etc/modprobe.d/blacklist.conf
重新启动,但没有任何好处。
我想监控conky中的电压,不知道怎么写。我有Ubuntu 20.04 LTS。接下来是传感器输出:
dell_smm-virtual-0
Adapter: Virtual device
Processor Fan: 2901 RPM
CPU: +40.0°C
Ambient: +38.0°C
BAT0-acpi-0
Adapter: ACPI interface
in0: 15.23 V
curr1: 1.12 A
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +41.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +39.0°C (high = +100.0°C, crit = +100.0°C)
pch_skylake-virtual-0
Adapter: Virtual device
temp1: +38.5°C
acpitz-acpi-0
Adapter: ACPI interface
temp1: +25.0°C (crit = +107.0°C)
我有一台双启动的华硕 TP301UJ 笔记本电脑,我的风扇一直很响。我正在尝试在 Ubuntu 中配置我的风扇速度(我在 Windows 10 中很容易做到),但我遇到了问题。
这是我所做的:
我安装了lm-sensors、psensor和fancontrol。psensor运行良好,并读取了风扇速度和所有温度。
Ransudo sensors-detect
只说我需要将coretemp添加到/etc/modules
. coretemp已经在模块中,所以我什么也没做。
重新启动。跑sudo pwmconfig
,它输出:
找到以下设备:
hwmon0 is acpitz
hwmon1 is coretemp
hwmon2 is asus找到以下 PWM 控件:
hwmon2/pwm1 当前值:0hwmon2/pwm1 当前设置为自动速度控制。
一般来说,自动模式比手动模式更受欢迎,因为它更有效并且反应更快。您确定要将此输出设置为手动控制吗?(n)
输入“y”,输出为:
给粉丝一些时间来达到全速...
发现以下风扇传感器:
hwmon2/fan1_input 当前速度:0 ... 跳过!
没有工作风扇传感器,所有读数均为 0。确保连接了 3 线风扇。
您可能还需要增加风扇除数。
有关更多信息,请参阅 doc/fan-divisors。
所以我的风扇进入“手动模式”并开始全速运行但pwmconfig
退出,让我的风扇全速运行。将数字/sys/class/hwmon/hwmon2/pwm1_enable
从 1 更改回 2,使其再次自动。
这是我的问题(我认为):当我的风扇处于“手动模式”时,sensors
显示-1
为它的速度。它没有被检测到!但是在自动模式下,完全没有问题。这使我无法使用pwmconfig
.
我已经尝试添加acpi_enforce_resources=lax
到 grub 文件中的变量GRUB_CMDLINE_LINUX_DEFAULT
。结果是一样的。
我应该怎么办?
我正在尝试控制连接到我的 Asrock J5005-ITX 主板的风扇。我已经确定它包含负责该问题的 Nuvoton NCT6796D 芯片组。我被困在我想sensors-detect
检测它的地方。从这个linux 驱动程序文件中,我了解到我需要加载nct6775
模块。不幸的是,有些事情是不对的:
userName@Server:/$ sudo modprobe nct6775
userName@Server:/$ sudo sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# Board: ASRock J5005-ITX
# Kernel: 4.18.0-25-generic x86_64
# Processor: Intel(R) Pentium(R) Silver J5005 CPU @ 1.50GHz (6/122/1)
This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.
Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): y
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD Family 10h thermal sensors... No
AMD Family 11h thermal sensors... No
AMD Family 12h and 14h thermal sensors... No
AMD Family 15h thermal sensors... No
AMD Family 16h thermal sensors... No
AMD Family 15h power sensors... No
AMD Family 16h power sensors... No
Intel digital thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Intel 5500/5520/X58 thermal sensor... No
VIA C7 thermal sensor... No
VIA Nano thermal sensor... No
Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... Yes
Found unknown chip with ID 0xd423
(logical device B has address 0x290, could be sensors)
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Nuvoton/Fintek'... No
Trying family `ITE'... No
Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): y
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No
Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): y
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Found unknown SMBus adapter 8086:31d4 at 0000:00:1f.1.
Sorry, no supported PCI bus adapters found.
Next adapter: i915 gmbus dpb (i2c-0)
Do you want to scan it? (yes/NO/selectively): y
Next adapter: i915 gmbus dpc (i2c-1)
Do you want to scan it? (yes/NO/selectively): y
Next adapter: i915 gmbus misc (i2c-2)
Do you want to scan it? (yes/NO/selectively): y
Now follows a summary of the probes I have just done.
Just press ENTER to continue: y
Driver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)
To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!
Do you want to add these lines automatically to /etc/modules? (yes/NO)y
Successful!
Monitoring programs won't work until the needed modules are
loaded. You may want to run '/etc/init.d/kmod start'
to load them.
Unloading cpuid... OK
未找到该模块。我究竟做错了什么?