DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#76 2008-11-07 20:47:08

rolfsky
Member
From: sunny California
Registered: 2008-10-14
Posts: 19
Website

Re: Temperature reading problem!

as long as everyone else is chiming in:

I'm running ntpd, adjtimex to 9968 ticks, drift < 33ppm and fairly stable, default (D-link) fan control,

and no TWSI problems since my previous post about a week ago.

maybe the turning off ntpd and adjtimex is a redherring, and it only happens after a period of weeks being on?

Offline

 

#77 2008-11-08 14:46:25

DaveN
Member
Registered: 2008-01-12
Posts: 21

Re: Temperature reading problem!

I could not come up with a set of steps which would faithfully reproduce the TWSI problem at will.  However I do get it within 24 hours if I enable ntpd and fanctrl.

This is my current setup which has now been up for 5 days without TWSI problems.
I am not running ntpd.
adjtimex is set to 9968
fanctrl is running at an interval of 15 sec (I want the fan to start quickly if it is off and the temp starts to rise or the drives turn on)
ffp 0.5 is running from a usb drive (/mnt/usb1/ffp)
I've added the following to crontab:

Code:

/bin/echo "37 * * * */ffp/bin/ntpdate ca.pool.ntp.org >>/ffp/log/ntpd.log 2>&1" >> $CRONTXT

which required the following fix:

Code:

echo 'ntp             123/tcp' >>/etc/services
echo 'ntp             123/udp' >>/etc/services

This results in a step change of approx -2.85~-2.90 seconds at 37 minutes past every hour.

Cheers,
Dave

Offline

 

#78 2008-11-09 19:56:15

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

Just adding another data point.  I changed my fanctl.config interval down from 300 seconds to 120 seconds and I am now seeing TWSI errors in less than 24 hours. At 300 second interval I did not see any TWSI errors in nearly a week. I was running ntpd and had adjtimex=9968 set at all times.


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#79 2008-11-09 20:10:41

DeLaCroix
Member
Registered: 2007-08-18
Posts: 91
Website

Re: Temperature reading problem!

jesbo wrote:

I changed my fanctl.config interval down from 300 seconds to 120 seconds and I am now seeing TWSI errors in less than 24 hours.

fonz wrote:

Maybe it's simultaneous accesses to the TWSI that creates the problems.

Still looks like what fonz said.

Offline

 

#80 2008-11-09 20:50:16

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

DeLaCroix wrote:

jesbo wrote:

I changed my fanctl.config interval down from 300 seconds to 120 seconds and I am now seeing TWSI errors in less than 24 hours.

fonz wrote:

Maybe it's simultaneous accesses to the TWSI that creates the problems.

Still looks like what fonz said.

Exactly what I'm thinking.


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#81 2008-11-15 05:38:49

quattro
Member
Registered: 2008-10-28
Posts: 21

Re: Temperature reading problem!

I use the ntpd option '-x', this works so far.

no adjtimex modification, no complaint in the syslog from the ntpd at all.
I had some TWSI errors before, but I could not reproduce them.

I can't test things right now because my seagate SD15 disks are beeing replaced by WDs at the moment.

Offline

 

#82 2008-11-15 06:34:00

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

quattro wrote:

I use the ntpd option '-x', this works so far.

Thanks.  I was trying to research exactly what the -x option does, but the man pages don't adequately explain it.  I may give it a try once I understand better.


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#83 2008-11-15 12:44:51

quattro
Member
Registered: 2008-10-28
Posts: 21

Re: Temperature reading problem!

the debian etch manpage is a little bit more verbose:

-x     Ordinarily, if the time is to be adjusted more than 128 ms, it is stepped, not gradually slewed.  This option forces the time to  be  slewed  in
              all  cases.   Note:  Since the slew rate is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.  Thus an
              adjustment of many seconds can take hours or days to amortize.

one thing needs to be evaluated:
if adusting the time (kernel/software time or rtc/hardware time?) uses the TWSI and could trigger conflicts with the fan regulation
then this might caus problem too because the process of slewing is (or seems to me) just adusting the time every second.
mean: It is adjusted much more often and every time it could lock up the TWSI.
I do not have a decent understanding of the TWSI and what the rtc and kernel clock has to do with it.

