- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ntpdate for time synchronization
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 01:59 AM
тАО07-23-2003 01:59 AM
I would like to make usage of the ntpdate command in order to synchonize the clock of four server (cron job). These servers are not on a public domain, so I choosen 1 as Time server (xntpd is running on that one).
Now whenever I query from another server the time server, I got following response:
# ntpdate -d server_name
23 Jul 07:58:20 ntpdate[12051]: ntpdate version=3.5f; Mon Jun 9
14:50:06 PDT 1997 (2)
transmit(server_ip)
receive(server_ip)
transmit(server_ip)
receive(server_ip)
transmit(server_ip)
receive(server_ip)
transmit(server_ip)
receive(server_ip)
transmit(server_ip)
server server_ip, port 123
stratum 16, precision -17, leap 11, trust 000
refid [0.0.0.0], delay 0.02638, dispersion 0.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 6:28:16.000
originate timestamp: c2c8be75.a0ce7000 Wed, Jul 23 2003 7:57:41.628
transmit timestamp: c2c8be9c.d7f1f000 Wed, Jul 23 2003 7:58:20.843
filter delay: 0.02654 0.02640 0.02638 0.02638
0.00000 0.00000 0.00000 0.00000
filter offset: -39.2159 -39.2159 -39.2159 -39.2159
0.000000 0.000000 0.000000 0.000000
delay 0.02638, dispersion 0.00000
offset -39.215935
23 Jul 07:58:20 ntpdate[12051]: no server suitable for synchronization found
What I do not understand is that he can compare both times, difference between both server is not so high, and still he cannot synchronize...
Any idea?
Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 02:33 AM
тАО07-23-2003 02:33 AM
Re: ntpdate for time synchronization
I remember from somewhere that it takes up to
5 minutes to ntp client for full synchronization.So I'd wait and check syslog.log after ~5 minutes.Also can use ntpq -p.It will mark ntp servers that responded with + and most accurate with *.
Zeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 03:28 AM
тАО07-23-2003 03:28 AM
Re: ntpdate for time synchronization
ntpdate -b server_name will jump-change the time on the client regardless of the time difference. If you must keep your client running without a visible time change then use ntpdate -B server_name. NOTE: you will need patches for NTP to bring old systems up to date for this option. In this case, the time will be slowly adjusted over hours of time. But it will not change the time slowly if it is off by more than 1024 seconds.
Do NOT use cron to maintain time with ntpdate! The whole design for NTP is to keep accurate time (within 128ms) by automatically checking the time sources at least every 64 seconds and then automatically slowing down once the time is very close (like once every 17 minutes). Maintain time by editing /etc/rc.config.d/netdaemons and turning on XNTPD=1, plus adding the NTP server name (do this AFTER you fix the server so that ntpq -p works OK). Then edit /etc/ntp.conf. Since it has hundreds of comments, you might make a copy of the file and simplfy the file to just 2 lines:
server server_name prefer
driftfile /etc/ntp.drift
Then use ntpq -p (with no servername) to see that your client is properly setup. You'll see a report on the NTP server(s) for your client. Then start NTP with: /sbin/init.d/xntpd start
From now on (including reboot) NTP will run automatically--no cron necessary.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 03:45 AM
тАО07-23-2003 03:45 AM
Re: ntpdate for time synchronization
If you run one xntpd server you can configure all other clients to use also xntpd as client.
This can be easy done.
On your clients:
# vi /etc/ntp.conf
server
The server command specifies that the local server is to operate in client mode.
This should be the only uncommented line in your ntp.conf file
# vi /etc/rc.config.d/netdaemons
export NTPDATE_SERVER="
export XNTPD=1
export XNTPD_ARGS="-l /var/adm/syslog/ntp.log"
# /sbin/init.d/xntpd start
Test config with
# /usr/sbin/xntpdc -s
I guess you has attached a external clock to your time server so your ntp.conf should look like this.
server 127.127.8.0 mode 2
server 127.127.0.1
fudge 127.127.0.1 stratum 12
I you have not attached an external clock but you want that this your time reference for all other systems you must have only two lines in /etc/ntp.conf
server 127.127.1.1
fudge 127.127.1.1 stratum 10
Now the server synchronize to it own internal clock, which you can set with date command and xntpd will use this reference to give the time to the clients.
Now your time sync is completely made with xntp. If you do this like that don't forget to delete the ntpdate command from cron table, because ntpdate and xntpd using the same port.
So xntpd is already running and the port is in use and ntpdate will fail and you get a lot of error messages in your coron log.
Regards
Roland
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 07:10 AM
тАО07-23-2003 07:10 AM
Re: ntpdate for time synchronization
Many thanks for all your help.
The idea of using the netdate in a cron job was one that can be find in the documentation of HP. Still I agree this is better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 01:23 PM
тАО07-23-2003 01:23 PM
Re: ntpdate for time synchronization
I add to this msg tool called rdate that compiled for hpux so just unzip it
and use it for sync the time to remote machine.
It will set the time as on the remote machine.
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2005 03:13 AM
тАО02-21-2005 03:13 AM