swestrup: (Default)
[personal profile] swestrup
I've got a process that I'd like to monitor that, in debug mode, will issue a semi-infinite list of debug messages to stout.  What I would like to do is have it run in the background and output to some sort of ring-buffer file that only keeps the last 100K or so of output. That way I can occasionally check in on it with a tail -f command without worrying about my hard drive filling with a single huge file.

So, is there such a ring-buffer utility in Linux. I simply assumed that such a thing would exist (after all, dmesg is a ring buffer), but I've not had any luck looking for it. So, does such a file utility exist, or not?

Date: 2009-02-10 03:10 pm (UTC)
ext_290181: (Default)
From: [identity profile] dcoombs.livejournal.com
I'm not aware of one existing... but it would be pretty easy to write a program that reads stdin and keeps the last 1000 lines or so in a file, and then pipe the output of your other program into that.

*shrug*

January 2017

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 13th, 2026 09:06 pm
Powered by Dreamwidth Studios