ntpd

Arch Linux

/etc/ntp.conf

server ntp_server

#

driftfile /var/lib/ntp/ntp.drift

logfile /var/log/ntp.log

スタート
# systemctl start ntpd


Ubuntu

# apt install ntp

/etc/ntp.conf

$ systemctl status ntp
● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp)
   Active: active (running) since 水 2016-01-13 08:13:25 JST; 2min 30s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 17950 ExecStop=/etc/init.d/ntp stop (code=exited, status=0/SUCCESS)
  Process: 17970 ExecStart=/etc/init.d/ntp start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/ntp.service
           └─17979 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:120

 1月 13 08:13:25 EG-swl67 ntpd[17979]: ntp_io: estimated max descriptors: 1...6
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen and drop on 0 v4wildcard 0.0....3
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen and drop on 1 v6wildcard :: U...3
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen normally on 2 lo 127.0.0.1 UD...3
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen normally on 3 ens32 172.20.24...3
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen normally on 4 lo ::1 UDP 123
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listen normally on 5 ens32 fe80::250...3
 1月 13 08:13:25 EG-swl67 ntpd[17979]: peers refreshed
 1月 13 08:13:25 EG-swl67 ntpd[17979]: Listening on routing socket on fd #2...s
 1月 13 08:13:25 EG-swl67 ntp[17970]: ...done.
Hint: Some lines were ellipsized, use -l to show in full.

デーモンを使わないで設定

# ntpd -q


Return

Aug/20/2020 AM 08:15