Fan_ctrl.sh runs 288 times per day?

I notice that fan_ctrl.sh shows up a lot in the syslogs. It's running every 5 minutes to change fan speed if the temps of cpu, ram, wifi chipsets are high apparently.

Really?

Every 5 minutes? via cron?

I'm thinking this should be more frequent, and use a while true, do, sleep 1,done loop if there's not a cleaner way.

I can write it, but before I do I wanted to ask if there's a reason that it exists the way it is today?

You might prefer a procd process

You are awesome! I installed the two scripts form your git repo, https://github.com/anomeome/fan_control/

However, after a reboot, service fan_control status shows "inactive" until I manually run 'service fan_control start'. I'm used to a rhel environment where I'd use systemctl or formerly chkconfig but neither are in openwrt.

I suspect the service comand in openwrt allows init scripts to define any verbs they want, an d the verbs enable and disable are customarily used by init scripts in openwrt, but yours doesn't use those.

it looks like yours always starts itself if its on the right board. but it detects that using something called mvebu which I don't have in /lib/ and it doesn't show up as an available package either.

As indicated in the post I linked, my github is out of date, so just grab the 2 bits from the post. I clearly made a mistake in that post, you need to modify crontab not rc.local, oh well... I guess sloth won the day.

1 Like

root@AP0:~# ll /etc/init.d/fan_control /sbin/fan_ctrl.sh
-rwxr-xr-x 1 root root 411 Jul 11 17:57 /etc/init.d/fan_control*
-rwxr-xr-x 1 root root 753 Apr 16 07:59 /sbin/fan_ctrl.sh*

I have those two installed, and commented out the five-minutely cronjob, and then ran:

/etc/init.d/fan_control enable
/etc/init.d/fan_control start

per your post, but after a reboot of my wrt1900ACv1, it still shows:>

root@AP0:~# service fan_control status
inactive

I believe this is because your init script depends on /lib/mvebu.sh existing:

boot() {
. /lib/mvebu.sh

if [[ $(board_name) = armada-xp-linksys-mamba ]]; then
rc_procd start_service
fi
}

And it does not on my system. how do I obtain mvebu.sh?

That is the out of date script from my github, you will need to grab the two of them from the post.