[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rollover translator

From: James A. Morrison
Subject: Re: rollover translator
Date: 31 Oct 2004 01:26:31 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

"Alfred M. Szmidt" <ams@kemisten.nu> writes:

> Hey,
> I got this funky idea today, but I'm not sure what would be the best
> way to implement it.  What it would essentially do is provide a
> "circular file", so when you get to the end of the file you start from
> position 0.  With the nice option that if you do roll over, you can
> clear the all stored contents and re-start with a "blank file".
> This is very useful for if you are dumping lots of log info and you
> are only interested in the last few billion lines.
> Anyway, what I'm unsure of is how you should set the actual
> translator, one way which should be trivial to do is to make it act
> like a "link".  So you would do
> settrans -ac /log /hurd/rollover 100M /real-log
> And if you write more then 100M to /log, it would start from position
> 0.  That way anything beyond 100M in /real-log would be intact.
> Another way would be just to skip the whole /real-log story, and all
> read/writes would happend to the underlying node.
> Well, thats all folks...

 I sort of like this idea.  It's similar to the problem I wanted to solve with
the multiple firmlink hack I rigged up a while ago.  Unfortunatly, I'm having
trouble thinking off an easy way to do the what I want, i.e. I want to specify
a translator the way you say above an always have the last 100M of log
messages.  So, the point of my incorherence is that instead of the file
rolling over, I just want the file to discard anything but that last X bytes
put into the file and never lose the last X bytes put into the file.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]