Closed bdaase closed 4 years ago
Seems to be a pstutil bug, could you please share your version of pstuil?
python -c "import psutil; print(psutil.__version__)"
Alright
python -c "import psutil; print(psutil.__version__)" 5.6.3
Could you please list the content of the directory /sys/class/hwmon/hwmon0/
, and what you get if you run sensors
(requries lm-sensors to be installed)
➜ ~ sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +34.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +33.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +34.0°C (high = +100.0°C, crit = +100.0°C)
Core 2: +32.0°C (high = +100.0°C, crit = +100.0°C)
Core 3: +33.0°C (high = +100.0°C, crit = +100.0°C)
BAT0-acpi-0
Adapter: ACPI interface
in0: +8.64 V
curr1: +3.07 A
ath10k_hwmon-pci-0200
Adapter: PCI adapter
temp1: +42.0°C
pch_skylake-virtual-0
Adapter: Virtual device
temp1: +29.5°C
acpitz-acpi-0
Adapter: ACPI interface
temp1: +25.0°C (crit = +107.0°C)
➜ ~ tree /sys/class/hwmon/hwmon0/
/sys/class/hwmon/hwmon0/
├── device -> ../../AC
├── name
├── power
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_time
│ ├── runtime_status
│ └── runtime_suspended_time
├── subsystem -> ../../../../../../../class/hwmon
├── temp1_label
├── temp2_label
└── uevent
3 directories, 9 files
Same here on openSUSE Tumbleweed, kernel 5.3.1. I think this is due to the recent kernel.
$python3 -c "import psutil; print(psutil.__version__)"
5.6.0
$tree /sys/class/hwmon/hwmon0/
tree /sys/class/hwmon/hwmon0/
/sys/class/hwmon/hwmon0/
├── device -> ../../AC
├── name
├── power
│ ├── async
│ ├── autosuspend_delay_ms
│ ├── control
│ ├── runtime_active_kids
│ ├── runtime_active_time
│ ├── runtime_enabled
│ ├── runtime_status
│ ├── runtime_suspended_time
│ └── runtime_usage
├── subsystem -> ../../../../../../../../../../class/hwmon
├── temp1_label
├── temp2_label
└── uevent
s-tui
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon0/temp1_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon0/temp2_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon3/temp1_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon3/temp2_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring OSError(61, 'No data available') for file '/sys/class/hwmon/hwmon5/temp1_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon7/temp1_input'
RuntimeWarning)
/usr/lib64/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon7/temp2_input'
RuntimeWarning)
sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +55.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +53.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +54.0°C (high = +100.0°C, crit = +100.0°C)
Core 2: +52.0°C (high = +100.0°C, crit = +100.0°C)
Core 3: +51.0°C (high = +100.0°C, crit = +100.0°C)
Core 4: +51.0°C (high = +100.0°C, crit = +100.0°C)
Core 5: +52.0°C (high = +100.0°C, crit = +100.0°C)
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 0 RPM
temp1: +54.0°C
temp2: +56.0°C
temp3: +0.0°C
temp4: +0.0°C
temp5: +0.0°C
temp6: +0.0°C
temp7: +0.0°C
temp8: +0.0°C
acpitz-acpi-0
Adapter: ACPI interface
temp1: +54.0°C (crit = +128.0°C)
iwlwifi-virtual-0
Adapter: Virtual device
temp1: N/A
BAT0-acpi-0
Adapter: ACPI interface
in0: +12.13 V
pch_cannonlake-virtual-0
Adapter: Virtual device
temp1: +66.0°C
@bubbleguuum, so these error did not appear before the update? If so I might need to install the new kernel on a test system to check this.
There are quite a lot of issues with hwmon in Linux. As an example: https://github.com/giampaolo/psutil/issues/1323
These warnings are displayed each time s-tui
runs an update cycle?
@bubbleguuum, so these error did not appear before the update? If so I might need to install the new kernel on a test system to check this.
Oh, indeed.
When running a 5.3.x kernel the error messages appear, when running a 5.2.x kernel they don't.
These warnings are displayed each time
s-tui
runs an update cycle?
I see a lot of them on startup and no pattern when the occur again. But it is way less then every update cycle.
I'm confirming that these errors do not happen on Kernel 5.2 (tried 5.2.14)
Also the same here.
$ uname -r
5.3.8
$ python -c "import psutil; print(psutil.__version__)"
5.6.1
/usr/lib/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon3/temp1_input'
RuntimeWarning)
/usr/lib/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon3/temp2_input'
RuntimeWarning)
/usr/lib/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon6/temp1_input'
RuntimeWarning)
/usr/lib/python3.7/site-packages/psutil/_pslinux.py:1223: RuntimeWarning: ignoring FileNotFoundError(2, 'No such file or directory') for file '/sys/class/hwmon/hwmon6/temp2_input'
RuntimeWarning)
# cd /sys/class/hwmon/hwmon3
# tree
.
|____uevent
|____power
| |____runtime_active_time
| |____runtime_status
| |____autosuspend_delay_ms
| |____runtime_suspended_time
| |____control
|____temp1_label
|____device
|____temp2_label
|____subsystem
|____name
And while running as user or root, [Errno 5] Input/output error Unable to read file /dev/cpu/0/msr
so max freq. is incorrect
I misunderstood the function of acpi_cpufreq
and it does not properly support my processor.
same error for me on Manjaro 18.1.3 with 0.8.3 version of s-tui Probably use python 3.8 better ?
Since this is probably reproducible on certain kernel version, and requires installation of hardware (no temperature sensors in VM) it will take me some time to address this. Any help is appreciated.
Ok, dusted out an X220 with Majaro (thanks @liberodark), install kernel 5.3 and was able to reproduce the bug.
It appears that starting 5.3 kernel version, there is a file for (for example) /sys/class/hwmon/hwmon1/temp1_label
but no corresponding /sys/class/hwmon/hwmon1/temp1_input
.
Interestingly, there is sometimes in0_input
which apparently reports voltage, and could be interesting to look at in the future.
As smartly stated by @giampaolo, Linux's /sys/class/hwmon
is quite a mess
The immediate action is to ignore the warning emitted by psutil
.
@bubbleguuum @jiblime @liberodark @BjoernDaase, please confirm fix in latest master
Confirming issue is fixed in master
Fixed in version 1.0
Step 1: Describe your environment
Step 2: Describe the problem:
Observed Results:
Those get spammed onto the console, disrupting the graphs shown:
Debug Results, output of
s-tui -d
created in a file_s-tui.log
:Step 3: Reproduce the problem:
Steps to reproduce:
s-tui