Date: Tue, 14 Jan 1997 03:07:05 +0100 (MET) From: Mikael Karpberg <karpen@ocean.campus.luth.se> To: brian@awfulhak.demon.co.uk (Brian Somers) Cc: hackers@freebsd.org Subject: Cyclic filesystem (WAS: Re: truss, trace ??) Message-ID: <199701140207.DAA12321@ocean.campus.luth.se> In-Reply-To: <199701140114.BAA11572@awfulhak.demon.co.uk> from Brian Somers at "Jan 14, 97 01:14:49 am"
next in thread | previous in thread | raw e-mail | index | archive | help
According to Brian Somers: > > > On Sun, 12 Jan 1997, Mikael Karpberg wrote: > > > > > Yeah, the cyclic file type is (stupidly) missing from unix. > > > > > > [...] > > > > > > > Or? Am I completely off line here? > > > > > > No you aren't. I was thinking on it for years... but > > > not enough hacking skills to do it actually. > > > > Cyclic file types imply record orientation. > [.....] > > Unless of course you don't mind having a truncated line at the start of > your log ;) > > This (IMHO) would be more "natural", 'cos there shouldn't be any "record" > knowledge at that level. I for one couldn't care less how good the implementation is. I would just like a nice efficient way of making any logfile max out at a certain size, plus minus a little. I think you could just say that when you filled one block (no matter what blocksize you run on the disk) and you need to add a new one to the file, just grab the first block, remove it from the front, clear it, append it to the end and start filling in data. Mininum cyclic filesize, two blocks. Always cut at full blocksizes. No matter what you might think of this, in terms of uggliness of such a hack, I think it would be a really nice extention to the normal file system, if it could be done, or as a new file system which is basically an FFS/UFS (whatever it is we use) with the modification of a file being able to be set cyclic on it. I mean, it's not a completely "clean" way of doing it, but it would suffice to keep log and debug files from filling filesystems, which is enough. If you logfile is about 10MB, do you care if it's 10000000 bytes or 10345620 bytes? Not very often. So... would this be hard to do, if you did it in the not-so-perfect, but easy way I described? /Mikael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701140207.DAA12321>