Bug 36553 - [patch] [request] Two new features in newsyslog(8)
Summary: [patch] [request] Two new features in newsyslog(8)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.5-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2002-03-30 23:40 UTC by Mishka
Modified: 2017-12-31 22:37 UTC (History)
1 user (show)

See Also:

file.diff (3.29 KB, patch)
2002-03-30 23:40 UTC, Mishka
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mishka 2002-03-30 23:40:01 UTC
Dear Sirs!

I am very happy with FreeBSD built-in utilities. Such, in most cases i needn't
any other software to solve my problems and task. Hovewer, there is posted some
useful changes to newsyslog(8):
1. When time="*" and size="*" now it means that newsyslog must rotate log file
   with any size and at any time, when started. Early it just skip such logs.
   I think, if we always want to skip some logfiles, we can comment it out or
   just remove.
2. After all, newsyslog always tries to sent some signal (HUP by default) to
   some process (syslogd(8) by default) which can be not wanted sometimes. Now
   if path_to_pid_file="-" the newsyslog will not sent any signal to any
   process for this records.

Few examples:
/var/log/squid/access.log	644  31  *     *     -  -
/var/log/apache/access.log	644   3  8192  *     Z  -
/var/log/maillog		644   7  *     @T00  Z

I take a look to ports collection before, but have not find any with such
features, when my rotation scheme want to have such ones.

For apply my changes please use patch provided. If you find my changes useful
please inform me how can i fix it (move to ports collection or other way).

Best regards,

Fix: Please use following patch:

Note: This patchfile should be placed into /usr/src/usr.sbin directory.
(cd /usr/sys/usr.sbin ; patch < newsyslog.patch)
1. You can change time and size fields to asterisk (*) and see newer turned
   over logfiles.
2. You can't avoid sending signal. If you ignore path_to_pid_file field the
   newsyslog will sent SIGHUP to syslogd(8). Moreover, this field must be
   started with slash "/" character, so should be path to some pid-file.
Comment 1 Garance A Drosehn freebsd_committer 2003-02-22 02:08:15 UTC
Responsible Changed
From-To: freebsd-bugs->gad

.    I will be looking into these changes while working on some other 
changes to newsyslog.  I definitely want to provide some way to say 
"do not signal any process when rotating this file".  I don't quite 
understand your other change, but I will also look into it.
Comment 2 Garance A Drosehn freebsd_committer 2003-03-03 03:27:25 UTC
I have committed a change to newsyslog in freebsd-current
which adds the 'N' flag for config file entries.  If you
specify the 'N' flag, it will not signal any processes.
I did it this way to match an option that NetBSD has.

I also understand what you meant in the first part of your PR.
I have not committed any changes for that yet, but I will.

Garance Alistair Drosehn     =      gad@gilead.netel.rpi.edu
Senior Systems Programmer               or   gad@FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:31 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped