Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
edwardt opened this issue May 3, 2021 · 1 comment

Comments

@edwardt
Copy link

edwardt commented May 3, 2021

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 edwardt changed the title Is there a way to not let nsjail.log take up all the space? Can we configure the only log most recent X entries in nsjail.log and dsicard the rest? May 4, 2021
@robertswiecki
Copy link
Collaborator

robertswiecki commented May 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants