Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to lock/reserve memory and cpu priority for ssh/auth and bash operations? Because when server is overflowed i can't connect via ssh, because it's freezes on ssh auth.

Maybe somehow limit maximum allowed overall memory usage and processor power?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You'll find that re-nice'ing the parent sshd process won't help, because it will wind up spawning the child process for your connection with the priority at 0.

What you should look into is adding a command in ~/.ssh/rc. Anything in that file is executed at the login sequence, and hopefully you'll have enough resources to get that far. You can enter something like this:

ps -o pid --no-heading | xargs renice -10 > /dev/null

HTH

-SM

share|improve this answer
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.