Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hello,
I'm currently running a custom fan control script which works OK. However, I'm wondering whether there's a way to force the fan on when the hard drives are spinning, and off when they're not? The reason being that electronics are generally more heat-tolerant than hard drives so I want to allow a higher unit temperature when the hard drives aren't spinning.
I could accomplish this very simply with a script running from crontab IF I had a command that determined whether the drives are currently spinning (e.g. a command that returns 1 when they're spinning and 0 when they're not or something like that). Is there such a command?
Thanks
cinergi
Offline
You can monitor the system log via 'dmesg' to see if the drives are sleeping or not. You'd have to get a bit creative in your script, but it is fairly straight forward. Although, basing the fan off of the temperature should be sufficient as the drives will bump the heat up pretty quick when running.
My 3 units sit about 32-34 degrees when the drives are idle.
Last edited by FunFiler (2011-06-27 01:27:08)
Offline
Thanks to all who replied. I will look into dns323-utils. As a potentially simpler solution, I've found the hdparm command which, when used with the -C flag, returns the current drive power status. I don't know whether the command is supported on the DNS-323 (can't check it now) but I will see tonight.
The dmesg solution is feasible, but a bit beyond my limited script-writing skills.
Regards,
cinergi
Offline
OK, quick update. hdparm didn't work for me because it didn't recognize any of the hard drives as valid devices (I tried all the /dev/hd*, sd*, and md* one by one).
The dns323-spindown command in the dns323-utils package works, but the problem is that it accesses the hard drive with every call, which defeats the purpose. I tried moving it from /ffp/bin to /usr/bin but it still accesses the hard drive, probably because it calls some FFP libraries. Not sure what to try next.
-cinergi
Offline