From owner-freebsd-arch Fri Nov 2 10: 4:29 2001 Delivered-To: freebsd-arch@freebsd.org Received: from smtp.noos.fr (lafontaine.noos.net [212.198.2.72]) by hub.freebsd.org (Postfix) with ESMTP id 106E837B401 for ; Fri, 2 Nov 2001 10:04:27 -0800 (PST) Received: (qmail 91349285 invoked by uid 0); 2 Nov 2001 18:04:25 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender ) by 212.198.2.72 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 2 Nov 2001 18:04:25 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.6/8.11.6) id fA2I4N697669; Fri, 2 Nov 2001 19:04:23 +0100 (CET) (envelope-from root) Message-Id: <200111021804.fA2I4N697669@gits.dyndns.org> Subject: Re: rotation of lastlog In-Reply-To: <20011102110942.A41614@neutrino.bsdhome.com> To: Brian Dean Date: Fri, 2 Nov 2001 19:04:23 +0100 (CET) Cc: freebsd-arch@freebsd.org Reply-To: clefevre@citeweb.net From: Cyrille Lefevre Organization: ACME X-Face: X-Mailer: ELM [version 2.4ME+ PL95a (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Brian Dean wrote: > > Perhaps this is a dumb question, but is there any reason _not_ to have > /var/log/lastlog be rotated via newsyslog like most other log files? as Jim says, lastlog prabably is a sparse file. so, it don't take so much space on disk. rotating it probably fill up those wholes. so, it will take more space than w/o rotating it except if newsyslog handle well sparse files, but I have a doubt about this since very few commands handle such files right. > I thought that maybe it was omitted because it is composed of fixed > format data structures and rotating it at just the wrong time could > split one of these structures, throwing off alignment. But I see that I think so. > wtmp is rotated by newsyslog, which has the same issue. there is a major difference between lastlog (or utmp) and wtmp, the later can grow indefinitely... > If the above is not a concern or can't happen, or there are no other > concerns, I'd like to add it. Any objections? # cd /var/log # ls -ls lastlog* 24 -rw-rw-r-- 1 root wheel 64568 Nov 2 16:44 lastlog # cp lastlog lastlog.0 # ls -ls lastlog* 24 -rw-rw-r-- 1 root wheel 64568 Nov 2 16:44 lastlog 64 -rw-r--r-- 1 root wheel 64568 Nov 2 19:02 lastlog.0 did that answer your question ? Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message