Operating System - HP-UX
1820072 Members
2599 Online
109608 Solutions
New Discussion юеВ

ntpdate give me incorrect time information!

 
Benedetto Mangiapane
Frequent Advisor

ntpdate give me incorrect time information!

Hi,
I've a problem with a clock of HP-UX 11.00.
I'm trying to synchronize with another HP-UX node, and "ntpdate -q " give me one minute offset, while the clocks are synchronized. I'm trying with "ntpdate -b " but not work! The time not change!

Help me!
Regards.

Benedetto.
18 REPLIES 18
Steven E. Protter
Exalted Contributor

Re: ntpdate give me incorrect time information!

If the nodename may not be properly set up time server its not going to let you synch the clocks.

ntp.conf is set up by default to synch with time servers. You may wish to use the ntpd daemon to syncy time.

Tell me please what ntpq -q does on the client computer.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Hi,

If you want to syncronize, just do:

#ntpdate

If you want to keep syncronizing in the future, you've to setup the /etc/ntp.conf file and start the xntpd service at startup.

Check manual pages of ntp.

Enjoy :)

Pedro
morganelan
Trusted Contributor

Re: ntpdate give me incorrect time information!

Hi,

Try to ntpq -p first, this command make sure the NTP server is properly configured.
Kamal Mirdad
Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

I'm sending to you the ouput of ntpq -p:

ntpq -p
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 10 l 50 64 377 0.00 0.000 10.01

This is the output of the server.
I'm trying to synchronize to him from another nodename that it haven't ntpd running.
(Scuse me for my english)
Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Ol├Г┬б Benedetto :)

Some help from Portugal!

Have you tried what I suggested on my previous post?

Also post here:

#ntpq -c rv

Let us know!

Pedro
morganelan
Trusted Contributor

Re: ntpdate give me incorrect time information!

I think the time difference need to be very small when initializing the ntpdate.If your time different is big, it will return nothing.
Kamal Mirdad
Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

This is output from my node (without xntpd running):
ntpq -c rv server
status=0544 leap_none, sync_local_proto, 4 events, event_peer/strat_chg
system="UNIX/HPUX", leap=00, stratum=11, rootdelay=0.00,
rootdispersion=10.01, peer=28892, refid=LOCAL(1),
reftime=c6b832cf.afa4d000 Thu, Aug 25 2005 14:06:39.686, poll=6,
clock=c6b8330d.aa841000 Thu, Aug 25 2005 14:07:41.666, phase=0.000,
freq=0.00, error=10.01

Suggestions?
Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Ola Benedetto,

To manually sincronize you server do:

#ntpdate

Then, if you want to have xntd do:

add the following line to the file /etc/ntp.conf:

server

Then do:

#/sbin/init.d/xntpd start

Check syslog for errors and post them here.

Enjoy :)

Pedro
Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

Other info:

# ntpdate -q server
server 180.2.18.166, stratum 11, offset -67.061880, delay 0.02585
25 Aug 14:14:03 ntpdate[10082]: step time server 180.2.18.166 offset -67.061880 sec
# ntpdate -d server
25 Aug 14:14:30 ntpdate[10231]: ntpdate version 3.5f: Fri Dec 10 18:32:44 GMT 1999 PHNE_19711
transmit(180.2.18.166)
receive(180.2.18.166)
transmit(180.2.18.166)
receive(180.2.18.166)
transmit(180.2.18.166)
receive(180.2.18.166)
transmit(180.2.18.166)
receive(180.2.18.166)
transmit(180.2.18.166)
server 180.2.18.166, port 123
stratum 11, precision -16, leap 00, trust 000
refid [127.127.1.1], delay 0.02585, dispersion 0.00029
transmitted 4, in filter 4
reference time: c6b8348f.afa34000 Thu, Aug 25 2005 14:14:07.686
originate timestamp: c6b834a7.10e97000 Thu, Aug 25 2005 14:14:31.066
transmit timestamp: c6b834ea.20dad000 Thu, Aug 25 2005 14:15:38.128
filter delay: 0.02620 0.02586 0.02585 0.02585
0.00000 0.00000 0.00000 0.00000
filter offset: -67.0613 -67.0618 -67.0621 -67.0623
0.000000 0.000000 0.000000 0.000000
delay 0.02585, dispersion 0.00029
offset -67.062116
25 Aug 14:14:31 ntpdate[10231]: step time server 180.2.18.166 offset -67.062116 sec
# ntpdate -b server
25 Aug 14:18:04 ntpdate[11234]: step time server 180.2.18.166 offset -67.062793 sec

# remsh server -l root /usr/bin/date
Thu Aug 25 14:24:32 METDST 2005
# date
Thu Aug 25 14:24:38 METDST 2005

You found anything?
Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Hi,

Everything seems to be OK.

The diference between yor server and the time server will be slowly adjusted.

If you want to adjust it at once and immediatly, you must stop the xntp and run ntpdate 3 times:

#/sbin/init.d/xntpd stop
#ntpdate
#ntpdate
#ntpdate
#/sbin/init.d/xntpd start

I think this will work!

Pedro


Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

But in my node (not server) xntpd is stopped already!
It's running in the node named "server" in my previous message, only.

ok? We are synchronized?

Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Hi,

In your node (not the server) you must add a line to /etc/ntp.conf as I mentioned on my previous post and start xntpd to keep syncronization running:

#/sbin/init.d/xntpd stop --> you may stop again :)
#ntpdate
#ntpdate
#ntpdate
#/sbin/init.d/xntpd start

and post here the output of:

#ntpdate -q rv

Enjoy :)

Pedro

Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

Not understood!
Why I must change ntp.conf and start xntpd?

There are other node HP-UX in my system that work properly. My problem is only present in one node.
For example, in other (third) node, if i send "ntpdate -q server", the system return:

(other node))# ntpdate -q server
server 180.2.18.166, stratum 11, offset 0.164365, delay 0.02591
25 Aug 15:52:06 ntpdate[13806]: adjust time server 180.2.18.166 offset 0.164365 sec

in my (wrong) node instead:
(my node)# ntpdate -q server
server 180.2.18.166, stratum 11, offset -67.058364, delay 0.02544
25 Aug 16:01:14 ntpdate[18633]: step time server 180.2.18.166 offset -67.058364 sec

also having the same datetime!
Pedro Cirne
Esteemed Contributor

Re: ntpdate give me incorrect time information!

Hi,

Have you setup on your "wrong" server the /etc/npt.conf?

There you must have a line with your ntp_server_name as I metioned, do you have it?

If you don't have it, then add a line like:

server

Then restart xnptd which is the daemon for ntp.

Pedro
Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

Pedro,
perhaps I do not succeed to explain it correctly.

I do not to start xntpd in my wrong node, and I do not to insert a server in ntp.conf.
I would to use ntpdate only!

My wrong node is not a server.
My wrong node is connected to server.
Only the server has xntpd running.
All the other nodes are connected to the server and they do not have the xntpd running.

In the my previous message, I explain to you, as two different nodes are behaved.

In other node (that work properly), the ntp.conf is the same of the ntp.conf in my wrong node, and thereisn't the line:
server

...
Florian Heigl (new acc)
Honored Contributor

Re: ntpdate give me incorrect time information!

can You compare kernel time zone parameters?
yesterday I stood at the edge. Today I'm one step ahead.
Benedetto Mangiapane
Frequent Advisor

Re: ntpdate give me incorrect time information!

What you mean for kernel time zone parameters? Maybe a file "/etc/TIMEZONE"?

The system time for the my wrong node its the same of the system time of the server:

# remsh mynode -l root /usr/bin/date
Fri Aug 26 08:14:17 METDST 2005
# date
Fri Aug 26 08:14:21 METDST 2005

Florian Heigl (new acc)
Honored Contributor

Re: ntpdate give me incorrect time information!

I meant the following:

#>kmtune -q timezone
Parameter Current Dyn Planned Module Version
===============================================================================
timezone 420 - 420
yesterday I stood at the edge. Today I'm one step ahead.