当前位置 主页 > 服务器问题 > Linux/apache问题 >

    linux配置ntp服务器的方法(2)

    栏目:Linux/apache问题 时间:2019-11-08 00:39

    2.查看ntp服务器有无和上层ntp连通

    # ntpstat
    synchronised to NTP server (120.25.108.11) at stratum 3
      time correct to within 99 ms
      polling server every 64 s
    

    3.查看ntp服务器与上层ntp的状态

    # ntpq -p
       remote      refid   st t when poll reach  delay  offset jitter
    ==============================================================================
     news.neu.edu.cn .INIT.     16 u  -  64  0  0.000  0.000  0.000
    x202.118.1.130  202.118.1.47   2 u  7  64 377 153.659  9.605 19.941
    *time4.aliyun.co 10.137.38.86   2 u  10  64 377  39.666 -47.661 15.944
    remote  - 本机和上层ntp的ip或主机名,“+”表示优先,“*”表示次优先
    refid  - 参考上一层ntp主机地址
    st    - stratum阶层
    when   - 多少秒前曾经同步过时间
    poll   - 下次更新在多少秒后
    reach  - 已经向上层ntp服务器要求更新的次数
    delay  - 网络延迟
    offset  - 时间补偿
    jitter  - 系统时间与bios时间差
    

    六.配置时间同步客户机

    1.执行ntpdate命令:

    ntpdate 192.168.1.101 #192.168.1.101为ntp服务器IP地址

    2.写入BIOS

    hclock -w

    3.crond服务

    vi /etc/crontab
    30 8 * * * root /usr/sbin/ntpdate 192.168.1.101; /sbin/hwclock -w

    4.重启crond服务

    service crond restart

    以上就是小编为大家带来的linux配置ntp服务器的方法全部内容了,希望大家多多支持IIS7站长之家~