Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
For the D-Link kernels there are temperature and fanspeed programs that use the unusual ioctl interface to read the temperature, and to read and set the fan speed. Community scripts are available that implement custom fan controllers.
For vanilla kernels, temperature and fan speed are accessible through files in the /sys tree. The lm_sensors packages includes the fancontrol bash script.
Both approaches use shell scripts, and you need different scripts for different kernels. Also, compared to compiled C programs, shell scripts clearly need more memory and CPU cycles. Because of this, I wrote a C program that works on both dlink and vanilla kernels. It needs different config files, though.
The attached tarball includes binary, C source, and two example config files. For the dlink firmware kernels, use fan.dns323.conf, and fan.conf for vanilla kernels. The dlink config contains the magic line "dns323=yes" to enable dlink mode, while fan.conf contains pointers to the files in /sys. Another important difference is that for dlink kernels, you really set the fanspeed, while for vanilla kernels, you set a PWM value (pulse-width modulation). Temperature is specified in milli C/F (i.e. 45 degrees C -> 45000).
Test fanctl with:
/path/to/fanctl /path/to/fan.dns323.conf
If it works, you can send it to background as usual:
/path/to/fanctl /path/to/fan.dns323.conf >/dev/null 2>/dev/null </dev/null &
You might want to redirect stdout to a log file instead, e.g. to create nice graphs with gnuplot.
I'm not sure about reasonable temperature and pwm settings. Please post the values that work best for you.
Note that the fanctl program will start at high speed for one full interval.
Offline
Sounds good, I would like to test it. (Some additional idle CPU cycles are always welcome). Could you please be more precise on how to use the program?
Offline
Gonna try this 1 out right away, since the ones from the Wiki keep my HD's awake (CH3SNAS, ffp from usb stick).
EDIT:
Adjusted the conf with a tiny bit higher temperatures (critical @ 60, low @ 38, high @ 53, interval 60)
Seems to be working perfectly so far, the HD's stay asleep, while having started this from the usb stick.
Perhaps a start script for use with ffp might come in handy, but I have no idea how to write those.
A question: does this put the fan off when below low temperature? Although I never seen the temperature that low it would be neat if it's fully silenced when no one is using the device.
Last edited by Jimmie (2008-08-24 19:53:24)
Offline
Can someone give a bit more detailed instructions on how to use this script?
I typed in /path/to/fanctl /path/to/fan.conf (with the correct path) and hit enter, but there are several error messages about the /sys/class/i2c-adapter/i2c-0/0-0048/temp1_input which does not exist.
I'm using a CH3SNAS.
Offline
knireis wrote:
Can someone give a bit more detailed instructions on how to use this script?
I typed in /path/to/fanctl /path/to/fan.conf (with the correct path) and hit enter, but there are several error messages about the /sys/class/i2c-adapter/i2c-0/0-0048/temp1_input which does not exist.
I'm using a CH3SNAS.
Which vanilla kernel are you running? Maybe you should read the initial post (again).
Last edited by timschuerewegen (2008-08-26 15:11:34)
Offline
timschuerewegen wrote:
knireis wrote:
Can someone give a bit more detailed instructions on how to use this script?
I typed in /path/to/fanctl /path/to/fan.conf (with the correct path) and hit enter, but there are several error messages about the /sys/class/i2c-adapter/i2c-0/0-0048/temp1_input which does not exist.
I'm using a CH3SNAS.Which vanilla kernel are you running? Maybe you should read the initial post (again).
I don't know, i thought that vanilla meant other kernels than the dlink, so including my ch3snas. But vanilla might mean something else.
Offline
knireis wrote:
I don't know, i thought that vanilla meant other kernels than the dlink, so including my ch3snas. But vanilla might mean something else.
From http://en.wikipedia.org/wiki/Linux_kernel
Further developing his own code and integrating changes made by other programmers, Linus Torvalds keeps releasing new versions of the Linux kernel. These are called "vanilla" kernels, meaning they have not been further modified by anyone. Many Linux operating system vendors modify the kernels of their product, mainly in order to add support for drivers or features which have not officially been released as stable, while some distributions rely on vanilla kernels.
Did you try fan.dns323.conf? If it does not work (due to differences between DNS-323 and CH3SNAS hardware/kernels) then I am afraid Fonz will have to update his code.
Offline
timschuerewegen wrote:
Did you try fan.dns323.conf? If it does not work (due to differences between DNS-323 and CH3SNAS hardware/kernels) then I am afraid Fonz will have to update his code.
See Jimmie's post. He's got a CH3SNAS, too.
Offline
Hi fonz - will this new prog of yours kill the inbuilt fan process like the other scripts you refered to?
RAP
Offline
I started using it (with fan.dns323.conf), thank you Fonz.
I tested by briefly closing the fan output, and measured temperature raised, and fan speed increased.
As Jimmie, I could not validate that the fan stops when disks are idle -- mine never are...
Last edited by ismora (2008-08-26 23:43:26)
Offline
Jimmie wrote:
A question: does this put the fan off when below low temperature? Although I never seen the temperature that low it would be neat if it's fully silenced when no one is using the device.
I think the fan stops if you set pwm_lo low enough. However, it might not start until the controller sets fanspeed a little higher than the speed at which the fan stopped.
Offline
hi,
I am using aDN323 with this script. What is the temperature unit being use here?
e.g. temp_lo=38000 means 38 C?
My DNS 323 uses F in previous fan control script found on the wiki. Does this mean I should convert the 38000 ?
Thanks
Offline
celcius0 wrote:
My DNS 323 uses F in previous fan control script found on the wiki. Does this mean I should convert the 38000 ?
It uses F because the 'temperature' programs prints Fahrenheit on your device. fanctl doesn't use this program. I suppose the best way to check is to run 'dns323-temp'. If it prints correct values, use Millicelsius in the fanctl config.
Offline
Fan never stop to me either. I set temp_lo to 37, even temp is 32, fan speed is still 2700
Offline
I c, I thought it going to stop if temp lower than temp_lo. How can I make it like that? if temperature low than temp_lo, stop the fan?
Offline
noodle wrote:
I c, I thought it going to stop if temp lower than temp_lo. How can I make it like that? if temperature low than temp_lo, stop the fan?
Offline
Instructions for the latest fancontroller: http://nas-tweaks.net/CH3SNAS:Tutorials/fancontrol
Offline
This fancontroller works good on my CH3SNAS. With previous fancontrol scripts, I usually had problems with disk spindown.
Initially after installing this package I lost spindown as well, but after changing the idle time interval in the webinterface from 10 to 15 and then back to 10 (with saving the setting in between) the spindown started working again. Don't know why but maybe this can help others with similar problems.
Offline
DeLaCroix wrote:
Instructions for the latest fancontroller: http://nas-tweaks.net/CH3SNAS:Tutorials/fancontrol
Installed as per instruction and working fine.
With appreciation for a job well done
Offline
Works great. Can I suggest an improvement though?
I'd like to also monitor the hard drive status. If the drives are active, do not power off the fan (leave it at the pwm_lo speed).
The reason I request this is so that the fans will start cooling when the drives activate, instead of delaying until the temperature rises.
On a related note, I have recently seen the temperature and fanspeed functions fail on my device (DNS-323 FW 1.05). This failure occured when I was playing around with other fan control scripts, so it may or mat not occur under normal circumstances. When the functions fail, temperature always returns 0 C (or 32 F), while fanspeed returns ~2533 (the fan was off at the time). Similarily the dns323-temp ("0 C 32 F") and dns323-fan ("2533 2533 194") commands return invalid results. I will try to create a script to replicate this bug.
Cheers,
Dave.
Offline
DaveN wrote:
On a related note, I have recently seen the temperature and fanspeed functions fail on my device (DNS-323 FW 1.05).
Offline
DaveN wrote:
I'd like to also monitor the hard drive status. If the drives are active, do not power off the fan (leave it at the pwm_lo speed).
I second that.
I would propose this logic:
if (isAnyDiskSpinning()) { currentTemp = maximum (getCurrentTemp() ; temp_lo + 0.01) /* so currentTemp is > temp_lo --> fan will start if not currently running and will never stop when a disk is spinning */ spinningState = true /* remember that disks are spinning for later on */ } else { /* no disk is spinning */ currentTemp = getCurrentTemp() if (spinningState == true) { /* so disks have just shutdown */ if ( currentTemp <= temp_lo) { /* Disks stopped, temp low, so turn of fan */ setFanSpeedTo(pwm_start); sleep 30 /* power up already running fan for 30 seconds to cool just stopped disks a bit * dont know if this is needed to prevent fan from starting later on, so * this is experimental and SHOULD be configurable :-) */ setFanSpeedTo(pwm_stop) /* thus turn of fan, if pwm_stop == 0 (default) */ } spinningState = false /* remember that disks are NOT spinning for later on */ } } /* continue with current behavier using currentTemp as actual temperature reading */ ...
This will power on the fan as soon as a disk starts spinning and power off the fan when disks are shut down and temperature allows it. The experimental bit will power up the fan prior to turning it off to cool things a litte more.
EDIT: Typo
Last edited by Loose Gravel (2008-10-31 11:27:18)
Offline
Code to detect disk state for firmware kernels is in dns323-spindown.c ( http://www.inreto.de/dns323/utils/dns32 … 176.tar.gz ). The fanctl source code is available from the same directory ( http://www.inreto.de/dns323/utils/fanctl-2.tar.gz ). I'm not that interested in this feature, but this is open source. Feel free to add it yourself.
Offline