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)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2002-03-30 23:40 UTC by Mishka
Modified: 2022-10-17 12:38 UTC (History)
1 user (show)

See Also:


Attachments
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,
Mishka.

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)
How-To-Repeat: 
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 freebsd_triage 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 freebsd_triage 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
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:38:01 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>