LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 08-30-2010, 02:06 AM   #1
ahmad.zuhd
LQ Newbie
 
Registered: Mar 2010
Posts: 9

Rep: Reputation: 0
ntpd -gq not working


as advised and documented, i'm trying to use the ntpd -gq instead of ntpdate. The result is that clock not set. as below. However ntpdate is working ok and had set the clock correctly

this is the ntp.conf file:

Code:
[root@CentOS5 ~]# cat /etc/ntp.conf
logfile  /var/log/ntp.log
driftfile /var/lib/ntp/drift
server 0.centos.pool.ntp.org
this is the output of command:


Code:
[root@CentOS5 ~]# ntpd -dqg
ntpd 4.2.2p1@1.1570-o Sat Dec 19 00:58:16 UTC 2009 (1)
addto_syslog: precision = 1.000 usec
create_sockets(123)
addto_syslog: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16
bind() fd 16, family 2, port 123, addr 0.0.0.0, flags=9
Added addr 0.0.0.0 to list of addresses
addto_syslog: Listening on interface wildcard, 0.0.0.0#123 Disabled
bind() fd 17, family 10, port 123, addr ::, flags=1
Added addr :: to list of addresses
addto_syslog: Listening on interface wildcard, ::#123 Disabled
bind() fd 18, family 10, port 123, addr ::1, flags=1
Added addr ::1 to list of addresses
addto_syslog: Listening on interface lo, ::1#123 Enabled
bind() fd 19, family 10, port 123, addr fe80::20c:29ff:fedc:9809, flags=1
Added addr fe80::20c:29ff:fedc:9809 to list of addresses
addto_syslog: Listening on interface eth0, fe80::20c:29ff:fedc:9809#123 Enabled
bind() fd 20, family 2, port 123, addr 127.0.0.1, flags=5
Added addr 127.0.0.1 to list of addresses
addto_syslog: Listening on interface lo, 127.0.0.1#123 Enabled
bind() fd 21, family 2, port 123, addr 192.168.180.129, flags=25
Added addr 192.168.180.129 to list of addresses
addto_syslog: Listening on interface eth0, 192.168.180.129#123 Enabled
init_io: maxactivefd 21
local_clock: time 0 base 0.000000 offset 0.000000 freq 0.000 state 0
addto_syslog: frequency initialized 0.000 PPM from /var/lib/ntp/drift

key_expire: at 0
peer_clear: at 0 next 1 assoc ID 53071 refid INIT
newpeer: 192.168.180.129->194.38.104.240 mode 3 vers 4 poll 6 10 flags 0x201 0x1 ttl 0 key 00000000
local_clock: time 0 base 0.000000 offset 0.000000 freq 0.000 state 1
report_event: system event 'event_restart' (0x01) status 'sync_alarm, sync_unspec, 1 event, event_unspec' (0xc010)
transmit: at 1 192.168.180.129->194.38.104.240 mode 3
auth_agekeys: at 1 keys 1 expired 0
timer: refresh ts 0
1 receive: at 1 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
peer 194.38.104.240 event 'event_reach' (0x84) status 'unreach, conf, 1 event, event_reach' (0x8014)
clock_filter: n 1 off 42904.765724 del 0.610083 dsp 7.937506 jit 0.000001, age 0
transmit: at 2 192.168.180.129->194.38.104.240 mode 3
3 receive: at 2 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 2 off 42905.489022 del 0.390840 dsp 3.937510 jit 0.723298, age 0
4 transmit: at 4 192.168.180.129->194.38.104.240 mode 3
5 receive: at 4 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 3 off 42905.489022 del 0.390840 dsp 1.937534 jit 1.572867, age 2
6 transmit: at 6 192.168.180.129->194.38.104.240 mode 3
7 receive: at 7 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 3 off 42905.489022 del 0.390840 dsp 0.937575 jit 1.572867, age 5
8 transmit: at 8 192.168.180.129->194.38.104.240 mode 3
9 receive: at 9 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 3 off 42905.489022 del 0.390840 dsp 0.437603 jit 1.572867, age 7
10 transmit: at 10 192.168.180.129->194.38.104.240 mode 3
11 receive: at 10 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 4 off 42905.489022 del 0.390840 dsp 0.187593 jit 2.808103, age 8
12 transmit: at 12 192.168.180.129->194.38.104.240 mode 3
13 receive: at 12 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 5 off 42905.489022 del 0.390840 dsp 0.062621 jit 3.808021, age 10
14 transmit: at 14 192.168.180.129->194.38.104.240 mode 3
15 receive: at 14 192.168.180.129<-194.38.104.240 mode 4 code 1 auth 0
clock_filter: n 6 off 42905.489022 del 0.390840 dsp 0.000132 jit 4.733917, age 12
16 addto_syslog: no reply; clock not set


Also attached is the trace file, from the trace file, everything seems ok, timestamps is sent and received:
Attached Files
File Type: txt ntp.txt (43.3 KB, 1 views)
 
Old 08-30-2010, 04:33 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 723

Rep: Reputation: 97
Could you please mention some advantage of ntpd -qg over ntpdate?
 
  


Reply

Tags
ntpd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
not sure if ntpd is working smallbook Linux - Software 6 02-13-2008 08:33 PM
Working with ntpd... JordanH Linux - Networking 8 05-09-2005 07:22 PM
Is ntpd working? lhill Linux - Networking 4 08-31-2003 12:10 PM
ntpd jqcaducifer Linux - General 0 08-21-2003 11:09 PM
ntpd working? Greg21 Linux - Software 1 06-13-2003 03:08 PM


All times are GMT -5. The time now is 07:32 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration