newsyslog configuration issues

Bill Moran wmoran at
Thu Apr 24 10:43:07 PDT 2003

admin2 wrote:
> FreeBSD 4.7 Stable
> can anybody recommend how to properly configure newsyslog for log files that
> are constantly opened and written.  Some of my log files rotate but the new
> log file can never written to.

This is going to depend on the particular application that's writing to the
logfile.  Here are a few ideas:
1) Many applications need restarted before they'll start writing to the new
    logfile (Apache is an example).  You can store the PID of the program in
    a file and use the "path_to_pid_file" field in newsyslog.conf to have
    newsyslog do this for you.  See the man page.  You generally want to use
    a HUP signal, but check the docs for the application you're using.
2) You might have better success telling the application to log via syslog
    instead of logging itself.  Most applications support this, but you'll
    have to read the docs for the specific app you're using to find out how.
3) Some applications that write logfiles have their own (internal) method
    of rotating the logfiles, which works better than trying to use newsyslog.
    (Samba is an example) See the docs for the application.
4) Let the mailing list know what logfiles are doing this and what apps
    are creating the logfiles and you're likely to get more specific answers.

Bill Moran
Potential Technologies

More information about the freebsd-questions mailing list