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.