AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[clock-synchronization](server)

Martin Hope
Fèlix Boniquet Pelfort
Asked: 2021-01-07 00:05:08 +0800 CST

如何在 Ubuntu 20.04.1 LTS 上设置与 NTP 的时间同步

  • 1

使用最新的可用软件包更新基本系统后:

apt-get update -y

和

root@localhost:~# timedatectl
               Local time: Wed 2021-01-06 08:03:11 UTC
           Universal time: Wed 2021-01-06 08:03:11 UTC
                 RTC time: Wed 2021-01-06 08:03:12    
                Time zone: Etc/UTC (UTC, +0000)       
System clock synchronized: yes                        
              NTP service: active                     
          RTC in local TZ: no  

但是当我使用以下内容检查时间同步服务的状态时:

systemctl status systemd-timesyncd.service

我懂了:

● systemd-timesyncd.service
     Loaded: masked (Reason: Unit systemd-timesyncd.service is masked.)
     Active: inactive (dead)
linux ubuntu time-synchronization systemctl clock-synchronization
  • 1 个回答
  • 1984 Views
Martin Hope
Opa114
Asked: 2020-12-08 07:17:35 +0800 CST

DC NTP 不同步和本地 CMOS 时钟问题

  • 0

我已经按照这里的描述配置了我的 DC(域控制器;Windows 2016),以便从我的 Sophos-UTM 获得时间。所以我按照那里的描述配置了 GPO。但在那之后并重新启动服务器,我注意到当我运行w32tm /query /status源下的命令时列出了本地 CMOS 时钟,但是这里应该列出我的 Sophos-UTM 的 IP 还是我错了?在我上面链接的屏幕截图中,当它的作者运行相同的命令时,列出了他的配置中的正确 ip。那么这里出了什么问题?

所有需要的端口 (UDP 123) 都是开放且可访问的。我已经对其进行了测试并查看了我的防火墙配置。出于测试目的,我在 DC 上运行此命令:w32tm /stripchart /computer:IP-OF-SOPHOS-UTM /dataonly /samples:5

使用该命令,我从 Sophos-UTM 获得了 5 个时间戳样本,因此我的防火墙规则正在工作并且那里的配置是正确的。我在日志中也看到了这一点。

此 DC 是一个虚拟机,在 vSphere ESXi(免费版本 7.0.1)中运行。ESXi-Host 和 Guest 之间的时间同步已禁用,如官方 vmWare 文档中所述。

这是命令的输出w32tm /query /status

Jump indicator: 0 (no warning)
stratum: 1 (primary reference - synchron. via radio clock)
Precision: -6 (15.625ms per tick)
stem delay: 0.0000000s
stem deviation: 10.0000000s
Reference ID: 0x4C4F434C (source name: "LOCL")
Last successful synchronization time: 07.12.2020 15:04:23
Source: Local CMOS Clock
Polling interval: 6 (64s)

命令的输出w32tm /query /configuration

[Configuration]

EventLogFlags: 2 (Lokal)
AnnounceFlags: 10 (Lokal)
TimeJumpAuditOffset: 28800 (Lokal)
MinPollInterval: 6 (Lokal)
MaxPollInterval: 10 (Lokal)
MaxNegPhaseCorrection: 172800 (Lokal)
MaxPosPhaseCorrection: 172800 (Lokal)
MaxAllowedPhaseOffset: 300 (Lokal)

FrequencyCorrectRate: 4 (Lokal)
PollAdjustFactor: 5 (Lokal)
LargePhaseOffset: 50000000 (Lokal)
SpikeWatchPeriod: 900 (Lokal)
LocalClockDispersion: 10 (Lokal)
HoldPeriod: 5 (Lokal)
PhaseCorrectRate: 7 (Lokal)
UpdateInterval: 100 (Lokal)
 
[Time-Provider]

