linux7 ntp log,CentOS7 NTP服务

# sudo yum install ntp

# systemctl restart ntpd

# ntptime

有不少的服务严格依赖NTP服务,比如kudu和impala

# systemctl status ntpd

● ntpd.service - Network Time Service

Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)

Active: active (running) since Tue 2019-04-09 19:27:22 CST; 4min 35s ago

Process: 24483 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)

Main PID: 24484 (ntpd)

CGroup: /system.slice/ntpd.service

└─24484 /usr/sbin/ntpd -u ntp:ntp -g

Apr 09 19:27:22 10-19-145-241 systemd[1]: Started Network Time Service.

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: Listen and drop on 1 v6wildcard :: UDP 123

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: Listen normally on 2 lo 127.0.0.1 UDP 123

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: Listen normally on 3 eth0 10.19.145.241 UDP 123

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: Listening on routing socket on fd #20 for interface updates

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: 0.0.0.0 c016 06 restart

Apr 09 19:27:22 10-19-145-241 ntpd[24484]: 0.0.0.0 c012 02 freq_set ntpd 3.455 PPM

Apr 09 19:27:29 10-19-145-241 ntpd[24484]: 0.0.0.0 c615 05 clock_sync

# netstat -unlnp | grep ntp

udp 0 0 10.19.145.241:123 0.0.0.0:* 24484/ntpd

udp 0 0 127.0.0.1:123 0.0.0.0:* 24484/ntpd

udp 0 0 0.0.0.0:123 0.0.0.0:* 24484/ntpd

udp6 0 0 :::123 :::* 24484/ntpd

# ntpq -p

remote refid st t when poll reach delay offset jitter

==============================================================================

*10.19.255.1 193.228.143.23 3 u 6 8 377 0.205 -8.326 2.512

+10.19.255.2 103.18.128.60 3 u 5 8 377 0.255 -10.341 0.893

+119.28.183.184 100.122.36.4 2 u 4 8 357 50.955 -18.462 2.089

# ntptime

ntp_gettime() returns code 5 (ERROR)

time e057014c.cc2d7000 Tue, Apr 9 2019 19:32:28.797, (.797568),

maximum error 16000000 us, estimated error 16000000 us, TAI offset 0

ntp_adjtime() returns code 5 (ERROR)

modes 0x0 (),

offset 0.000 us, frequency 0.000 ppm, interval 1 s,

maximum error 16000000 us, estimated error 16000000 us,

status 0x4041 (PLL,UNSYNC,MODE),

time constant 7, precision 1.000 us, tolerance 500 ppm,

# returns code: 0 表示同步正常, 5 表示同步失败

# 它使用ntp_gettime() 系统调用读取并显示与时间相关的内核变量

相关的日志:

# tail -f /var/log/messages

参考:

https://kudu.apache.org/docs/troubleshooting.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值