the ntpd that comes with ffp0.5 states the x option will raise the slew limit to 600seconds.

there is one thing:
I synced the raid1 several times with a running ntpd (no modifications and no adjtimex). I've never noticed a TWSI error. (room temp was about 20°C)
(for one time I'm not sure as the fan kept running at high speed even after the rebuild was done. I did not check the log.
but it could also be the residual heat)

then I moved the unit to a warmer place (my apartment, ~25°C) and put it in a rather closed cupboard so the unit went rather hot while syncing and this was the first time I noticed the TWSI errors.

so.. unless prooven otherwise, I think this might also be a temperature related issue.

theory: when the unit gets hot, the fan is set to 10.000 but it will never reach 10k, Ive seen only ~6k.
as far as I know, the regulation software tries to reset the speed if the current speed does not match the required speed.
maybe.. this uses the TWSI excessively an causes the error alsong with the ntpd working hard to keep the clock (it might actually be a decent /dev/urandom ;-) ) in sync.

can anyone proof this? (doesn't matter if you proof it true or wrong smile )

Offline

 

#84 2008-11-15 12:50:21

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: Temperature reading problem!

jesbo wrote:

quattro wrote:

I use the ntpd option '-x', this works so far.

Thanks.  I was trying to research exactly what the -x option does, but the man pages don't adequately explain it.  I may give it a try once I understand better.

[from man ntpd] -x Ordinarily, if the time is to be adjusted more than 128 ms, it is stepped, not gradually slewed. This option forces the time to be slewed in all cases. Note: since the slew rate is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment of many seconds can take hours or days to amortize.

Offline

 

#85 2008-11-27 01:59:41

quattro
Member
Registered: 2008-10-28
Posts: 21

Re: Temperature reading problem!

after >1week of continous operation with the -x option:

Code:

root@CH3SNAS:~# cat /ffp/etc/ntp.drift 
5.997
root@CH3SNAS:~# adjtimex 
    mode:         0
-o  offset:       0
-f  frequency:    585826
    maxerror:     16384000
    esterror:     16384000
    status:       64 (UNSYNC)
-p  timeconstant: 0
    precision:    1
    tolerance:    33554432
-t  tick:         9960
    time.tv_sec:  1227743503
    time.tv_usec: 515711
    return value: 5 (clock not synchronized)
root@CH3SNAS:~#

no TWSI errors either.
and there are also no log messages from the ntpd about the time beeing reset.
it just stays in sync.
works great.

maybe the -x switch should be set per default with the ntpd package for the ch3nas/dns323

Offline

 

#86 2008-12-01 20:36:21

perssinaasappel
Member
From: Europe
Registered: 2008-10-22
Posts: 59

Re: Temperature reading problem!

To give it one more try I decided to add the -x flag also.

Running ntpd with the flags -x -g no TWSI errors on my side. :-)
Seems to work nicely.
/var/log/messages is initially filled with lots of ntpd messages.
I did a grep on the frequency message which shows that it took about 14 hours to get the drift below 500 ppm.
After that no more ntpd messages.

I removed the  -f /ffp/etc/ntp.drift flag to prevent disks from spinning up.

All looking good now.


Attachments:
Attachment Icon ntpd.txt, Size: 19,382 bytes, Downloads: 1,759

CH3SNAS • 1.05b5 • ffp 0.5 • 2x WD Caviar Green WD5000AACS • nzbget(web)

Offline

 

#87 2008-12-01 22:57:08

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

Just curious.... when using the "-x" flag on ntpd, are you also running the fanctl program?  I initially (several weeks ago) tried the -x flag and when fanctl was running I still saw TWSI errors.  I'll try it again, though.

BTW... I run ffp from my USB drive so I still use the -f /ffp/etc/ntp.drift option.  So drive spinup is avoided.


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#88 2008-12-01 23:08:15

perssinaasappel
Member
From: Europe
Registered: 2008-10-22
Posts: 59

