Skip to content

Cannot read hwmon*/temp1_input file #21

Closed
@mregni

Description

Hi,

I'm trying to get the smfc tool working on my homelab (X10DRi) but got stuck with the hwmon paths.
Seems that the CPU zone is initialized corretly but the HD zone can't find the temp1_input files anywhere.

I did some digging and indeed, all my /sys/class/scsi_disk/* folders don't have a hwmon directory in them.
Any idea what I'm doing wrong here?

DEBUG output

root@mars:/opt/smfc# ./smfc.py -o 0 -l 4
CONFIG: Logging module was initialized with:
CONFIG:    log_level = 4
CONFIG:    log_output = 0
CONFIG: Command line arguments:
CONFIG:    original arguments: ./smfc.py -o 0 -l 4
CONFIG:    parsed config file = smfc.conf
CONFIG:    parsed log level = 4
CONFIG:    parsed log output = 0
DEBUG: Configuration file (smfc.conf) loaded
CONFIG: Ipmi module was initialized with:
CONFIG:    command = /usr/bin/ipmitool
CONFIG:    fan_mode_delay = 10
CONFIG:    fan_level_delay = 2
CONFIG:    swapped_zones = True
DEBUG: Old IPMI fan mode = FULL_MODE
DEBUG: CPU zone fan controller enabled
CONFIG: CPU zone fan controller was initialized with:
CONFIG:    ipmi zone = 0
CONFIG:    count = 2
CONFIG:    temp_calc = 1
CONFIG:    steps = 6
CONFIG:    sensitivity = 3.0
CONFIG:    polling = 2.0
CONFIG:    min_temp = 30.0
CONFIG:    max_temp = 60.0
CONFIG:    min_level = 35
CONFIG:    max_level = 100
CONFIG:    hwmon_path = ['/sys/devices/platform/coretemp.0/hwmon/hwmon4/temp1_input', '/sys/devices/platform/coretemp.1/hwmon/hwmon5/temp1_input']
CONFIG:    Temperature to level mapping:
CONFIG:    0. [T:30.0C - L:35%]
CONFIG:    1. [T:35.0C - L:45%]
CONFIG:    2. [T:40.0C - L:56%]
CONFIG:    3. [T:45.0C - L:67%]
CONFIG:    4. [T:50.0C - L:78%]
CONFIG:    5. [T:55.0C - L:89%]
CONFIG:    6. [T:60.0C - L:100%]
DEBUG: HD zone fan controller enabled
Traceback (most recent call last):
  File "/opt/smfc/./smfc.py", line 975, in <module>
    main()
  File "/opt/smfc/./smfc.py", line 951, in main
    my_hd_zone = HdZone(my_log, my_ipmi, my_config)
  File "/opt/smfc/./smfc.py", line 703, in __init__
    super().__init__(
  File "/opt/smfc/./smfc.py", line 390, in __init__
    self.build_hwmon_path(hwmon_path)
  File "/opt/smfc/./smfc.py", line 786, in build_hwmon_path
    raise ValueError(self.ERROR_MSG_FILE_IO.format(path))
ValueError: Cannot read file (/sys/class/scsi_disk/0:0:13:0/device/hwmon/hwmon*/temp1_input).

Config file

[Ipmi]
# Path for ipmitool (str, default=/usr/bin/ipmitool)
command=/usr/bin/ipmitool
# Delay time after changing IPMI fan mode (int, seconds, default=10)
fan_mode_delay=10
# Delay time after changing IPMI fan level (int, seconds, default=2)
fan_level_delay=2
# CPU and HD zones are swapped (bool, default=0).
swapped_zones=1

[CPU zone]
# Fan controller enabled (bool, default=0)
enabled=1
# Number of CPUs (int, default=1)
count=2
# Calculation method for CPU temperatures (int, [0-minimum, 1-average, 2-maximum], default=1)
temp_calc=1
# Discrete steps in mapping of temperatures to fan level (int, default=6)
steps=6
# Threshold in temperature change before the fan controller reacts (float, C, default=3.0)
sensitivity=3.0
# Polling time interval for reading temperature (int, sec, default=2)
polling=2
# Minimum CPU temperature (float, C, default=30.0)
min_temp=30.0
# Maximum CPU temperature (float, C, default=60.0)
max_temp=60.0
# Minimum CPU fan level (int, %, default=35)
min_level=35
# Maximum CPU fan level (int, %, default=100)
max_level=100
# Optional parameter, it will be generated automatically (can be used for testing and in special cases).
# Path for CPU sys/hwmon/coretemp file(s) (str multi-line list, default=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input)
# hwmon_path=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input
#            /sys/devices/platform/coretemp.1/hwmon/hwmon*/temp1_input


[HD zone]
# Fan controller enabled (bool, default=0)
enabled=1
# Number of HDs (int, default=1)
count=23
# Calculation of HD temperatures (int, [0-minimum, 1-average, 2-maximum], default=1)
temp_calc=1
# Discrete steps in mapping of temperatures to fan level (int, default=4)
steps=4
# Threshold in temperature change before the fan controller reacts (float, C, default=2.0)
sensitivity=2.0
# Polling interval for reading temperature (int, sec, default=10)
polling=10
# Minimum HD temperature (float, C, default=32.0)
min_temp=32.0
# Maximum HD temperature (float, C, default=46.0)
max_temp=46.0
# Minimum HD fan level (int, %, default=35)
min_level=35
# Maximum HD fan level (int, %, default=100)
max_level=100
# Names of the HDs (str multi-line list, default=)
# These names MUST BE specified in '/dev/disk/by-id/...' form!
hd_names=/dev/disk/by-id/scsi-SATA_Samsung_SSD_870_S6PUNX0T715310D
         /dev/disk/by-id/scsi-SATA_SATA_SSD_67F407531F2400139578
         /dev/disk/by-id/scsi-SATA_SATA_SSD_96D70754012400149905
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ0XPDH0000C915756F
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1CRWT0000C9206GHS
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1D3FM0000C9206HJW
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1F6HL0000C920JKGJ
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1F6MV0000C920N6EE
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1KB860000C850L5S0
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ1LZG30000C9247N7F
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ245PF0000C843F5T0
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ24AAS0000C920N7L6
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2DCZ60000C925CLFV
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2E8CC0000C922FXGV
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2G2330000C9201HJX
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2JDXL0000C93432Y5
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2JSFW0000G84101EM
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2KASF0000C9355QHB
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2KZVZ0000C9342YAG
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2LPKD0000C9362E9U
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ2M09R0000C9362FJX
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ443GZ0000C006EFT5
         /dev/disk/by-id/scsi-SIBM-ESXS_ST14000NM0288_E_ZHZ4CGJ50000C008J0BA
# Optional parameter, it will be generated automatically (can be used for testing and in special cases).
# Path for HD sys/hwmon/drivetemp file(s) (str multi-line list, default=/sys/class/scsi_disk/0:0:0:0/device/hwmon/hwmon*/temp1_input)
# hwmon_path=/sys/class/scsi_disk/0:0:0:0/device/hwmon/hwmon*/temp1_input
#            /sys/class/scsi_disk/1:0:0:0/device/hwmon/hwmon*/temp1_input

/sys/class/scsi_disk content

root@mars:/sys/class/scsi_disk# ls
0:0:0:0  0:0:10:0  0:0:12:0  0:0:14:0  0:0:16:0  0:0:18:0  0:0:2:0  0:0:4:0  0:0:6:0  0:0:8:0  10:0:0:0  9:0:0:0
0:0:1:0  0:0:11:0  0:0:13:0  0:0:15:0  0:0:17:0  0:0:19:0  0:0:3:0  0:0:5:0  0:0:7:0  0:0:9:0  5:0:0:0

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions