Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
or try wget http://www.rootshell.be/~hellfish/ctrl_fanspeed.sh directly in the shell
Offline
hell0 wrote:
or try wget http://www.rootshell.be/~hellfish/ctrl_fanspeed.sh directly in the shell
Thanks, now it's working !!
Offline
Hi all,
I think I just discovered where one can change if the dns is usding Centigrade or Farenheit. My device was using Farenheit but one I changed this to Celcius in the email alert section (alert me if the temperature is to high) it changed the device to Centigrade when checking with temperature g 0.
regards
amichel
Offline
Hello, I have a problem, my English is very bad! and the linux is zero.
I need to raise the fan speed to 4000 rpm always because in my office the temperature is hot!
Now i go in telnet and set the speed with fanspeed w 4000.
My question, it's possible to set at startup the fun go to 4000 rpm?
Thanks
Last edited by crf450#144 (2008-07-21 12:24:50)
Offline
Of course it is possible to set a certain fan speed at startup. You can write your own little script and place it in your funplug start folder (usually /ffp/start ) or you could use one of the scripts provided here.
You can also add a command to the end of your funplug script directly.
cd / fanspeed w 4000 &
I don't know if this is really necessary because the unit normally adjusts the speed of the fan according to the temperature of the unit. If the temperature is hot then the fan will run fast.
I'm using a fan script ( 2 hard disk version http://wolf-u.li/download-manager.php?id=9 ) from Uli Wolf which shuts down the fan when the drives are sleeping, during night for example. I modified it a bit for my personal taste, for example keep the fans running when the temperature is above a certain level even if the disks are asleep.
If you are interested in my version of the script, you can find it here -> http://www.keepmyfile.com/download/3c83ba2286838
Just place it in your /ffp/start folder. I didn't adjust it yet to be fully compatible with the funplug starter, so you have to start it manually or use some code in the funplug script.
I use the lines:
cd $FFP_PREFIX/start ./newfancontrol & >/dev/null 2>/dev/null /dev/null 2>/dev/null
I'm somewhat disappointed in the ventilation concept of my CH3SNAS anyway. It gets quite hot (about 50°C) although it's quite cool in this room. I removed the front plate for now which gives an improvement to about 37°C (idle) up to 41°C (unit in use with fan speed of max 3500RPM). I'm going to do some reconstruction of the unit with a bigger fan and more openings (protected by filters of course!).
Offline
Thank you silversurfer,
my problem is the same as your, the idle temperature is 40°C up to 45-6°C, the hdd temperature it's too hight (for a long life).
I also thought to put a biggest fan, but the warranty?
Your script it's a intelligent idea, I would be interested in it but I am not able to install it, because it's my friend the guru of 323 but unfortunately do not see often :_(
Offline
Looks like your system is even cooler than mine (in closed state) but a lower temperature is always better for a long life of such equipment.
Well, there are ways to better cool down the system without the loss of warranty. Look here for an example -> http://dns323.kood.org/forum/t2600-DNS- … ling!.html
I won't use that approach because the electronic will be covered in dust in a short time with that open design. I want to have a closed system with air filters which is still portable. I don't care much about warranty because I can always put the drives back in my PC again. It would be a waste of money but I like the challenge. ;-)
Btw, I wouldn't advise using my script without a little knowledge of scripting. One would probably want to understand what it does. This is for a CH3SNAS or DNS-323 with 2 disks. It will certainly work with one disk too, but it will not provide the benefit of fan power down when the disk is asleep. For that you would need to modify the script.
Offline
Certainly need to know what we want to do!
I have too a DNS-323 with 2 disk, I will call my friend to ask for help!
Thanks
Offline
fonz wrote:
hell0 wrote:
put it somewhere else and add something like sh ctrl_fanspeed.sh to the end of your fun_plug.
do NOT change fun_plug!
write a proper start script instead.
Hi fonz
I'm trying to take your advice to do this and have tried to write the following script:
-------------------------
#!/ffp/bin/sh
# PROVIDE: rapfanstart
# REQUIRE: LOGIN
. /ffp/etc/ffp.subr
name="rapfanspeed.sh"
command="/ffp/sbin/$name"
run_rc_command "$1"
-------------------------
When I try and run it though it does not return to the command prompt so I fear it may hang my DNS when I restart it. Do I need to do something like add an "&" somewhere in the script to launch the script in sbin in the background or is there a way to make sure that this is the last script run as funplug starts?
thanks
RAP
Offline
Hi,
I made some changes in the fancontrol replacement script on the wiki ctrl_fanspeed.sh :
- kill fancontrol only if it's there
- use an extra "emergency RPM speed" when t° goes beyond high watermark (previous behaviour was to turn speed to zero !)
Feel free to talk about this changes or propose alternative ways to do. Target is to have a quiet (and not too hot) DNS-323 :-)
Offline
DeLaCroix wrote:
why are you all not using fanctl? This provides a much more reliable and elegant control over your fan
Well, I just noticed that my box was noisy since its last reboot. I came across that fancontrol replacement script in the wiki, but had to change it a little bit before using it (especially regarding that weird behaviour at high temperature), so I decided to share it here. But you're right, the binary way is probably more efficient, I'll give it a try.
Last edited by Uriel (2009-05-08 18:12:57)
Offline
The binary is nice for the 323, but it does not work on the 321. Apparently the low level interface to the fan is different?
Offline
talkingRock wrote:
The binary is nice for the 323, but it does not work on the 321. Apparently the low level interface to the fan is different?
Can you find out how it works? Does it have fanspeed and temperature programs? Can you capture system call traces of them? (e.g. strace -o /mnt/HD_a2/fan.log fanspeed)
Offline
It does have fanspeed and temperature programs, but even those have slightly different interfaces, for example, fanspeed will not take a number, only h,l, or s for high, low or stop.
I'll try to run strace at some point soon.
Offline
Fonz,
Here you go. If you could give me a quick explaination of what these mean, I'd appreciate it.
trace of fanspeed g
execve("/usr/sbin/fanspeed", ["fanspeed", "g"], [/* 14 vars */]) = 0 uname({sys="Linux", node="BlackWidow", ...}) = 0 brk(0) = 0x11000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/half", 0xbea0d2a0) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\2509\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1429912, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 mmap2(NULL, 1132500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40020000 mprotect(0x40128000, 51156, PROT_NONE) = 0 mmap2(0x4012f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107) = 0x4012f000 mmap2(0x40133000, 6100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 mprotect(0x4012f000, 8192, PROT_READ) = 0 mprotect(0x4001e000, 4096, PROT_READ) = 0 syscall_983045(0x400179d0, 0, 0x2, 0x1, 0, 0x4001f530, 0x4001f548, 0, 0, 0, 0x4001f000, 0xbea0d974, 0, 0xbea0d8e0, 0x4000e7bc, 0x40003178, 0x80000010, 0x400179d0, 0, 0, 0, 0xdcb4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbea0dc70) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbea0dc60) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, {1, 0}) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbea0dc88) = 0 close(3) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 write(1, "1\n", 2) = 2 munmap(0x40019000, 4096) = 0 exit_group(0) = ?
Offline
fanspeed l
execve("/usr/sbin/fanspeed", ["fanspeed", "l"], [/* 14 vars */]) = 0 uname({sys="Linux", node="BlackWidow", ...}) = 0 brk(0) = 0x11000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/half", 0xbefd22a0) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\2509\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1429912, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 mmap2(NULL, 1132500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40020000 mprotect(0x40128000, 51156, PROT_NONE) = 0 mmap2(0x4012f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107) = 0x4012f000 mmap2(0x40133000, 6100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 mprotect(0x4012f000, 8192, PROT_READ) = 0 mprotect(0x4001e000, 4096, PROT_READ) = 0 syscall_983045(0x400179d0, 0, 0x2, 0x1, 0, 0x4001f530, 0x4001f548, 0, 0, 0, 0x4001f000, 0xbefd2974, 0, 0xbefd28e0, 0x4000e7bc, 0x40003178, 0x80000010, 0x400179d0, 0, 0, 0, 0xdcb4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 write(1, "Set fan to low speed\n", 21) = 21 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbefd2c70) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbefd2c58) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbefd2c48) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, {1, 0}) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbefd2c60) = 0 close(3) = 0 nanosleep({0, 500000}, NULL) = 0 munmap(0x40019000, 4096) = 0 exit_group(0) = ?
Offline
fanspeed h
execve("/usr/sbin/fanspeed", ["fanspeed", "h"], [/* 14 vars */]) = 0 uname({sys="Linux", node="BlackWidow", ...}) = 0 brk(0) = 0x11000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/half", 0xbe9e22a0) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\2509\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1429912, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 mmap2(NULL, 1132500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40020000 mprotect(0x40128000, 51156, PROT_NONE) = 0 mmap2(0x4012f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107) = 0x4012f000 mmap2(0x40133000, 6100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 mprotect(0x4012f000, 8192, PROT_READ) = 0 mprotect(0x4001e000, 4096, PROT_READ) = 0 syscall_983045(0x400179d0, 0, 0x2, 0x1, 0, 0x4001f530, 0x4001f548, 0, 0, 0, 0x4001f000, 0xbe9e2974, 0, 0xbe9e28e0, 0x4000e7bc, 0x40003178, 0x80000010, 0x400179d0, 0, 0, 0, 0xdcb4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 write(1, "Set fan to high speed\n", 22) = 22 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbe9e2c70) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbe9e2c58) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbe9e2c48) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, {1, 0}) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbe9e2c60) = 0 close(3) = 0 nanosleep({0, 500000}, NULL) = 0 munmap(0x40019000, 4096) = 0 exit_group(0) = ?
Offline
fanspeed s
execve("/usr/sbin/fanspeed", ["fanspeed", "s"], [/* 14 vars */]) = 0 uname({sys="Linux", node="BlackWidow", ...}) = 0 brk(0) = 0x11000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/half", 0xbef082a0) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\2509\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1429912, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 mmap2(NULL, 1132500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40020000 mprotect(0x40128000, 51156, PROT_NONE) = 0 mmap2(0x4012f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107) = 0x4012f000 mmap2(0x40133000, 6100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 mprotect(0x4012f000, 8192, PROT_READ) = 0 mprotect(0x4001e000, 4096, PROT_READ) = 0 syscall_983045(0x400179d0, 0, 0x2, 0x1, 0, 0x4001f530, 0x4001f548, 0, 0, 0, 0x4001f000, 0xbef08974, 0, 0xbef088e0, 0x4000e7bc, 0x40003178, 0x80000010, 0x400179d0, 0, 0, 0, 0xdcb4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 write(1, "Stop fan\n", 9) = 9 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbef08c70) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbef08c58) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbef08c48) = 0 close(3) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({1, 0}, {1, 0}) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbef08c60) = 0 close(3) = 0 nanosleep({0, 500000}, NULL) = 0 munmap(0x40019000, 4096) = 0 exit_group(0) = ?
Offline
temperature g 0
execve("/usr/sbin/temperature", ["temperature", "g", "0"], [/* 15 vars */]) = 0 uname({sys="Linux", node="BlackWidow", ...}) = 0 brk(0) = 0x12000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/fast-mult", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/v5l", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/fast-mult", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/tls", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/v5l/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/fast-mult", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/v5l/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/v5l/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/v5l", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/fast-mult/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/fast-mult", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/half/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/lib/half", 0xbe8dc280) = -1 ENOENT (No such file or directory) open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\2509\1\0004\0\0\0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1429912, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 mmap2(NULL, 1132500, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40020000 mprotect(0x40128000, 51156, PROT_NONE) = 0 mmap2(0x4012f000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107) = 0x4012f000 mmap2(0x40133000, 6100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000 mprotect(0x4012f000, 8192, PROT_READ) = 0 mprotect(0x4001e000, 4096, PROT_READ) = 0 syscall_983045(0x400179d0, 0, 0x2, 0x1, 0, 0x4001f530, 0x4001f548, 0, 0, 0, 0x4001f000, 0xbe8dc954, 0, 0xbe8dc8c0, 0x4000e7bc, 0x40003178, 0x80000010, 0x400179d0, 0, 0, 0, 0xdcb4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f5, 0xbe8dcc40) = 0 close(3) = 0 rt_sigaction(SIGINT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x400175e8) = 26779 wait4(26779, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26779 rt_sigaction(SIGINT, {SIG_IGN}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- rt_sigaction(SIGINT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x400175e8) = 26785 wait4(26785, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26785 rt_sigaction(SIGINT, {SIG_IGN}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- brk(0) = 0x12000 brk(0x33000) = 0x33000 open("/etc/email.conf", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0555, st_size=136, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 read(3, "SADDR = \"\"\nDADDR = \"\"\nSERVER = \""..., 1024) = 136 read(3, "", 1024) = 0 close(3) = 0 munmap(0x40019000, 4096) = 0 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000 write(1, "Temperature type : Fahrenheit\n", 30) = 30 write(1, "<temperaturertc>: get temperatur"..., 40) = 40 rt_sigaction(SIGINT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_IGN}, 8) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x400175e8) = 26787 wait4(26787, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26787 rt_sigaction(SIGINT, {SIG_IGN}, NULL, 8) = 0 rt_sigaction(SIGQUIT, {SIG_IGN}, NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 --- SIGCHLD (Child exited) @ 0 (0) --- munmap(0x40019000, 4096) = 0 exit_group(0) = ?
Offline
All of these look like they look for a bunch of libraries that they can't find; map libc into memory and then do some stuff I don't understand, some of which involves a socket?
Offline
The interesting parts are these (from fanspeed g):
... socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbea0dc70) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f9, 0xbea0dc60) = 0 close(3) = 0 ... socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 ioctl(3, 0x89f8, 0xbea0dc88) = 0 close(3) = 0 ...
That looks a lot like the dns-323 interface, but using different command numbers (0x89f8 = SIOCDEVPRIVATE + 8, 0x89f9 = SIOCDEVPRIVATE + 9). A quick look at the kernel sources ( ftp://ftp.dlink.com/GPL/DNS-321/linux-2.6.12.6.tar.gz , file arch/arm/mach-feroceon/LSP/mv_ethernet/mv_ethernet_main.c ) reveals some more details:
SIOCDEVPRIVATE +3 -> read RTC +4 -> set RTC +5 -> read temperature +6 -> write temperature (!?) +8 -> read register +9 -> write register
Your system call traces show that fanspeed is controlled using the generic read/write register commands. The third parameter for ioctl (0xbea...) is a pointer to a ifreq data structure. The register offset value and the actual data values are stored there. So if someone finds the correct register offsets and data values for off, low and high, it should become easy to support it in fanctl.
Offline
Fonz,
Thanks for the lesson. I appreciate it.
It sounds like a little work with gdb would get us to the
point of having this run on the 321 since we could
get the addresses and values that way. Is this correct?
I saw your ?? on write temperature.
At one point, I tracked down the device they are using.
It has three temperatures it cares about.
The first, which is read-only, is the device temperature.
The second is an "alarm temperature" and the third is
a "temperature ok after alarm" temperature. This builds
some hysteresis into the alarm functionality. I could
not figure out how the 321 or 323 device uses these, but they
can be set using temperature w 1 and temperature w 2
From what I can see, the built-in fancontrol seems to be immune
to their settings. Interestingly, even if temperatures
are written out in Farenhight, the two alarm temps can
only be set in centigrade, at least through the
temperature w command.
Offline
talkingRock wrote:
It sounds like a little work with gdb would get us to the
point of having this run on the 321 since we could
get the addresses and values that way. Is this correct?
Yes, exactly.
talkingRock wrote:
The second is an "alarm temperature" and the third is
a "temperature ok after alarm" temperature.
I see. Thanks.
Offline