Date: Mon, 1 Jan 2001 10:16:36 +0100 From: Udo Schweigert <ust@cert.siemens.de> To: Jorge Biquez <jbiquez@icsmx.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Newsyslog for rotating APACHE logs Message-ID: <20010101101636.A41890@alaska.cert.siemens.de> 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 References: <5.0.2.1.2.20001231153034.01c780c0@intranet.com.mx>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010101101636.A41890>