【无标题】


title: “Chronyd”
createTime: 2022-01-05T14:51:19+08:00
updateTime: 2022-01-05T14:51:19+08:00
draft: false
author: “name”
tags: [“Chronyd”]
categories: [“install”]
description: “测试的”

Chronyd

chronyd是一个同步系统时钟的守护进程。

从Centos7开始默认安装时钟同步服务chronyd,而不是ntpd。

# dnf -y install chronyd
# eccho 'server ntp1.aliyun.com iburst' >> /etc/chrony.conf
# systemctl enable chronyd.service && systemctl start chronyd.service

Chronyc

chronyc is a command-line interface program which can be used to monitor chronyd’s performance and to change various operating parameters whilst it is running.

# chronyc sources -v
  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8  10   377  1000   +130us[ +147us] +/-  819us

createTime: 2022-01-05T14:51:19+08:00
updateTime: 2022-01-05T14:51:19+08:00

createTime: 2022-01-05T14:51:19+08:00
updateTime: 2022-01-05T14:51:19+08:00

set-timezone
  • 设置时区,也可以手动执行localtime软连接
createTime: 2022-01-05T14:51:19+08:00
updateTime: 2022-01-05T14:51:19+08:00
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
set-ntp BOOL

和chrony配置的ntp server进行时间同步

set-time TIME

手动设置日期时间

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值