HW/OS2011. 8. 3. 10:33
1. HP-UX

타임서버 시간 즉시 적용
ntpdate -u time.kriss.re.kr

타임서버 목록
time server list
time.bora.net
time.kriss.re.kr

HP-UX 에서 시간을 동기화 시키기 위한 xntpd 설정

1) "vi /etc/rc.config.d/netdaemons"
XNTPD=0 으로 되어있는 부분을
XNTPD=1 로 변경

2) "vi /etc/ntp.conf"
파일에 타임서버를 server <SERVER1> 형식으로 추가

server time.kriss.re.kr
server time.bora.net

3) "/sbin/init.d/xntpd start" 실행

4) /var/adm/syslog/syslog.log 에서 실행 로그 확인


원문 : http://www.linuxquestions.org/questions/other-*nix-55/time-synchronization-on-hpux11-376621/


적용 후 상태확인
root:ezenfos:/var/adm/syslog>ntpq -c rv
status=c011 sync_alarm, sync_unspec, 1 event, event_restart
system="UNIX/HPUX", leap=11, stratum=16, rootdelay=0.00,
rootdispersion=0.00, peer=0, refid=0.0.0.0,
reftime=00000000.00000000  Thu, Feb  7 2036 15:28:16.000, poll=4,
clock=cfdd99b8.11723000  Tue, Jul  6 2010 21:02:00.068, phase=0.000,
freq=0.00, error=0.00
root:ezenfos:/var/adm/syslog>
root:ezenfos:/var/adm/syslog>ntpq -p 
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 210.98.16.100   .PPS.            1 u   43   64    1    24.80   23.794 15875.0
 time.bora.net   clepsydra.dec.c  2 u   44   64    7     1.30   12.243 3875.06
root:ezenfos:/var/adm/syslog>

2. Linux

1. 운영중인 서버 ntp 패키지 설치 여부 확인
[root@reyad etc]# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4
[root@reyad etc]#

 Ntp 패키지가 설치 되어 있지 않으면 해당 버전에 맞는 CD 에서 패키지 설치 할수 있음.
  패키지 설치 방법
  #rpm ?ivh ntp~~~~~

2. 서버 부팅시 ntp 활성화 여부 확인
[root@reyad etc]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@reyad etc]#

 Chkconfig 이용하여 서버 부팅시 ntpd 데몬 활성화 여부 확인 3,5 level 에 off 가 되어 있으면 자동 활성화
되지 않음. 자동 활성화 하기 위해서는 3,4 에 on 으로 변경

[root@reyad etc]# chkconfig --level 3 ntpd on
[root@reyad etc]# chkconfig --level 5 ntpd on
[root@reyad etc]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@reyad etc]#

3. ntpd.conf 파일 설정
[root@reyad etc]#vi /etc/ntpd.conf
restrict default nomodify notrap noquery 부분에
server kr.pool.ntp.org
server asia.pool.ntp.org
server pool.ntp.org
추가

4. ntpd 데몬 실행
[root@reyad etc]#/etc/rc.d/init.d/ntp start

5. ntpd 시간 확인
[root@reyad etc]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 218.234.23.44   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
+218.234.23.44   211.115.194.21   3 u    4   64  377    6.229   18.609   5.512
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
*58.73.137.250   .GPS.            1 u   60   64  377   11.497   13.709   7.218
 LOCAL(0)        LOCAL(0)        10 l   53   64  377    0.000    0.000   0.001
[root@reyad etc]#
 위 * 가 현재 가져오고 있는 타임 서버임

6. /var/log/messages 확인
[root@reyad etc]# tail -f /var/log/messages
Mar 18 09:40:18 reyad ntpd: ntpd shutdown succeeded
Mar 18 09:40:20 reyad ntpd[12506]: ntpd 4.2.0a@1.1190-r Mon Oct 11 09:10:20 EDT 2004 (1)
Mar 18 09:40:20 reyad ntpd[12506]: precision = 1.000 usec
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, 0.0.0.0#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, ::#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface lo, 127.0.0.1#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface eth0, 192.168.0.222#123
Mar 18 09:40:20 reyad ntpd[12506]: kernel time sync status 0040
Mar 18 09:40:20 reyad ntpd: ntpd startup succeeded
Mar 18 09:40:24 reyad ntpd[12506]: frequency initialized 0.000 PPM from /var/lib/ntp/drift

3. AIX
   1. Verify that you have a suitable NTP server. Enter:
      # lssrc -ls xntpd
      NOTE: Sys peer should show a valid server or 127.127.1.0.
      If the server is "insane", you will need to correct it by adding a server line to /etc/ntp.conf and restarting xntpd. This can be done by following these steps:
      # vi /etc/ntp.conf
      Add:
      server 127.127.1.0
      Double check that "broadcast client" is commented out.
      # stopsrc -s xntpd
      # startsrc -s xntpd
      NOTE: If the server runs databases, use the -x flag to prevent the clock from changing in a negative direction. Enter the following:
      # startsrc -s xntpd -a "-x"
   2. Repeat Step 1 to verify that the server is synched. This process can take up to 12 minutes. 

AIX On client
   1. Verify that you have a server suitable for synchronization. Enter:
      # ntpdate -d ip.address.of.server
      The offset must be less than 1000 seconds for xntpd to synch. If the offset is greater than 1000 seconds, change the time manually on the client and run the ntpdate -d again.
      If you get the message, "no server suitable for synchronization found", verify xntpd is running on the server (see above) and that no firewalls are blocking port 123.
   2. Specify your xntp server in /etc/ntp.conf, enter:
      # vi /etc/ntp.conf
      (Comment out the "broadcastclient" line and add server ip.address.of.server prefer.)
      Leave the driftfile and tracefile at their defaults.
   3. Start the xntpd daemon:
      # startsrc -s xntpd
      (Use the -x flag if it is appropriate for your environment.)
   4. Uncomment xntpd from /etc/rc.tcpip so it will start on a reboot.
      # vi /etc/rc.tcpip
      Uncomment the following line:
      start /usr/sbin/xntpd "$src_running"
      If using the -x flag, add "-x" to the end of the line. You must include the quotes around the -x.
   5. Verify that the client is synched.
      # lssrc -ls xntpd
      NOTE: Sys peer should display the IP address or name of your xntp server. This process may take up to 12 minutes. 

Posted by [TheWon]