В cron.log I видят, что ntpdate инициирован от задания крона, которое работает ежедневно в 23:15
10 марта 23:15:01 seitan/usr/sbin/cron [22407]: (корневой) CMD (/etc/network/if-up.d/ntpdate)
Но я, может казаться, не нахожу задание крона, которое заставляет эти сообщения заполнять мой системный журнал
10 марта 23:15:01 seitan ntpdate [22416]: сокет NTP используется, выходя
Я предполагаю, что должен сменить эту работу крона для остановки сервиса ntp, прежде чем эта команда выполнится, затем запустите его снова впоследствии, но я не знаю, откуда это инициировано. Я проверил cron.daily каталог, и он только содержит файл ntp
который только, кажется, поворачивает статистику ntp (содержание ниже):
#!/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
Я никогда не касался ни одной конфигурации NTP в системе.
Если у вас ntp
запущен и настроен правильно, запускать ntpdate
не нужно вообще.
Все, что я обычно использую, это чтобы вручную установить часы во время установки.