From owner-freebsd-questions@FreeBSD.ORG Sat Apr 5 18:05:09 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D29237B401 for ; Sat, 5 Apr 2003 18:05:09 -0800 (PST) Received: from mail.netbsd.org (mail.netbsd.org [155.53.1.253]) by mx1.FreeBSD.org (Postfix) with SMTP id EAD9D43F85 for ; Sat, 5 Apr 2003 18:05:08 -0800 (PST) (envelope-from wrstuden@netbsd.org) Received: (qmail 27643 invoked by uid 1130); 6 Apr 2003 02:05:08 -0000 Date: Sat, 5 Apr 2003 18:04:51 -0800 (PST) From: Bill Studenmund X-X-Sender: To: San Diego's BSD Users Group In-Reply-To: <20030405120505.C334-100000@Www.Video2Video.Com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: FreeBSD Questions LIST Subject: Re: [SDBUG] /var/log/wtmp and /var/log/system/log.* X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 02:05:09 -0000 On Sat, 5 Apr 2003, Peter Leftwich wrote: > Apparently there was a power outage in my area of San Diego this morning > sometime between 8:56 AM (the last time that gaim (multi-userID chat > program) logged a sign on or sign off) and 11:25 AM (when I got out of bed). > > I'm wondering why FreeBSD (and in general, all Unix flavors), don't do this: > > * Every minute, on the minute, "touch /var/log/system/log.`date +%m%d%y`" > > That way, whether a user is logged in or not, and a system gets rebooted or > shutdown (hard), the sysadmin can supplement /var/log/wtmp with accurate > information and thus reconstruct what the uptime would have been for that > "power-on session." Can someone comment on what to use for the "at" > command command-line, and whether I'd put this in > /usr/local/etc/rc.d/SOMETHING.sh or where? I think this is an interesting > omission from Unixes in general. What's your opinion? One problem with that is that it would keep your hard disk spun up. If you have power management turned on, that'll kill it. :-) If you want to do that, get a USB memory stick or something like that, and write to it. Oh, a line in cron might be the best. 'at' is great for running one-off things, while cron is better for repeating tasks. Take care, Bill