Date: Mon, 1 Jan 2001 19:22:25 +1100 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Jorge Biquez <jbiquez@icsmx.com> Cc: questions@FreeBSD.ORG Subject: Re: questions-digest V4 #2171 Message-ID: <Pine.BSF.3.96.1010101184526.5474A-100000@gaia.nimnet.asn.au> In-Reply-To: <bulk.21437.20001231201444@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jorge, > I'm still on the rotation files. I wanted to try newsyslog before going for > the scripts paths since seems could be simpler. Certainly is. > 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. Someone already pointed out your problem with time syntax, and you'd be best off just giving newsyslog a pid and let it do the huppin' for you. These logs aren't Binary, so 'logfile turned over' messages are ok here. We run newsyslog hourly, rotate on filesize, and zip these ones up eventually over much longer time frames, but this works every time: from /etc/crontab: # rotate log files every hour, if necessary 0 * * * * root /usr/sbin/newsyslog from /etc/newsyslog.conf (tabs edited out for message formatting): /var/log/httpd-access.log 640 14 150 * - /var/run/httpd.pid /var/log/httpd-error.log 640 7 30 * - /var/run/httpd.pid # 21Dec98 vhost #1 - nb the owner and perms only affect the archives /var/log/grnwk-access.log root.idix 640 7 150 * - /var/run/httpd.pid /var/log/grnwk-error.log root.idix 640 7 15 * - /var/run/httpd.pid # 21Mar00 vhost #2 /var/log/netau-access.log root.neil 640 7 150 * - /var/run/httpd.pid /var/log/netau-error.log root.neil 640 7 15 * - /var/run/httpd.pid Cheers, Ian 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?Pine.BSF.3.96.1010101184526.5474A-100000>