Linux出现Leap Second问题程序响应慢如何解决

时间:2021-09-30 14:16:24

作者:admin

来源:系统部落

  众所周知,Leap Second翻译过来就是闰秒的意思,因为Linux系统要在每个月的月末把误差的时间调回来,就会出现一些列的问题,从而导致Linux程序响应慢。那么这个时候该怎么应对呢?不必担心,下面,小编带大家一起来看看Linux出现Leap Second问题程序响应慢如何的解决方法。

Linux出现Leap Second问题程序响应慢如何解决
Leap Second

  一、leap second问题测试

  1、若如下命令返回中有leap=01,那么就意味着将会有leap second发生

  ntpq -c “lassoc” -c “mrv &1 &999 leap,srcadr,stratum”

  2、若如下命令返回中有“no leap seconds”, 则表示不会有leap second发生。

  file /etc/localtime

  3、若如下命令有返回,则表示会有leap second发生。

  ntptime |egrep ‘INS|DEL’

  二、解决leap second问题

  1、停止ntpd服务

  2、重设内核状态和频率,

  ntptime -s 0 -f 0

  3、在/etc/sysconfig/ntpd文件中追加-x,启用slew mode

  4、启动ntpd服务

  leap second 之发生在特定ntpd和kernel中,本文贴上一个leap second 压力测试的C程序。

  以上就是Linux出现Leap Second问题程序响应慢如何的解决方法,更多精彩内容继续关注系统部落官网。

相关推荐

评论加载中...
提取码
XGZS
关闭 前往下载

官方交流群