LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-15-2022, 06:10 PM   #1
metaed
Member
 
Registered: Apr 2022
Location: US
Distribution: Slackware64 15.0
Posts: 365

Rep: Reputation: 171Reputation: 171
ntpd logging to syslogd, fails to log panic_stop message


Slackware 15.0 is running as a guest on Windows 10 Hyper-V. The NTP daemon went down. The issue is that it took longer than it should have for us to figure out, because of a logging problem.

Overnight, the Windows host went down for a software update and turned itself off. Hours later, we discovered this and booted the Windows host. The Slackware 15.0 guest resumed, and the NTP daemon went down silently. We know the cause was the guest system clock now being hours behind the NTP peers. Downtime of more than 1000 seconds triggers an NTP panic_stop. But the NTP panic_stop message is missing from the log.

Otherwise, NTP has no trouble logging. For example, when the Windows host is booted, NTP on the guest logs a sequence of messages acknowledging that the eth0 interface changed.

Anybody know the cause of this missing log message?
 
Old 06-16-2022, 01:16 AM   #2
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 974

Rep: Reputation: 664Reputation: 664Reputation: 664Reputation: 664Reputation: 664Reputation: 664
During the years I have seen this happen many times for different reasons, but as far as I can remember, there have allways been a message in syslog that the time difference is too big.

Reasons for big time difference might be that some machine doesn't have UTC time in its hardware clock and daylight saving has changed since last boot. Another common reason is a bad CMOS battery.

For this, I have written my own startup script for ntp which calls ntpdate before starting ntpd:

Code:
nazgul:/tmp> cat /usr/local/etc/rc.d/rc.ntpd
#!/bin/sh

if [ -x /usr/sbin/ntpd ]; then
  if [ -x /usr/sbin/ntpdate ]; then
    /usr/sbin/ntpdate balrog
  fi
  /usr/sbin/ntpd
fi
The above script is called from /etc/rc.d/rc.local. However, lately ntpd has been started with the switch -g from the original scripts. With that I don't think that ntpdate is needed anymore.

regards Henrik
 
Old 09-19-2022, 04:37 PM   #3
metaed
Member
 
Registered: Apr 2022
Location: US
Distribution: Slackware64 15.0
Posts: 365

Original Poster
Rep: Reputation: 171Reputation: 171
The answer is that panic_stop is treated much differently from most ntpd messages associated with a fatal condition. Most fatal conditions are always syslogged at "err" severity before exiting. But panic_stop is conditionally logged, depending on the "sysevents" syslog filter, and at "info" severity.

According to bug 2410 at the NTP Bugzilla, this is a regression -- at one time, panic_stop was always logged. A patch is being considered for release ntp-4.2.8p16.

Meanwhile the workaround is to add a logconfig command to ntp.conf, to make sure the event is not filtered. A couple of possibilities:

# log the panic_stop condition and other system events
logconfig +sysevents


# better yet, disable syslog filtering so that this and any other such events get logged
logconfig =allall
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu and Bind - Named log file is not logging info after syslogd restarts Spacetrucker Linux - Server 7 05-13-2009 10:56 AM
how can i log entire message displayed on console (no klogd, syslogd) neolunch Linux - General 0 02-25-2009 05:52 AM
Syslogd logging severity levels endfx Linux - Server 3 04-25-2007 10:28 AM
syslogd logging questsion plan9 Slackware 2 09-03-2004 04:23 PM
logging external messages with syslogd slawomir Linux - Networking 3 09-04-2002 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration