Frank Thanks. From your info it sounds like it would make more sense to just replace /etc/logrotate.d/syslog with a modified version *or* /etc/logrotate.d/syslog-ng if that would work. Chris On Thu, Apr 10, 2003 at 01:50:27PM +1000, Frank Crawford wrote:
Chris, First off, this is for Red Hat Linux 8.0, with logrotate 3.6.5, although I'm fairly sure it hasn't changed much for a long, long time.
The logrotate.conf file loads in a bunch of specific config files from the directory /etc/logrotate.d, including one specifically for syslog. The syslog config rotates all the standard log files for Red Hat Linux and then as a postrotate line of:
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
and so just follows the file syslogd.pid.
So, to answer your questions, yes you can modify the syslogd file, but upgrades to logrotate may well put back the original file.
Secondly, putting in a soft link will work, but I've seen some cleanup scripts remove lots of things on boot (e.g. Solaris uses a memfs, so it all goes away anyway), and secondly, unless you remove the symlink file, it will be left pointing to nothing when syslog-ng is shutdown (since I think syslog-ng does remove it's pid file).
Frank
On Thu, 2003-04-10 at 12:35, seberino@spawar.navy.mil wrote:
Frank
So you are saying that logrotate *already* does a HUP but the problem is that it is "HUP-ing" based on /var/run/syslogd.pid???
Is this a new way to not only avoid modifying logrotate but also avoid -p switch!?!?!?!?!.....
I can just make a soft link from /var/run/syslogd.pid to /var/run/syslogd-ng.pid!!!
This is an even neater solution.
Chris
On Thu, Apr 10, 2003 at 11:10:13AM +1000, Frank Crawford wrote:
The standard compile options for syslog-ng put the pid file (which just contains the process ID) into '/var/run/syslogd-ng.pid', but logrotate and related things expect the pid to be in '/var/run/syslogd.pid', which is syslogd's standard location. Aside from the filename, syslogd and syslog-ng act the same on receipt of a SIGHUP (by design), and most apps just pick up the pid from that file.
Frank
On Thu, 2003-04-10 at 09:32, seberino@spawar.navy.mil wrote:
Frank
I like your solution. Can I ask you a question about it?? Why does it work???
Chris
On Tue, Apr 08, 2003 at 11:01:17AM +1000, Frank Crawford wrote:
If you don't wish to modify the logrotate file, the other option is to startup syslog-ng with the '-p' option to name the pid file as syslog would, i.e. "syslog-ng -p /var/run/syslogd.pid".
Frank
On Tue, 2003-04-08 at 10:35, Richard E. Perlotto II wrote:
I had noticed the same thing and with the RPM that I had created for syslog-ng, I modified the logrotate file for the user.
Richard
> -----Original Message----- > From: syslog-ng-admin@lists.balabit.hu > [mailto:syslog-ng-admin@lists.balabit.hu] On Behalf Of > seberino@spawar.navy.mil > Sent: Monday, April 07, 2003 4:52 PM > To: Jacob Steinberger > Cc: syslog-ng@lists.balabit.hu > Subject: Re: [syslog-ng]logrotate question (not working with > syslog-ng)... > > > Thanks!!! > > I did not touch logrotate conf file. I just swapped > syslog with syslog-ng and hoped nothing would break. > > This is a really bad gotcha because I would guess > lotsa of people will make this mistake. > > Is there no way to make syslog-ng NOT require modification > of logrotate? Do most people on this list know that? > I hope so. > > Chris > > > On Mon, Apr 07, 2003 at 06:27:10PM -0400, Jacob Steinberger wrote: > > In your logrotate settings, did you send a restart to > syslog-ng or a > > HUP to it? You need to do one of the two because the INODE > on the file > > changes and syslog-ng isn't built to follow INODEs... > > > > Jacob > > > > > For some reason every time logrotate rotates > /var/log/messages, my > > > syslog-ng stops working. > > > > > > The permissions look ok.. > > > > > > [office root /var/log] # ls -l mess* > > > -rw------- 1 root root 0 Apr 6 04:02 messages > > > -rw------- 1 root root 378135 Apr 7 15:15 messages.1 > > > -rw------- 1 root root 908864 Mar 31 15:50 messages.2 > > > -rw------- 1 root root 1795514 Mar 25 14:06 messages.3 > > > -rw------- 1 root root 945373 Mar 19 11:31 messages.4 > > > -rw------- 1 root root 7 Apr 7 14:24 > messages.offset > > > > > > Why does logrotate cause syslog-ng to not put any new stuff in > > > /var/log/messages? > > > > > > Chris > > > > > > -- > > > _______________________________________ > > > > > > Dr. Christian Seberino > > > SPAWAR Systems Center San Diego > > > Code 2872 > > > 49258 Mills Street, Room 158 > > > San Diego, CA 92152-5385 > > > U.S.A. > > > > > > Phone: (619) 553-9973 > > > Fax: (619) 553-6521 > > > Email: seberino@spawar.navy.mil > > > _______________________________________ > > > _______________________________________________ > > > syslog-ng maillist - syslog-ng@lists.balabit.hu > > > https://lists.balabit.hu/mailman/listinfo/syslog-ng > > > Frequently asked questions at > > > http://www.campin.net/syslog-ng/faq.html > > > > > > > > _______________________________________________ > > syslog-ng maillist - syslog-ng@lists.balabit.hu > > https://lists.balabit.hu/mailman/listinfo/syslog-ng > > Frequently asked questions at > http://www.campin.net/syslog-ng/faq.html > > -- > > _______________________________________ > > Dr. Christian Seberino > SPAWAR Systems Center San Diego > Code 2872 > 49258 Mills Street, Room 158 > San Diego, CA 92152-5385 > U.S.A. > > Phone: (619) 553-9973 > Fax: (619) 553-6521 > Email: seberino@spawar.navy.mil > _______________________________________ > _______________________________________________ > syslog-ng maillist - syslog-ng@lists.balabit.hu > https://lists.balabit.hu/mailman/listinfo/sysl> og-ng > > Frequently asked questions at > http://www.campin.net/syslog-ng/faq.html > > >
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- ac3 Suite G16, Bay 7, Locomotive Workshop Phone: 02 9209 4600 Australian Technology Park Fax: 02 9209 4611 Eveleigh NSW 1430
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- _______________________________________
Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A.
Phone: (619) 553-9973 Fax: (619) 553-6521 Email: seberino@spawar.navy.mil _______________________________________ -- ac3 Suite G16, Bay 7, Locomotive Workshop Phone: 02 9209 4600 Australian Technology Park Fax: 02 9209 4611 Eveleigh NSW 1430
-- _______________________________________
Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A.
Phone: (619) 553-9973 Fax: (619) 553-6521 Email: seberino@spawar.navy.mil _______________________________________ -- ac3 Suite G16, Bay 7, Locomotive Workshop Phone: 02 9209 4600 Australian Technology Park Fax: 02 9209 4611 Eveleigh NSW 1430
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- _______________________________________ Dr. Christian Seberino SPAWAR Systems Center San Diego Code 2872 49258 Mills Street, Room 158 San Diego, CA 92152-5385 U.S.A. Phone: (619) 553-9973 Fax: (619) 553-6521 Email: seberino@spawar.navy.mil _______________________________________