[ntp:hackers] refclock ONCORE question
reg at dwf.com
reg at dwf.com
Wed Nov 17 17:03:53 UTC 2010
> Hello everyone,
>
> I recently downloaded ntp version: ntp-4.2.6p2
> and compiled with "--enable-ONCORE".
>
> So everything works and life is good except that
> syslog now is overloaded with messages from the
> Oncore GPS receiver. And I really mean "overloaded".
>
> This happens even though I specifically set:
>
> logfile /var/log/ntp/ntp.log
>
> So, I did a little digging and found that in:
>
> "refclock_oncore.c"
>
> line: 4061, subroutine: "oncore_log"
>
> has contents:
>
> "syslog(log_level, Msg);"
>
> So it looks like "oncore_log()" is sending
> log messages, unconditionally, to syslog
> even though I specified otherwise.
>
> The fix is simple:
>
> Line 4061 should read: "msyslog(log_level, Msg);"
>
> Then everything works as expected.
>
> Please share your thoughts.
>
> -George Hrysanthopoulos
The simplest solution is to make a one line change in rsyslog.conf to
'up' the level at which things are logged.
The current line reads:
*.info;mail.none;authpriv.none;cron.none /var/log/messages
The new pair of lines read:
*.info;mail.none;authpriv.none;cron.none;daemon.none /var/log/messages
daemon.notice /var/log/messages
If I were doing it again I would have chosen different levels for the
logging in the oncore driver, but this change (above) is simpler than
going in and finding/changing the driver.
--
Reg.Clemens
reg at dwf.com
More information about the hackers
mailing list