nsjail icon indicating copy to clipboard operation
nsjail copied to clipboard

Can we configure the only log most recent X entries in nsjail.log and dsicard the rest?

Open edwardt opened this issue 3 years ago • 1 comments

I am not sure fi there is a setting that let nsjail to limit or just retain the most recent entries of nsjail logs and recycle the older data. It can eat up all the space.

edwardt avatar May 03 '21 23:05 edwardt

You can maybe configure some tmpfs on your FS with a given size "mount -t tmpfs none /logs -o size=1024000', but doing a proper recycling of logs would require some additional code in nsjail.

As in, there's no easy OS primitive to achieve that, except maybe using RLIMIT_FSIZE but this would have side-effectts. And this would be no better than a tmpfs limited in size.

So, if anything, we'd need to implement a non-trivial code to do that. I'll give it a though, but it won't be high on our list of priorities.

robertswiecki avatar May 05 '21 11:05 robertswiecki