bug-hurd
[Top][All Lists]
Advanced

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

rollover translator


From: Alfred M. Szmidt
Subject: rollover translator
Date: Sun, 31 Oct 2004 01:45:49 +0200

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...




reply via email to

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