Re: Temperature reading problem!

nope, running the standard fancontrol that comes with the box. (Don't understand why people want to change this, it's good as it is.)


CH3SNAS • 1.05b5 • ffp 0.5 • 2x WD Caviar Green WD5000AACS • nzbget(web)

Offline

 

#89 2008-12-01 23:42:38

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

perssinaasappel wrote:

nope, running the standard fancontrol that comes with the box. (Don't understand why people want to change this, it's good as it is.)

Thanks.   

I liked (and tried) fanctl for 2 reasons:

1) Shuts off fan when DNS is completely idle and temps drop below 100F.
2) Allows fan to spin at higher speeds quicker when NAS starts heating up (good for me because my WD Caviar Black drives get pretty warm when spinning).


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#90 2008-12-02 21:56:56

jesbo
Member
From: Falls Church, VA
Registered: 2008-08-28
Posts: 101

Re: Temperature reading problem!

Not to beat a dead horse, but what I've observed -

I get TWSI errors whenever I have ntpd and fanctl running together.  The errors do not necessarily occur right away (although they can), but tend to appear after a few days.

If I run ntpd and the D-link fancontrol, I haven't seen TWSI errors.

If I run fanctl but do not run ntpd, I haven't seen TWSI errors.


My current solution:

I run fanctl and do what DaveN recommended - add a crontab entry via fun_plug to run ntpdate on a regular basis.  With adjtimex -t 9960, I can get away with running ntpdate just a few times a day and the clock stays in good shape, and so far no TWSI errors.


DNS-323 (H/W ver. B1) |  2 x 1 TB WD Caviar Black (Raid 1) | Corsair Flash Voyager - 16 GB USB | FW 1.08 | fun_plug 0.5

Offline

 

#91 2009-03-31 16:23:40

Hotzenwalder
New member
Registered: 2009-03-31
Posts: 2

Re: Temperature reading problem!

With all the different answers in this thread I kinda lost track of the definite solutiuon for this problem.

TWSI: mvTwsiStartBitSet ERROR - Start Clear bit TimeOut .
TWSI: mvTwsiStopBitSet ERROR - Stop bit TimeOut .

I'm running funplug 0.5.x on a USB Stick on a CH3SNAS with firmware 1.05.

Also... when I install ntpd according to the following howto: http://nas-tweaks.net/CH3SNAS:Tutorials/ntp
I wonder where the line timeserv=de.pool.ntp.org (in my case nl.pool.ntp.org) should end up. My fun_plug.local currently looks like this:

#!/ffp/bin/sh
PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin

# Adjust clock speed to reduce drift
# See 'adjtimex -h' for available options.
# 9965 works for my DNS-323, ymmv.
adjtimex -t 9960

# Set local timezone
# For a list of timezone strings see:
# http://www.nas-tweaks.net/CH3SNAS:Tutor … ne_Strings

# Europe/Berlin
echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' >/etc/TZ
timeserv=nl.pool.ntp.org

# This removes firmware cronjobs that interfere with ntpd.
#crontab -l | grep -vw '/usr/sbin/daylight' | grep -vw '/usr/sbin/rtc' | crontab -

# Clear root password for convenient login (won't work with ssh)
#usermod -p '' root

# You might want to ensure that sshd is started.
#chmod a+x /ffp/start/sshd.sh

When starting ntpd.sh from the shell I also get the following warning/error

grep: illegal option -- w
BusyBox v1.00-pre1 (2008.09.02-11:43+0000) multi-call binary

Usage: grep [-ihHnqvs] PATTERN [FILEs...]

grep: illegal option -- w
BusyBox v1.00-pre1 (2008.09.02-11:43+0000) multi-call binary

Usage: grep [-ihHnqvs] PATTERN [FILEs...]

grep: illegal option -- w
BusyBox v1.00-pre1 (2008.09.02-11:43+0000) multi-call binary

Usage: grep [-ihHnqvs] PATTERN [FILEs...]

Starting /ffp/bin/ntpd -g -f /ffp/etc/ntp.drift

My ntpd.sh is default and looks like this

#!/ffp/bin/sh

