From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1N9wXN-0000PD-Dc for garchives@archives.gentoo.org; Mon, 16 Nov 2009 08:02:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9284E089C for ; Mon, 16 Nov 2009 08:02:12 +0000 (UTC) Received: from mail.caf.com.tr (mail.caf.com.tr [88.250.85.68]) by pigeon.gentoo.org (Postfix) with ESMTP id EAF2FE05BE for ; Mon, 16 Nov 2009 07:05:38 +0000 (UTC) Received: from localhost (sunny.caf.com.tr [127.0.0.1]) by mail.caf.com.tr (Postfix) with ESMTP id 0B85439E36E for ; Mon, 16 Nov 2009 07:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=caf.com.tr; h= content-transfer-encoding:content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=originating; t= 1258355136; bh=pjOQmF04rY0Ib8XHEs0gPQvNGVhpvzJUi0beq4j8bCk=; b=r h+q2b/ZjMv+ewY6JYm82fx1DELcUCZDPg6eWWih+At5/6ebcoiUrxunkn78dhUc8 vlhYEo00pUJIn8DjxCXvcWmWdgY0Fyr0p6Ob7wn/olI0vSaok04oBxUj+r6DSNVB 7OehXilTr4P9xyFzIP9jzE3rfCOqlz4sbZW0ggJlIc= X-Virus-Scanned: amavisd-new at caf.com.tr Received: from mail.caf.com.tr ([127.0.0.1]) by localhost (sunny.caf.com.tr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id j6JNQ9jQ-cNo for ; Mon, 16 Nov 2009 07:05:36 +0000 (UTC) Received: from [10.0.0.14] (unknown [10.0.0.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eray.aslan@zeplin.net) by mail.caf.com.tr (Postfix) with ESMTPSA id 7FB0D39E350 for ; Mon, 16 Nov 2009 07:05:36 +0000 (UTC) Message-ID: <4B00F9AE.8010209@caf.com.tr> Date: Mon, 16 Nov 2009 09:05:18 +0200 From: Eray Aslan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] strange cron messages... References: <4AFEB84B.2010107@gmail.com> <200911141753.24403.wonko@wonkology.org> <200911151145.28867.michaelkintzios@gmail.com> In-Reply-To: <200911151145.28867.michaelkintzios@gmail.com> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: b464b3c5-1a43-43fd-a28e-3fe5c6f407ec X-Archives-Hash: af5b77d27fe40e7097135550d2786585 On 15.11.2009 13:45, Mick wrote: > On Saturday 14 November 2009 16:53:24 Alex Schuster wrote: >> I assume you are using logrotate, and have the /etc/logrotate.d/kernel >> file? I guess the 'compytruncate' is misspelled and should be >> 'copytruncate'. And 'endscript' is used after using 'prerotate' or >> 'postrotate', which you probably do not have. >> >> Something like that, I never used logrotate by myself. See the man page >> for more information. > > Hmm ... how do you keep your log files under control? Use time-based file names. For syslog-ng something like: destination mail { file("/var/log/mail/$YEAR/$MONTH/$DAY/$HOUR" template("$ISODATE $HOST $MSG\n") template_escape(no) owner("root") group("log") perm(0640) dir_owner("root") dir_group("log") dir_perm(02750) create_dirs(yes)); }; destination msgs { file("/var/log/msgs/$YEAR/$MONTH/$DAY/$HOUR" template("$ISODATE $HOST $MSG\n") template_escape(no) owner("root") group("log") perm(0640) dir_owner("root") dir_group("log") dir_perm(02750) create_dirs(yes)); }; source local { unix-dgram("/dev/log"); pipe("/proc/kmsg"); internal(); }; filter mail { facility(mail); }; filter notmail { not facility(mail); }; log { source(local); filter(mail); destination(mail); }; log { source(local); filter(notmail); destination(msgs); }; Important points: - "unix-dgram" is good - Use template() to determine the format - No need to logrotate with time based filenames. Hence, no need to "kill -HUP" the syslog daemon. No missed logs. - Easier to get the log files to a central server with time based filenames. - "log" group is for transfering the log files to a central server -- Eray