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?

  • 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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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