NtpClient (Lokal)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Lokal)
Enabled: 1 (Lokal)
InputProvider: 1 (Lokal)
AllowNonstandardModeCombinations: 1 (Lokal)
ResolvePeerBackoffMinutes: 15 (Richtlinie)
ResolvePeerBackoffMaxTimes: 7 (Richtlinie)
CompatibilityFlags: 2147483648 (Lokal)
EventLogFlags: 0 (Richtlinie)
LargeSampleSkew: 3 (Lokal)
SpecialPollInterval: 900 (Richtlinie)
Type: NTP (Richtlinie)
NtpServer: MY-SOPHOS-UTM-IP,0x5 (Richtlinie)

NtpServer (Lokal)
DllName: C:\Windows\SYSTEM32\w32time.DLL (Lokal)
Enabled: 1 (Lokal)
InputProvider: 0 (Lokal)
AllowNonstandardModeCombinations: 1 (Lokal)

VMICTimeProvider (Lokal)
DllName: C:\Windows\System32\vmictimeprovider.dll (Lokal)
Enabled: 1 (Lokal)
InputProvider: 1 (Lokal)

命令的输出w32tm /query /peers

Number Peers: 1

Peer: MY-SOPHOS-UTM-IP,0x5
Status: Active
Time remaining: 495.5965885s
Mode: 1 (Symmetrically active)
Stratum: 0 (not specified)
Peer Retrieval Interval: 0 (not specified)
Host polling interval: 4 (16s)

命令的输出w32tm /resync /rediscover

Resynchronize command is sent to the local computer.
The computer was not synchronized because no time data was available.

非常奇怪的行为。哪位大神,有解决办法吗?

windows ntp time-synchronization windows-server-2016 clock-synchronization
  • 1 个回答
  • 1435 Views
Martin Hope
dandan
Asked: 2016-07-25 02:27:04 +0800 CST

Red hat Linux + TIME ZONE CONFIGURATION + 来自时钟文件的详细信息

  • 8

为了在 red hat Linux 机器(版本 5 和 6)上配置时区,需要配置文件:

/etc/sysconfig/clock

并在它们之间创建符号链接

/etc/localtime to /usr/share/zoneinfo/America/New_York

但/etc/sysconfig/clock还需要将ZONE变量设置为以下示例:

ZONE="America/New_York"

那么当从指向ZONE=America/New_York的链接中非常清楚时,需要设置变量吗?/etc/localtime/usr/share/zoneinfo/**America/New_York**

那么需要用“ ”值设置ZONE参数吗?America/New_York

linux redhat timezone clock-synchronization date
  • 2 个回答
  • 6245 Views
Martin Hope
Nick
Asked: 2010-01-13 09:10:43 +0800 CST

NTP 更新失败

  • 3

我正在尝试ntp在服务器上使用。

检查 ps ntpd 进程似乎正在运行:

ntpd -u ntp:ntp -p /var/run/ntpd.pid -g

但是时间没有得到纠正,有什么想法吗?

漂移约为每月 2 分钟,根据我之前提出的问题的答案,这不是问题。我知道纠正严重漂移的时间可能需要一些时间,但我最近将时间纠正为准确的值。

(服务器详细信息 - Cent OS,Linux 版本 2.6.9。)

ntpq -pn 的结果

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 72.14.188.52    .INIT.          16 u  62h 1024    0    0.000    0.000 4000.00
 4.79.132.217    .INIT.          16 u  10d 1024    0    0.000    0.000 4000.00
 72.14.179.211   .INIT.          16 u  62h 1024    0    0.000    0.000 4000.00
*127.127.1.0     LOCAL(0)        10 l    2   64  377    0.000    0.000   0.004

/etc/log/messages 的内容

Jan 10 04:21:36 server1 ntpd[18417]: sendto(72.14.188.52): Operation not permitted
Jan 10 04:21:41 server1 ntpd[18417]: sendto(72.14.179.211): Operation not permitted
Jan 10 04:22:13 server1 ntpd[18417]: sendto(4.79.132.217): Operation not permitted
Jan 10 04:38:41 server1 ntpd[18417]: sendto(72.14.188.52): Operation not permitted
....

更新

感谢您的回复。我已经更新了防火墙设置并且没有更多的消息被附加到etc/log/messages,所以看起来问题已经解决了。我会再给它一些时间看看会发生什么。

linux time ntp clock-synchronization
  • 4 个回答
  • 11767 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve