电脑教程
位置:首页>> 电脑教程>> 软件教程>> Linux出现Leap Second问题程序响应慢如何解决

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

  发布时间:2023-01-11 21:06:58 

标签:Linux,Leap,Second问题程序响应慢

众所周知,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程序。


0
投稿

猜你喜欢

手机版 电脑教程 asp之家 www.aspxhome.com