Some more info on what sensors needs (on my Dell laptop) …
“ldd” tells us the shared libraries loaded
user@machine :~> ldd /usr/bin/sensors
linux-vdso.so.1 (0x00007ffcc976e000)
libsensors.so.4 => /usr/lib64/libsensors.so.4 (0x00007f944ae00000)
libc.so.6 => /lib64/libc.so.6 (0x00007f944aa00000)
libm.so.6 => /lib64/libm.so.6 (0x00007f944b116000)
/lib64/ld-linux-x86-64.so.2 (0x00007f944b420000)
user@machine :~>
This one will certainly show a lot of detail about the files the command (sensors) wants to open and read (configuration files, etc) - might be a bit overwhelming :
user@machine :~> strace -fe trace=open,openat sensors
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/libsensors.so.4", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/lib64/gconv/gconv-modules.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/sys/class/i2c-adapter", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/bus/i2c/devices", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-3/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-10/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-1/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-8/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-6/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-4/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-2/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-0/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-9/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-7/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/bus/i2c/devices/i2c-5/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon8/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon8", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon4/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon4", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC/name", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon5/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon5", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon3/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon3", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/name", O_RDONLY) = 4
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4
openat(AT_FDCWD, "/etc/sensors3.conf", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/sensors.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
openat(AT_FDCWD, "/usr/lib64/gconv/ISO8859-1.so", O_RDONLY|O_CLOEXEC) = 3
iwlwifi_1-virtual-0
Adapter: Virtual device
openat(AT_FDCWD, "/sys/class/hwmon/hwmon8/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon8/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon8/temp1_input", O_RDONLY) = 3
temp1: +32.0°C
coretemp-isa-0000
Adapter: ISA adapter
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_crit_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp1_crit", O_RDONLY) = 3
Package id 0: +36.0°C (high = +100.0°C, crit = +100.0°C)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_crit_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp2_crit", O_RDONLY) = 3
Core 0: +35.0°C (high = +100.0°C, crit = +100.0°C)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_crit_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp3_crit", O_RDONLY) = 3
Core 1: +35.0°C (high = +100.0°C, crit = +100.0°C)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_crit_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp4_crit", O_RDONLY) = 3
Core 2: +35.0°C (high = +100.0°C, crit = +100.0°C)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_crit_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon6/temp5_crit", O_RDONLY) = 3
Core 3: +34.0°C (high = +100.0°C, crit = +100.0°C)
ucsi_source_psy_USBC000:001-isa-0000
Adapter: ISA adapter
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/in0_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/curr1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/in0_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/in0_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/in0_min", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/in0_max", O_RDONLY) = 3
in0: +5.00 V (min = +5.00 V, max = +5.00 V)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/curr1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/curr1_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon2/curr1_max", O_RDONLY) = 3
curr1: +0.00 A (max = +0.00 A)
BAT0-acpi-0
Adapter: ACPI interface
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/in0_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/curr1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/in0_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/in0_input", O_RDONLY) = 3
in0: +7.99 V
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/curr1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon0/curr1_input", O_RDONLY) = 3
curr1: +0.27 A
dell_smm-isa-0000
Adapter: ISA adapter
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp2_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp3_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp4_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_min", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_max", O_RDONLY) = 3
fan1: 0 RPM (min = 0 RPM, max = 5300 RPM)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp1_input", O_RDONLY) = 3
temp1: +35.0°C
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp2_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp2_input", O_RDONLY) = 3
temp2: +30.0°C
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp3_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp3_input", O_RDONLY) = 3
temp3: +29.0°C
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp4_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp4_input", O_RDONLY) = 3
temp4: +29.0°C
pch_cannonlake-virtual-0
Adapter: Virtual device
openat(AT_FDCWD, "/sys/class/hwmon/hwmon5/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon5/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon5/temp1_input", O_RDONLY) = 3
temp1: +35.0°C
acpitz-acpi-0
Adapter: ACPI interface
openat(AT_FDCWD, "/sys/class/hwmon/hwmon3/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon3/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon3/temp1_input", O_RDONLY) = 3
temp1: +25.0°C
nvme-pci-3b00
Adapter: PCI adapter
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp2_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_alarm", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_min", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_max", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp1_crit", O_RDONLY) = 3
Composite: +23.9°C (low = -273.1°C, high = +82.8°C)
(crit = +86.8°C)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp2_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp2_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp2_min", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon1/temp2_max", O_RDONLY) = 3
Sensor 1: +23.9°C (low = -273.1°C, high = +65261.8°C)
+++ exited with 0 +++
user@machine :~>
EDIT: here;s the interesting stuff … first the config files
openat(AT_FDCWD, "/etc/sensors3.conf", O_RDONLY) = 3
openat(AT_FDCWD, "/etc/sensors.d", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
and here’s where sensors gets the fan info and then prints it out
dell_smm-isa-0000
Adapter: ISA adapter
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp1_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp2_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp3_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/temp4_label", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_label", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_input", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_min", O_RDONLY) = 3
openat(AT_FDCWD, "/sys/class/hwmon/hwmon7/fan1_max", O_RDONLY) = 3
fan1: 0 RPM (min = 0 RPM, max = 5300 RPM)