免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2853 | 回复: 3
打印 上一主题 下一主题

NTP服务器不准确 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-13 22:29 |只看该作者 |倒序浏览
请教各位老师:

搭建NTP服务器,发现时间不准确且时差无规律

OS: CentOS 5.3

NTP:ntpq 4.2.2p1@1.1570-o Thu Jan 22 02:51:31 UTC 2009 (1)

[root@localhost ntp]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
clock.tl.fukuok .GPS.            1 u  156   64   34   73.683  88983.1 4448041
114.80.81.69    209.81.9.7       2 u   24   64    7   48.525  309852. 117238.
114.80.81.1     209.81.9.7       2 u   20   64   25   55.111  6380437 6140755
221.130.196.230 192.43.244.18    2 u   27   64   37   70.016  234339. 3074800
*LOCAL(0)        .LOCL.          10 l   23   64   37    0.000    0.000   0.001


[root@localhost ntp]# ntpstat
synchronised to local net at stratum 11
   time correct to within 448 ms
   polling server every 64 s



/etc/ntp.conf


  1. [root@localhost etc]# cat /etc/ntp.conf
  2. # Permit time synchronization with our time source, but do not
  3. # permit the source to query or modify the service on this system.
  4. restrict default kod nomodify notrap nopeer noquery
  5. restrict -6 default kod nomodify notrap nopeer noquery
  6. # Permit all access over the loopback interface.  This could
  7. # be tightened as well, but to do so would effect some of
  8. # the administrative functions.
  9. restrict 127.0.0.1
  10. #restrict -6 ::1
  11. # Hosts on local network are less restricted.
  12. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
  13. restrict 172.16.1.0 mask 255.255.255.0 nomodify
  14. # Use public servers from the pool.ntp.org project.
  15. # Please consider joining the pool (http://www.pool.ntp.org/join.html).

  16. server 0.centos.pool.ntp.org
  17. server 1.centos.pool.ntp.org
  18. server 2.centos.pool.ntp.org
  19. #broadcast 192.168.1.255 key 42         # broadcast server
  20. #broadcastclient                        # broadcast client
  21. #broadcast 224.0.1.1 key 42             # multicast server
  22. #multicastclient 224.0.1.1              # multicast client
  23. #manycastserver 239.255.254.254         # manycast server
  24. #manycastclient 239.255.254.254 key 42  # manycast client
  25. # Undisciplined Local Clock. This is a fake driver intended for backup
  26. # and when no outside source of synchronized time is available.
  27. server  127.127.1.0     # local clock
  28. fudge   127.127.1.0 stratum 10
  29. # Drift file.  Put this in a directory which the daemon can write to.
  30. # No symbolic links allowed, either, since the daemon updates the file
  31. # by creating a temporary in the same directory and then rename()'ing
  32. # it to the file.
  33. driftfile /var/lib/ntp/drift
  34. # Key file containing the keys and key identifiers used when operating
  35. # with symmetric key cryptography.
  36. keys /etc/ntp/keys
  37. # Specify the key identifiers which are trusted.
  38. #trustedkey 4 8 42
  39. # Specify the key identifier to use with the ntpdc utility.
  40. #requestkey 8
  41. # Specify the key identifier to use with the ntpq utility.
  42. #controlkey 8



复制代码

[root@localhost etc]# cat /etc/sysconfig/clock
  1. # The ZONE parameter is only evaluated by system-config-date.
  2. # The timezone of the system is defined by the contents of /etc/localtime.
  3. ZONE="Asia/Shanghai"
  4. UTC=false
  5. #UTC=true
  6. ARC=false
复制代码

论坛徽章:
0
2 [报告]
发表于 2009-07-20 01:33 |只看该作者
ding ~~~~~~

论坛徽章:
0
3 [报告]
发表于 2009-07-20 01:55 |只看该作者
你在 vmware 這類環境跑系統嗎?

论坛徽章:
0
4 [报告]
发表于 2009-07-30 18:04 |只看该作者

回复 #1 qmailer 的帖子

最后的方式是这个时间服务器与互联网上的时间服务器进行时间的同步 并同时校正BIOS的时钟
ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*218.75.4.130    209.81.9.7       2 u  243 1024  377  283.288   -6.066   1.195
221.130.196.230 209.81.9.7       2 u  191 1024  377  163.524  -264.23   3.922
LOCAL(0)        .LOCL.          10 l   53   64  377    0.000    0.000   0.001

时间的误差 于时区选择 有一定的关系的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP