sshd + bash nice values
Dan Ritter
dsr at tao.merseine.nu
Wed Feb 7 10:05:17 EST 2007
On Wed, Feb 07, 2007 at 09:50:11AM -0500, Kristian Hermansen wrote:
> Is there a way to easily set the nice value for invoked sshd and bash
> processes automatically on remote login? The problem I am having is
> that vmware-vmx processes run by default with a -10 nice value and my
> sshd/bash processes ru nat default of 0, so it is very difficult to
> remotely administer the machine when you have vmware-vmx processes
> killing your command queue! It's like interacting with a barrel of
> sludge. When I reniced the values manually, everything sped up quite
> *nicely*...heh Any ideas?
In whatever script starts your sshd -- probably /etc/init.d/ssh,
but this can vary -- add a niceness prefix to the start command.
For example, on a Debian box:
/etc/init.d/ssh:
...
echo -n "Starting OpenBSD Secure Shell server: sshd"
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS
echo ".
...
you could change the --exec string to
--exec /usr/bin/nice -12 /usr/sbin/sshd -- $SSHD_OPTS
I haven't tried this, but that's the obvious place to change
such things.
nice values are inherited by child processes.
-dsr-
--
_.. ___ . ... _ .... . _. ... ._ ._. . ._ _.. _.__ ___ .._ ._.
__ ._ .. ._.. ..__.. _ .... . .._. _... .. ..__..
http://tao.merseine.nu/~dsr/eula.html is hereby incorporated by reference.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list