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

#1 2010-10-14 23:30:18

bjby
Member
Registered: 2009-02-22
Posts: 265

/usr/sbin/sntp hangs

I have put this entry into cron
1 * * * * /usr/sbin/sntp -r -P no se.pool.ntp.org

It is from wiki instruction. However sntp seems to hang once in a while, generating zombi processes. Maybe once per week or so.

Someone with the same problem?

Is it possible to put some angry watchdog sheparding it, killing it on timeout?

Offline

 

#2 2010-10-15 00:08:52

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: /usr/sbin/sntp hangs

Have you looked at running ntp that comes with ffp? I had no issues with it. Just edit the config and use the script in ffp/start jsut like the rest of the packages.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2010-10-15 07:36:17

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

thanx for input. but I have already tried that. It might differ between HW-model of 323. I am on B.

http://nas-tweaks.net/CH3SNAS:Tutorials/ntp
...
As you can see below, there are two choices for the synchronization. Regular synchronization via Cron should be chosen over using the NTP-Daemon as the latter seems to cause the following two lines in dmesg reappearing over and over again until the device gets restarted:

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

Offline

 

#4 2010-10-15 07:44:05

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

1 * * * * /usr/sbin/sntp -r -P no se.pool.ntp.org
5 1 * * * /ffp/bin/killall sntp

Think Ill go for this dirty fix and see how it goes.

Offline

 

#5 2010-10-15 11:20:36

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: /usr/sbin/sntp hangs

use ntpdate instead, it's more robust

Offline

 

#6 2010-10-15 14:10:05

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

Ok ill try that. Didnt get to work first until i found the description below.

-----------------------
Hmm… Now what? So this is not caused by dns after all… what could this mean: “Servname not supported for ai_socktype“. After some other tries I have finaly seen the problem… NTP ports were not defined in /etc/services  and this was the root of the error. The system didn’t know how to make ntp connections without that. So I’ve added the following lines to /etc/services

ntp             123/tcp
ntp             123/udp

Offline

 

#7 2010-10-15 14:17:56

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: /usr/sbin/sntp hangs

How are you starting it? If you use the ffp/start/ntpd.sh startup script then it should modify /etc/services automatically.

Code:

#!/ffp/bin/sh

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

. /ffp/etc/ffp.subr

name="ntpd"
command="/ffp/bin/ntpd"
ntpd_flags="-g -f /ffp/tmp/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"

Last edited by FunFiler (2010-10-15 14:19:13)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#8 2010-10-15 14:21:20

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

Is there a "right" way to modify/overwright the /etc/services on boot?

Offline

 

#9 2010-10-15 14:25:22

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

@Funfiller,
I only modify cron. I have a editcron.sh as part of boot. So that explains the missing service entry.

Maybe I should create a ntpdate.sh in the start dir.

Offline

 

#10 2010-10-18 19:46:25

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: /usr/sbin/sntp hangs

ntpdate seems stable so far.
My unit drifts about 14.4 seconds per hour according to logfile. Thats a horrible bad clock.

solved the services thingy by cp /ffp/etc/services /etc/services on boot.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB