From owner-freebsd-questions Mon Jul 22 7:12:44 2002 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 3BCF837B400 for ; Mon, 22 Jul 2002 07:12:39 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0276343E42 for ; Mon, 22 Jul 2002 07:12:38 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g6MECZQ27006; Mon, 22 Jul 2002 10:12:36 -0400 (EDT) From: Jerry McAllister Message-Id: <200207221412.g6MECZQ27006@clunix.cl.msu.edu> Subject: Re: log files To: grant.cooper@nucleus.com (Grant Cooper) Date: Mon, 22 Jul 2002 10:12:35 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <009901c2312c$b5c6ec70$2afececd@TCOOPER> from "Grant Cooper" at Jul 21, 2002 09:06:00 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I think I made a boo boo. I deleted all the files from var/log thinking I > would have clean logs. Well, I rebooted but some of the files never > reapeared. I made a back up just in case. > > Can I expect any problems in the future? Problems like no logs being writen maybe. Some things take the absense of a log file as a signal to not write log entries. I doubt that anything critical does it that way. > What is the best way to start off with new logs - I'm experimenting with > different things? Thus, trying to get more in touch with my new friend. Some > of the files reappeared. In general is this a good way of starting off from > fresh? What we usually do is: first observe the ownership (UID and GID) and the permissions on the log file. Then mv(1) the file to an alternate name, usually with the date in the name and either touch(1) the file and fix up the owner and permissions or do something like cp(1) /dev/null to the name and fix up owners and permissions. I won't guarantee that will cover all situations, and maybe it is a little crude(??) but it seems to work. We have lots of things that roll over logs using this procedure by age or by size of the log file. We use a cron(8) job to check them periodically. I think some things also have built-in checks for log file size. ////jerry > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message