From owner-freebsd-questions Mon Jan 1 1:16:41 2001 From owner-freebsd-questions@FreeBSD.ORG Mon Jan 1 01:16:39 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id 3B1BD37B400 for ; Mon, 1 Jan 2001 01:16:38 -0800 (PST) X-Envelope-Sender-Is: ust@cert.siemens.de (at relayer david.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.11.0/8.11.0) with ESMTP id f019Gar14276; Mon, 1 Jan 2001 10:16:37 +0100 (MET) Received: from mars.cert.siemens.de (ust.mchp.siemens.de [139.23.201.17]) by mail1.siemens.de (8.11.0/8.11.0) with ESMTP id f019Gaf28803; Mon, 1 Jan 2001 10:16:36 +0100 (MET) Received: from alaska.cert.siemens.de (reims.mchp.siemens.de [139.23.202.134]) by mars.cert.siemens.de (8.11.2/8.11.2/Siemens CERT [ $Revision: 1.8 ]) with ESMTP id f019GaF61016; Mon, 1 Jan 2001 10:16:36 +0100 (CET) Received: (from ust@localhost) by alaska.cert.siemens.de (8.11.2/8.11.2/alaska [ $Revision: 1.4 ]) id f019Ga841984; Mon, 1 Jan 2001 10:16:36 +0100 (CET) Date: Mon, 1 Jan 2001 10:16:36 +0100 From: Udo Schweigert To: Jorge Biquez Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Newsyslog for rotating APACHE logs Message-ID: <20010101101636.A41890@alaska.cert.siemens.de> References: <5.0.2.1.2.20001231153034.01c780c0@intranet.com.mx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.0.2.1.2.20001231153034.01c780c0@intranet.com.mx>; from jbiquez@icsmx.com on Sun, Dec 31, 2000 at 03:38:30PM -0600 X-Operating-System: FreeBSD 4.2-STABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Dec 31, 2000 at 15:38:30 -0600, Jorge Biquez wrote: > Hello all. > > I'm still on the rotation files. I wanted to try newsyslog before going for > the scripts paths since seems could be simpler. > This is what I have on the newsyslog.conf file: > > # logfilename owner.group mode count size time [ZB] > [/pid_file] [sig_num] > /var/log/maillog 664 7 * 24 Z > /var/log/sendmail.st 664 10 * 168 B > /usr/home/sites/logsite01txt 664 9 * 1503 B > > since I wanted that the file rotated at the 15:03 hours. > > On the contrab file I have this: > > # > #minute hour mday month wday who command > 04 15 * * * root newsyslog > 05 15 * * * root killall -HUP httpd > > But it is not working. I checked the permission and that's not the problem. > If 15:00 is also OK for rotating, try this: /usr/home/sites/logsite01txt 664 9 * $D15 B Also: try the solution with the pid file, like someone other already suggested. If you REALLY want to rotate at 15:03, setup a shell script which executes (via crontab at 15:03) the following: /usr/sbin/newsyslog -F -f /some/path where /some/path contains: /usr/home/sites/logsite01txt 664 9 * * B Regards -- Udo Schweigert, Siemens AG | Voice : +49 89 636 42170 ZT IK 3, Siemens CERT | Fax : +49 89 636 41166 D-81730 Muenchen / Germany | email : ust@cert.siemens.de PGP-2/5 fingerprint | D8 A5 DF 34 EC 87 E8 C6 E2 26 C4 D0 EE 80 36 B2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message