rpm -qa|grep ntp
systemctl status chronyd.service
[hik@HikvisionOS ~]$ systemctl status chronyd.service
○ chronyd.service
Loaded: masked (Reason: Unit chronyd.service is masked.)
Active: inactive (dead)
systemctl restart chronyd.service
Failed to restart chronyd.service: Unit chronyd.service is masked.
systemctl unmask chronyd.service
systemctl enable chronyd.service
server 192.168.75.167 #指定服务器ip
allow 192.168.75.0/24 #表示允许75网段机器访问
local stratum 10 #如果不需要同步网络时间的话,使用本地时间
systemctl start chronyd
systemctl status chronyd.service
chronyc sources -v
chronyc tracking
systemctl status firewalld
netstat -nulp
1.根据端口号查看进程号
netstat -nlp | grep 123
2.根据进程号查看路径
ll /proc/进程号/cwd
ll /proc/16980/cwd
ll /proc/766653/cwd
或pwdx 进程号
ll /proc/进程号/cwd
ll /proc/85764/cwd
ls -l /proc/85764/exe
iptables -L
^? HikvisionOS 1 6 1 14 +6822ns[+6822ns] +/- 7520ns
[root@HikvisionOS ~]# systemctl status chronyd.service
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2024-06-21 18:35:35 CST; 31s ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 827043 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 827069 (chronyd)
Tasks: 1
Memory: 204.0K
CGroup: /system.slice/chronyd.service
└─ 827069 /usr/sbin/chronyd
6月 21 18:35:35 HikvisionOS systemd[1]: Starting NTP client/server...
6月 21 18:35:35 HikvisionOS chronyd[827069]: chronyd version 4.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS …PV6 +DEBUG)
6月 21 18:35:35 HikvisionOS chronyd[827069]: Could not open NTP socket on 0.0.0.0:123
6月 21 18:35:35 HikvisionOS chronyd[827069]: Frequency 0.831 +/- 0.065 ppm read from /var/lib/chrony/drift
6月 21 18:35:35 HikvisionOS systemd[1]: Started NTP client/server.
Hint: Some lines were ellipsized, use -l to show in full.
[root@HikvisionOS ~]# netstat -nlp | grep 123
udp 0 0 10.42.150.19:123 0.0.0.0:* 766653/ntpserver
udp 0 0 127.0.0.1:123 0.0.0.0:* 766653/ntpserver
udp 0 0 0.0.0.0:123 0.0.0.0:* 766653/ntpserver
udp6 0 0 fe80::3eec:efff:fe9:123 :::* 766653/ntpserver
udp6 0 0 ::1:123 :::* 766653/ntpserver
sudo iptables -I INPUT -p udp --dport 123 -j ACCEPT
sudo iptables -I OUTPUT -p udp --sport 123 -j ACCEPT
标签:同步,chronyd,service,0.0,35,chrony,123,时间,HikvisionOS From: https://www.cnblogs.com/myibm/p/18261255