From owner-freebsd-stable@FreeBSD.ORG Sun Jul 31 16:51:53 2011 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40DD3106564A for ; Sun, 31 Jul 2011 16:51:53 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (unknown [IPv6:2a03:3100:c:13::5]) by mx1.freebsd.org (Postfix) with ESMTP id 92F118FC0C for ; Sun, 31 Jul 2011 16:51:52 +0000 (UTC) Received: from eg.sd.rdtc.ru (localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.4/8.14.4) with ESMTP id p6VGpj72047974 for ; Sun, 31 Jul 2011 23:51:47 +0700 (NOVST) (envelope-from egrosbein@rdtc.ru) Message-ID: <4E35881C.2010505@rdtc.ru> Date: Sun, 31 Jul 2011 23:51:40 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.9.2.13) Gecko/20110112 Thunderbird/3.1.7 MIME-Version: 1.0 To: stable@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: running newsyslog fiveminly X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 16:51:53 -0000 Hi! Suppose, there is a machine which writes two kinds of log files through syslogd: quickly-growing that need to be rotated based on their size (hourly is too seldom) and other that should be rotated once a day, at midnight only. For first kind of logs we have to run newsyslog once every 5 minutes using cron: */5 * * * * root newsyslog For second kind of logs we have lines in newsyslog.conf such as following: /var/log/mpd.log 640 16 * @T0000 JC This must ensure that /var/log/mpd.log is rotated and compressed at midnigt only. Note, that compressing the file takes 8 minutes. However, every night at 00:05 I get an error: bzip2: I/O or other error, bailing out. Possible reason follows. bzip2: No such file or directory Input file = /var/log/mpd.log.0, output file = /var/log/mpd.log.0.bz2 newsyslog: `bzip2 -f /var/log/mpd.log.0' terminated with a non-zero status (1) It seems, newsyslog still wants to process my file at 00:05 despite @T0000 time specification. Is it broken? Eugene Grosbein