Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi,
I am using ffp 0.5 and ntp. ffp.log always says "return value: 5 (not synchronized)", but if I "sh ./adjtimex.sh restart" at the console I get "return value:0 (clock synchronized)". Why is it not saying in ffp.log "syncronized", what do I need to change?
thanks
lu
eg (from ffp.log):
* /ffp/start/adjtimex.sh ...
mode: 16384
-o offset: 0
-f frequency: 0
maxerror: 16384000
esterror: 16384000
status: 64 (UNSYNC)
-p timeconstant: 2
precision: 1
tolerance: 33554432
-t tick: 9965
time.tv_sec: 1221646572
time.tv_usec: 2163
return value: 5 (clock not synchronized)
sntp: using NTP server uk.pool.ntp.org (194.238.48.3)
NTP Server connected successfully!!!
System time: 2008/9/17 Wed 10:16:13
and later from the console:
mode: 16384
-o offset: -11900
-f frequency: 21509565
maxerror: 1026386
esterror: 15067
status: 1 (PLL)
-p timeconstant: 6
precision: 1
tolerance: 33554432
-t tick: 9965
time.tv_sec: 1221706294
time.tv_usec: 120621
return value: 0 (clock synchronized)
sntp: using NTP server uk.pool.ntp.org (195.177.253.180)
NTP Server connected successfully!!!
System time: 2008/9/18 Thu 3:51:35
ntp.conf is:
# german time servers, iburst to speed up synchronization on startup
server 0.uk.pool.ntp.org iburst
server 1.uk.pool.ntp.org iburst
server 2.uk.pool.ntp.org iburst
server 3.uk.pool.ntp.org iburst
# drift file path is passed on command line in ntpd.sh (-f)
# driftfile /etc/ntp.drift
# add local clock with stratum 10 as last resort
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# detailed logging
logconfig =all
adjtimex.sh is
#!/ffp/bin/sh
# PROVIDE: adjtimex
# BEFORE: SERVERS
# REQUIRE: rcS
. /ffp/etc/ffp.subr
name="adjtimex"
start_cmd="adjtimex_start"
# See also:
# http://dns323.kood.org/forum/t572-Pulls-Wrong-Time.html
# Germany
#timezone="CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00"
#timeserv=de.pool.ntp.org
timezone="GMT+0BST-1,M3.5.0/01:00:00,M10.5.0/02:00:00"
timeserv=uk.pool.ntp.org
# clock ticks per day (perfect clock has 10000 ticks per day):
# tick = (86400 + d)/8.64
# with d being drift in seconds per 24h
# tick = 9965 for d = -300s
# ntpd still shows a drift of 334, though
tick=9965
adjtimex_start()
{
echo "${timezone}" >/etc/TZ
if [ -n "${tick}" ]; then
adjtimex -t ${tick}
fi
/usr/sbin/sntp -r -P no ${timeserv}
sleep 1
/usr/sbin/rtc -w
}
run_rc_command "$1"
Offline
luusac wrote:
I am using ffp 0.5 and ntp. ffp.log always says "return value: 5 (not synchronized)", but if I "sh ./adjtimex.sh restart" at the console I get "return value:0
I'm seeing a similar thing happen when setting time from fun_plug.local
* Running /ffp/etc/fun_plug.local ...
mode: 16384
-o offset: 0
-f frequency: 0
maxerror: 16384000
esterror: 16384000
status: 64 (UNSYNC)
-p timeconstant: 2
precision: 1
tolerance: 33554432
-t tick: 10003
time.tv_sec: 1221698560
time.tv_usec: 478352
return value: 5 (clock not synchronized)Last edited by rcblackwell (2008-09-19 02:08:14)
Offline
root@bob:~# adjtimex
mode: 0
-o offset: 0
-f frequency: 21746834
maxerror: 40078
esterror: 3
status: 1 (PLL)
-p timeconstant: 6
precision: 1
tolerance: 33554432
-t tick: 9965
time.tv_sec: 1221809801
time.tv_usec: 977245
return value: 0 (clock synchronized)It's always unsynchronized after boot, and it won't synchronize unless you run ntpd (I think).
Offline
I am a bit puzzled then. Can you explain briefly what adjtimex.sh and ntpd.sh are supposed to do, so I can understand the basic concept? The way I understand it is that adjtimex tries to correct for the dns323's clock drift problem and connects to an ntp server to set the unit's time. Later ffp loads ntpd.sh (if you want it to) so that the 323 can itself act as an ntp server. If this is the case how is it that on boot time is always unsynchronized? Is this expected? Would it be better to reverse the order of the two scripts, so that if you are running a ntpd, that is initiated first and then the time adjusted?
thanks
lu
Offline