Operating System - HP-UX
1838888 Members
3283 Online
110131 Solutions
New Discussion

Re: Synchronizing system time with my time server (w2k3)

 
SOLVED
Go to solution
Ermin Borovac
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

Well your w2k3 system itself is not synchronised with another time server, hence stratum 16.

You will need to find a better stratum server (with stratum from 2 to 4, with lower stratum being better) to sync your w2k3 box with.
Yogeeraj_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

hi ermin,

Do you mean that i would not be able to synchronize my hp-ux server with my w2k3 server unless and until i lower the stratum level to 2-4 (by making it synchronised with another time server)?

thanking you in advance for your reply

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ermin Borovac
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

Yes, that's what I think. Actual stratum of your time server will depend on the stratum of the server it's synced with. If it's synced with stratum 2 server, it will become stratum 3 server.

If you can't find any server of good stratum that's local to your organisation then you can always use pool of NTP servers.

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
Yogeeraj_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

hi,

Unfortunately, our network is a protected one with minimum access to the Internet.

Does that mean that we can't sync our HP-UX servers with the W2k3 server?

Also, where do i specify the pool of NTP servers you mentioned above?

thank you again for a reply.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Ermin Borovac
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

You can setup w2k3 box to use local clock as a time source.

server 127.127.1.1
fudge 127.127.1.1 stratum 10

These statements should be placed in NTP configuration file (/etc/ntp.conf on HP-UX) and effectively tell the server to use its own clock as time source and set its stratum to 10 (indicating that local clock is not very reliable source).

Now you can try to sync your HP-UX system to w2k3 box. This is not very good configuration but at least you will know that systems should have the same reference time.
Bill Hassell
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

The output of your ntpq -p command as well as the debug steps definitely indicate that the Win2k server is simply incompatible with the industry-standard NTP protocol, or your Win2K server is refusing to provide the service. You need to ask the vendor about NTP compatibility. NTP has been a network protocol standard for over 20 years and only recently has Windows even acknowledged this protocol, opting instead to use domain controller protocols to sync PCs. Like WINS versus DNS, Windows has tended to create it's own special protocol and not provided a simple way to be compatible with an industry standard.

Use the www.ntp.org web page to locate compatible time server software, in particular: http://ntp.isc.org/bin/view/Main/ExternalTimeRelatedLinks


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

One other note about timezones: NTP defines the time of day in GMT (also called UTC or Zulu time) so the server must reference it's NTP time of day on GMT. It is impossoble to be a time server using a non-GMT timezone because timezones are political definitions and change at the whim of governments. Note that the NTP timezone (GMT) can be different than the PC login timezone depending on your version of Windows. Read the details about setting up PC server timezones at www.ntp.org.

The same is true for HP-UX although the setup is much easier thjan in a PC. Just set the environment variable TZ to match where you are located at the momenmt you login. This defaults to the value in /etc/TIMEZONE (set during installation but can be changed at any time). HP-UX ALWAYS maintains time as GMT internally and TZ translates the GMT time to whatever timezone you want.


Bill Hassell, sysadmin
RAC_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

There are free NTP servers softwares for window$. you may want to check that.
There is no substitute to HARDWORK
Yogeeraj_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

Hi again,

thank you Bill for your replies.

I have downloaded "NTP for Windows NT/2000/XP"

from:
http://www.meinberg.de/download/ntp/windows/ntp-4.2.0a@1.1354-o-win32-setup.exe

and currently testing it.

will update as soon as it is ok

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

Dear all,

Now that i have completed my NTP-based time server installation, i would like to know if it is working as expected.. How do i go about?

One test that i just tried is: on my HP-UX, set the time to 2 minutes in the future (using date command).

then i run the following:

# date
Fri Aug 26 17:19:38 GMT 2005
# date 08261725
Fri Aug 26 17:25:00 GMT 2005
# /usr/sbin/ntpdate -d w2k3timesrv
transmit(w2k3timesrv)
receive(w2k3timesrv)
transmit(w2k3timesrv)
receive(w2k3timesrv)
transmit(w2k3timesrv)
receive(w2k3timesrv)
transmit(w2k3timesrv)
receive(w2k3timesrv)
transmit(w2k3timesrv)
server w2k3timesrv, port 123
stratum 13, precision -20, leap 00, trust 000
refid [127.127.1.1], delay 0.03062, dispersion 0.00026
transmitted 4, in filter 4
reference time: c6b994fa.500218de Fri, Aug 26 2005 17:17:46.312
originate timestamp: c6b9952d.52154434 Fri, Aug 26 2005 17:18:37.320
transmit timestamp: c6b996b6.418ee000 Fri, Aug 26 2005 17:25:10.256
filter delay: 0.03062 0.03079 0.03078 0.03079
0.00000 0.00000 0.00000 0.00000
filter offset: -392.938 -392.938 -392.938 -392.938
0.000000 0.000000 0.000000 0.000000
delay 0.03062, dispersion 0.00026
offset -392.938435

26 Aug 17:25:10 ntpdate[10254]: step time server w2k3timesrv offset -392.938435 sec
# date
Fri Aug 26 17:25:22 GMT 2005
# ntpq -p w2k3timesrv
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 12 l 401 64 377 0.00 0.000 0.93
# date
Fri Aug 26 17:25:38 GMT 2005
# date
Fri Aug 26 17:29:42 GMT 2005 <<==============at this moment my time server is showing 17:21
# ntpq -p w2k3timesrv
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 12 l 397 64 377 0.00 0.000 0.93
## date
Fri Aug 26 17:32:38 GMT 2005
# ntpq -p w2k3timesrv
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 12 l 449 64 377 0.00 0.000 0.95
# date
Fri Aug 26 17:32:59 GMT 2005 <<==============at this moment my time server is showing 17:25
#
# date
Fri Aug 26 17:40:32 GMT 2005 <<==============at this moment my time server is showing 17:32
# ntpq -p w2k3timesrv
remote refid st t when poll reach delay offset disp
==============================================================================
*LOCAL(1) LOCAL(1) 12 l 407 64 377 0.00 0.000 0.94
#


what is happening?
anyone, please help me decipher this!

thanking you in advance for your replies

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
RAC_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

You do not seem to have any problem now.
ntpq -p "windows_server" output look ok.

Reach is 377, which is ok, displacement is less than 1. ntpdate "windows_server" should set time same to windows hosts time on hp-ux.
There is no substitute to HARDWORK
Bill Hassell
Honored Contributor
Solution

Re: Synchronizing system time with my time server (w2k3)

When you run ntpdate, you are forcing an step-change. That should only be done during bootup on a production server, but for testing, it is fine. NBut in your ast post, you are always running ntpq -p w2k3timesrv which means: query the server w2k3timesrv and has nothing to do with your local system's settings. Run the command: ntpq -p (no server). It will show you all the servers you have in your /etc/ntp.conf file.

Now once your local server can contact the remote servers, ntpq -p will report on the health of your local server and if all is well, you will see the time being slewed (very slightly changed) towards the server's time. For a 2 minute change, it will take more than an hour to accomplish. The reason is that NTP will never allow anything but 86400 seconds per day. That means there is a time tick for each second. So to adjust the time, the space between ticks is adjusted slightly. Of course, this is what you want. Changing the time forward or backward can create all sorts of hidden problems with cron and databases.


Bill Hassell, sysadmin
Yogeeraj_1
Honored Contributor

Re: Synchronizing system time with my time server (w2k3)

Thank you all for your precious guidances.

I was very interesting troubleshooting this "problem".

I am still a bit confuse about the the output of the ntpq output column... Have created a new thread at: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=953153

Will be glad to get your insights there too!

thank you again

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)