|
|
2b78f7 |
diff -up ntp-4.2.6p5/html/miscopt.html.logdefault ntp-4.2.6p5/html/miscopt.html
|
|
|
2b78f7 |
--- ntp-4.2.6p5/html/miscopt.html.logdefault 2009-12-09 08:36:36.000000000 +0100
|
|
|
2b78f7 |
+++ ntp-4.2.6p5/html/miscopt.html 2014-01-03 15:08:11.947681966 +0100
|
|
|
2b78f7 |
@@ -56,11 +56,11 @@
|
|
|
2b78f7 |
While not strictly a security function, the Autokey protocol provides means to securely retrieve the current or updated leapsecond values from a server.
|
|
|
2b78f7 |
<tt>logconfig configkeyword</tt>
|
|
|
2b78f7 |
This command controls the amount and type of output written to the system <tt>syslog</tt> facility or the alternate <tt>logfile</tt> log file. All <tt>configkeyword</tt> keywords can be prefixed with <tt>=</tt>, <tt>+</tt> and <tt>-</tt>, where <tt>=</tt> sets the <tt>syslogmask</tt>, <tt>+</tt> adds and <tt>-</tt> removes messages. <tt>syslog messages</tt> can be controlled in four classes (<tt>clock</tt>, <tt>peer</tt>, <tt>sys</tt> and <tt>sync</tt>). Within these classes four types of messages can be controlled: informational messages (<tt>info</tt>), event messages (<tt>events</tt>), statistics messages (<tt>statistics</tt>) and status messages (<tt>status</tt>).
|
|
|
2b78f7 |
- Configuration keywords are formed by concatenating the message class with the event class. The <tt>all</tt> prefix can be used instead of a message class. A message class may also be followed by the <tt>all</tt> keyword to enable/disable all messages of the respective message class. By default, <tt>logconfig</tt> output is set to <tt>allsync</tt>.
|
|
|
2b78f7 |
+ Configuration keywords are formed by concatenating the message class with the event class. The <tt>all</tt> prefix can be used instead of a message class. A message class may also be followed by the <tt>all</tt> keyword to enable/disable all messages of the respective message class. By default, <tt>logconfig</tt> output is set to <tt>=syncall +sysevents +sysstatus</tt>.
|
|
|
2b78f7 |
Thus, a minimal log configuration could look like this:
|
|
|
2b78f7 |
- <tt>logconfig=syncstatus +sysevents</tt>
|
|
|
2b78f7 |
+ <tt>logconfig =syncstatus +sysevents</tt>
|
|
|
2b78f7 |
This would just list the synchronizations state of <tt>ntpd</tt> and the major system events. For a simple reference server, the following minimum message configuration could be useful:
|
|
|
2b78f7 |
- <tt>logconfig allsync +allclock</tt>
|
|
|
2b78f7 |
+ <tt>logconfig =syncall +clockall</tt>
|
|
|
2b78f7 |
This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.
|
|
|
2b78f7 |
<tt>logfile logfile</tt>
|
|
|
2b78f7 |
This command specifies the location of an alternate log file to be used instead of the default system <tt>syslog</tt> facility. This is the same operation as the <tt>-l </tt>command line option.
|
|
|
2b78f7 |
diff -up ntp-4.2.6p5/ntpd/ntp_config.c.logdefault ntp-4.2.6p5/ntpd/ntp_config.c
|
|
|
2b78f7 |
--- ntp-4.2.6p5/ntpd/ntp_config.c.logdefault 2011-12-01 03:55:17.000000000 +0100
|
|
|
2b78f7 |
+++ ntp-4.2.6p5/ntpd/ntp_config.c 2014-01-03 15:05:44.293553494 +0100
|
|
|
2b78f7 |
@@ -3835,7 +3835,7 @@ getconfig(
|
|
|
2b78f7 |
|
|
|
2b78f7 |
#endif /* SYS_WINNT */
|
|
|
2b78f7 |
res_fp = NULL;
|
|
|
2b78f7 |
- ntp_syslogmask = NLOG_SYNCMASK; /* set more via logconfig */
|
|
|
2b78f7 |
+ ntp_syslogmask = NLOG_SYNCMASK | NLOG_SYSEVENT | NLOG_SYSSTATUS; /* set more via logconfig */
|
|
|
2b78f7 |
|
|
|
2b78f7 |
/*
|
|
|
2b78f7 |
* install a non default variable with this daemon version
|