MarcoApple 发表于 2016-12-3 12:32:54

CentOS7下面的timedatectl的问题

新手求助:CentOS7下面NTP服务已经开启,为什么使用timedatectl命令查看设置时NTP eabled:no? 下图是具体的系统信息,红色字体部分是不明白的部分。



$ uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$
$ sudo timedatectl
password for marco:
      Local time: Sat 2016-12-03 12:24:58 CST
Universal time: Sat 2016-12-03 04:24:58 UTC
      RTC time: Sat 2016-12-03 04:24:58
       Time zone: Asia/Shanghai (CST, +0800)
   NTP enabled: no
NTP synchronized: yes
RTC in local TZ: no
      DST active: n/a
$
$ systemctl status ntpd.service
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2016-12-03 11:24:14 CST; 1h 0min ago
Process: 1042 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1072 (ntpd)
   CGroup: /system.slice/ntpd.service
         └─1072 /usr/sbin/ntpd -u ntp:ntp -g

Dec 03 11:24:17 localhost.localdomain ntpd: new interface(s) found: waking up resolver
Dec 03 11:24:17 localhost.localdomain ntpd_intres: DNS 0.centos.pool.ntp.org -> 202.65.114.202
Dec 03 11:24:17 localhost.localdomain ntpd_intres: DNS 1.centos.pool.ntp.org -> 59.125.122.217
Dec 03 11:24:18 localhost.localdomain ntpd_intres: DNS 2.centos.pool.ntp.org -> 118.67.200.10
Dec 03 11:24:18 localhost.localdomain ntpd_intres: DNS 3.centos.pool.ntp.org -> 203.158.118.2
Dec 03 11:24:20 localhost.localdomain ntpd: 0.0.0.0 c61c 0c clock_step +7.499699 s
Dec 03 11:24:27 localhost.localdomain ntpd: 0.0.0.0 c614 04 freq_mode
Dec 03 11:24:28 localhost.localdomain ntpd: 0.0.0.0 c618 08 no_sys_peer
Dec 03 11:40:09 localhost.localdomain ntpd: 0.0.0.0 c612 02 freq_set kernel -24.885 PPM
Dec 03 11:40:09 localhost.localdomain ntpd: 0.0.0.0 c615 05 clock_sync


kmnopqxyz1234 发表于 2016-12-3 14:49:56

timedatectl set-ntp true && systemctl restart chronyd.service && chronyc waitsync && timedatectl

MarcoApple 发表于 2016-12-3 21:00:39

kmnopqxyz1234 发表于 2016-12-3 14:49
timedatectl set-ntp true && systemctl restart chronyd.service && chronyc waitsync && timedatectl

u r so diao!
能讲讲为什么吗   我也有查过说是因为chronyd和NTP冲突,禁用chronyd就可以了,但是我确认过chronyd是处于disable状态。
页: [1]
查看完整版本: CentOS7下面的timedatectl的问题