开发者社区 问答 正文

linux时间有15分钟误差, 修正后一定时间又出现误差, 如何排查

时区, ntp都试过了, 无论我怎么纠正时间, 一两天后又会出现误差
我应该如何排查这个问题的原因?

展开
收起
a123456678 2016-06-17 17:27:27 2743 分享 版权
1 条回答
写回答
取消 提交回答
  • 检查是否是虚拟机
    在虚拟机里
    cat /proc/sys/xen/independent_wallclock
    0 means that the virtual machine is getting time from the host and not using independent wallclock.
    1 means that the virtual machine is using independent wallclock and managing its time independent from the host
    如果是虚拟机则可以通过修正host的时间或者打开时间独立

    1. 编辑 /etc/sysctl.conf
    2. 添加 xen.independent_wallclock=1
    3. 执行 sysctl -p 命令
      如果是物理机, 则检查ntp配置是否正确。
    2019-07-17 19:43:14
    赞同 展开评论
问答分类:
问答地址: