From owner-freebsd-bugs@FreeBSD.ORG Fri May 2 23:33:28 2003 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2F6637B401; Fri, 2 May 2003 23:33:28 -0700 (PDT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A37443FA3; Fri, 2 May 2003 23:33:28 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.12.9/8.12.9) with ESMTP id h436XPPx017994; Sat, 3 May 2003 02:33:25 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20030502123655.V670@dsl-146-127.resnet.purdue.edu> References: <20030502123655.V670@dsl-146-127.resnet.purdue.edu> Date: Sat, 3 May 2003 02:33:24 -0400 To: Eric Dedrick , freebsd-questions@freebsd.org, freebsd-bugs@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.28 Subject: Re: ac, wtmp, newsyslog X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2003 06:33:29 -0000 At 12:46 PM -0500 5/2/03, Eric Dedrick wrote: >I've currently noticed on my system that logins which straddle >a change in month no longer show up with ac. I haven't looked >at things too closely, but I think it is possible for a user >to remain logged in long enough that they get "forgotten" when >newsyslog rotates wtmp. > >Perhaps wtmp should be rotated by something a little smarter >than newsyslog -- something that will never "forget" about >users with current login sessions? newsyslog is only for rotating files. It has no special knowledge of the contents of the files, and indeed there is no reason it should have. I'm pretty sure the issue comes up any time a person is logged on over the course of a wtmp-rotation. wtmp works by writing a line when you log in, and then updating that line when you log out. If the file is rotated, then there *is* no line to update when you log out. I've heard that there are programs to intelligently-roll a wtmp file, but I've never tracked them down. "We" (freebsd) should probably do something to improve on that for FreeBSD, in our copious spare time... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu