syslog中ntpdate的“NTP套接字正在使用”消息

cron.log中,我可以看到ntpdate正在从每天23:15运行的cron作业中触发

3月10日23:15:01 seitan / USR / SBIN / CRON [22407] :(根)CMD(/etc/network/if-up.d/ntpdate)

但我似乎无法find导致这些消息填满我的系统日志的cron作业

Mar 10 23:15:01 seitan ntpdate [22416]:NTP套接字正在使用,正在退出

我猜我需要改变这个cron作业来执行这个命令之前停止ntp服务,然后再次启动它,但我不知道这是从哪里触发。 我已经检查了cron.daily目录,它只包含一个文件ntp ,似乎只是旋转ntp stats(下面的内容):

 #!/bin/sh # The default Debian ntp.conf enables logging of various statistics to # the /var/log/ntpstats directory. The daemon automatically changes # to a new datestamped set of files at midnight, so all we need to do # is delete old ones, and compress the ones we're keeping so disk # usage is controlled. statsdir=$(cat /etc/ntp.conf | grep -v '^#' | sed -n 's/statsdir \([^ ][^ ]*\)/\1/p') if [ -n "$statsdir" ] && [ -d "$statsdir" ]; then # only keep a week's depth of these find "$statsdir" -type f -mtime +7 -exec rm {} \; # compress whatever is left to save space cd "$statsdir" ls *stats.???????? > /dev/null 2>&1 if [ $? -eq 0 ]; then # Note that gzip won't compress the file names that # are hard links to the live/current files, so this # compresses yesterday and previous, leaving the live # log alone. We supress the warnings gzip issues # about not compressing the linked file. gzip --best --quiet *stats.???????? return=$? case $return in 2) exit 0 # squash all warnings ;; *) exit $return # but let real errors through ;; esac fi fi 

我从来没有碰过系统中的任何ntpconfiguration。

如果你有正确的ntp运行和configuration,根本不需要运行ntpdate

我通常使用它是为了在安装过程中手动设置时钟。