Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am working on friendly-arm Linux based application, in which only one program is running that is creating many processes and many files are appending with data. One of these processes is PPP. My friendly-arm Linux RAM size is 128MB.

When this 128MB ram is filled then the process PPP is hanging so I want to set as - When ram memory exceeds 127MB then don't write data to files.

How it can be done? Can one give useful information?

share|improve this question
    
Quotas? Limiting the max size of your tmpfs? Having your programs not spew so much junk to logs? Automatically rotating logs? … I'm unsure what you're going for here... –  derobert Mar 8 '13 at 16:41

1 Answer 1

Stopping writing data instead of erasing old data doesn't make sense to me in most situations but if that's really what you want: It's probably not feasible to change all the applications so you should make them (transparently) write to something different from a file (in case the do just append writes like for log files) e.g. a FIFO. All the data can be sent through one process then which counts the amount written and stops writing if the limit is reached (but still reads (and throws away) so that the apps don't block.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.