18.9 An NTP Polling Client

     

This is a relatively simple configuration. All we need to know are the addresses of the timeservers we have on our network; the timeservers can be any type of server, even a local clock impersonator. In this case, our timeservers are hpeos002 (reverted back to be a Stratum-2 server) and hpeos003 . I just need to set up the files /etc/ntp.conf and /etc/rc.config.d.netdaemons . As before, the changes are not difficult in this situation:

 

 root@hpeos001[] #  vi /etc/ntp.conf  ... server hpeos002 server hpeos003 driftfile /etc/ntp.drift root@hpeos001[] #  vi /etc/rc.config.d/netdaemons  ... export NTPDATE_SERVER="hpeos002 hpeos003" export XNTPD=1 export XNTPD_ARGS= 

We can now start the daemons as before:

 

 root@hpeos001[] #  /sbin/init.d/xntpd start  28 Aug 11:15:32 ntpdate[19404]: step time server 192.168.0.202 offset 1238071.026636 sec xntpd  root@hpeos001[] # 

Immediately, we should see a step-change in the time of this machine. After the usual 5 minutes while the daemon calibrates itself, we should see a settling down of the daemon, keeping us synchronized with our timeservers.

 

 root@hpeos001[] #  date ; remsh hpeos002 date  Thu Aug 28 11:17:36 BST 2003 Thu Aug 28 11:17:36 BST 2003 root@hpeos001[] # root@hpeos001[] #  ntpq -p  remote          refid      st t when poll reach   delay   offset    disp ============================================================================= +hpeos002       192.6.38.127     2 u    5   64  377     1.19   -4.147    0.63 *hpeos003       192.36.133.17    2 u   21   64  377     0.64   -4.102    0.34 root@hpeos001[] # 



HP-UX CSE(c) Official Study Guide and Desk Reference
HP-UX CSE(c) Official Study Guide and Desk Reference
ISBN: N/A
EAN: N/A
Year: 2006
Pages: 434

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net