|Summary:||[patch] [request] Two new features in newsyslog(8)|
|Product:||Base System||Reporter:||Mishka <mishka>|
|Component:||bin||Assignee:||freebsd-bugs (Nobody) <bugs>|
|Severity:||Affects Only Me||CC:||mishka|
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 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 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 = firstname.lastname@example.org Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA
Comment 3 Eitan Adler 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