I'd like to have a little panel applet that shows the fan speed. It would be more efficient if I knew the location of fan1_input (and whether it even exists) at startup so I don't have query the location each time I read fan1_input's contents, e.g., include the line
in $HOME/.profile
rather than doing the find before each query for the fan speed. (The boot drive moves from one Pi to another, some with fans, some not.) To do this I need to know if the location is permanent while the Pi is running, but it's determined at boot time.
Code:
export FAN1LOC=$(find /sys/devices/platform/cooling_fan -name "fan1_input" -print -quit)
rather than doing the find before each query for the fan speed. (The boot drive moves from one Pi to another, some with fans, some not.) To do this I need to know if the location is permanent while the Pi is running, but it's determined at boot time.
Statistics: Posted by rquint — Wed Aug 14, 2024 6:22 pm