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'm trying to analyze an issue with a remote server that is running out of available memory.

I have no idea when it happens, but when it does, I'm unable to SSH into the machine. I can only remotely reboot it and then log in.

So, I had the idea of simply staying logged in until the problem happens. That way I could analyze the situation. But once there is no more available memory, I'm not gonna have a great time debugging the problem.

So, is there a way to reserve memory for processes which are spawned by myself?
Not programmatically if possible.

share|improve this question
add comment

migrated from superuser.com Jul 19 '12 at 20:25

This question came from our site for computer enthusiasts and power users.

1 Answer

From what your saying, if you reserve the memory it still won't be available for your debugging tool.

Have you considered writing detailing logs to file?

Include as much info on each process as you need and run the command every few minutes. You could do this with cron.

After the next reboot you simply examine the logs.

Here is some info on how to check what process are using your memory.

share|improve this answer
    
Yes, I thought about that. And I will resort to doing that if my idea remains fruitless. I don't even want to run major debugging tools. But when no RAM is available, even cat can be problematic, I guess. –  Oliver Salzburg Apr 23 '12 at 21:08
    
The only tool I can think of that really grabs and holds enough memory to perform many tasks is a Virtual Machine host like VirtuaBox. It's not much use in your scenario. –  bryan Apr 23 '12 at 21:13
add comment

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.