# PROVIDE: ntpd
# REQUIRE: SERVERS
# BEFORE: LOGIN

. /ffp/etc/ffp.subr

name="ntpd"
command="/ffp/bin/ntpd"
ntpd_flags="-g -f /ffp/etc/ntp.drift"
required_files="/ffp/etc/ntp.conf"
start_cmd="ntpd_start"

ntpd_start()
{
        # fix /etc/services
        if ! grep -w ntp /etc/services >/dev/null; then
                echo "ntp 123/udp" >>/etc/services

        fi

        # remove rtc and daylight cron jobs
        crontab -l | grep -vw '/usr/sbin/daylight' | grep -vw '/usr/sbin/rtc' | crontab -

        proc_start $command
}

run_rc_command "$1"

The time seems to be adjusted ok.

Offline

 

#92 2009-03-31 17:22:02

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Temperature reading problem!

Hotzenwalder wrote:

...
1) TWSI: mvTwsiStartBitSet ERROR - Start Clear bit TimeOut .
2) I wonder where the line timeserv=de.pool.ntp.org (in my case nl.pool.ntp.org) should end up.
3) When starting ntpd.sh from the shell I also get the following warning/error
...

1) A power cycle is the only rebliable option to make this error disappear. It is still unknown what the original cause is.
2) IIrc, timeserv is an old variable, and nas-tweaks should be updated on this.
3) You're $PATH is wrong and doesn't include /ffp/bin before /bin. Are you using the modified firmware?

Offline

 

#93 2009-03-31 18:18:39

DeLaCroix
Member
Registered: 2007-08-18
Posts: 91
Website

Re: Temperature reading problem!

fonz wrote:

1) A power cycle is the only rebliable option to make this error disappear. It is still unknown what the original cause is.
2) IIrc, timeserv is an old variable, and nas-tweaks should be updated on this.

1. In my blog, many reported that stopping the ntp-service and setting the time every x minutes solves the problem
2. I will change the tutorial over the next few days to reflect the findings of 1.) (Still will preserve the Timezones, not to worry)

Offline

 

#94 2009-03-31 18:28:53

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Temperature reading problem!

great.

Offline

 

#95 2009-03-31 20:35:26

Hotzenwalder
New member
Registered: 2009-03-31
Posts: 2

Re: Temperature reading problem!

fonz wrote:

1) A power cycle is the only rebliable option to make this error disappear. It is still unknown what the original cause is.
2) IIrc, timeserv is an old variable, and nas-tweaks should be updated on this.
3) You're $PATH is wrong and doesn't include /ffp/bin before /bin. Are you using the modified firmware?

1] Recycled power and everything is back to normal again. ntpd is still running
2] ...
3] I installed funplug from the manual by Dennis ( http://www.aroundmyroom.com/2009/01/27/ … laces-all/ ) and used the fun_plug.tgz from http://www.inreto.de/dns323/fun-plug/0.5/fun_plug.tgz. Somewhere in some other manual I used along the way I was instructed to copy /ffp/etc/examples/fun_plug.local to /ffp/etc which led to the current $PATH.

Here's the content from the example fun_plug.local contained in the tgz file.

#!/ffp/bin/sh
PATH=/ffp/sbin:/ffp/bin

# Adjust clock speed to reduce drift
# See 'adjtimex -h' for available options.
# 9965 works for my DNS-323, ymmv.
adjtimex -t 9965

# Set local timezone
# For a list of timezone strings see:
# http://www.nas-tweaks.net/CH3SNAS:Tutor … ne_Strings

# Europe/Berlin
echo 'CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' >/etc/TZ

# This removes firmware cronjobs that interfere with ntpd.
#crontab -l | grep -vw '/usr/sbin/daylight' | grep -vw '/usr/sbin/rtc' | crontab -

# Clear root password for convenient login (won't work with ssh)
#usermod -p '' root

# You might want to ensure that sshd is started.
#chmod a+x /ffp/start/sshd.sh

I think it should be 'PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin'. I have edited it in my fun_plug.local but somehow it seems to get changed after every reboot.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB