Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 1997 22:34:29 +0100 (MET)
From:      Mikael Karpberg <karpen@ocean.campus.luth.se>
To:        proff@suburbia.net
Cc:        hackers@freebsd.org
Subject:   Re: truss, trace ??
Message-ID:  <199701122134.WAA09381@ocean.campus.luth.se>
In-Reply-To: <19961208140451.3454.qmail@suburbia.net> from "proff@suburbia.net" at "Dec 9, 96 01:04:51 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

I know this thread is really old, but I didn't get around to reading it
until just now.

According to proff@suburbia.net:
[ .. About ktrace with output to stdout .. ]
> > > ktrace ./foo & kdump -l
> > 
> > and make sure you don't fill your filesystem....
> > 
> > Darren
> 
> Yeah, the cyclic file type is (stupidly) missing from unix.

Yeah! It would be GREAT for logs.. Just give the file a size, and then 
mark it cyclic, for example, would be an easy implementation, no?
User interface wise at least. Something like:

mkfile 3000 the.log    # Create a file with a size
chmod u+c the.log      # Make it cyclic. It will never grow

I mean... I don't know if I've got it all wrong, but isn't a file in the
filesystem like a linked list of blocks? If so, then it seems trivial to
free the first block and add a new at the end, when you append something
to a file.

Or? Am I completely off line here?  I think that for logs, at least debug
logs, you often get a lot of information, but it's only interesting a
certain while. When you forget to rotate the file, or can't because some
daemon has the file open constantly, or you get abnormally high load on
the daemon, so you get more logged then normal, then suddenly you stand there
with a full filesystem. A cyclic filetype would be great!

   /Mikael




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701122134.WAA09381>