Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2003 20:45:56 -0700 (PDT)
From:      Thomas McIntyre <temac@yahoo.com>
To:        octavian@hacknslash.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: automatically using "nice"
Message-ID:  <20030702034556.26288.qmail@web14205.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Simon Barner wrote:
> You could either modify your scripts to use nice, or start a new
> shell with an appropriate nice level. All the processes you launch
> from that shell will inherit the nice level of that shell:

A user can also be niced by login classes:

    gccuser:*:1000:0:interactive:::gccuser:/home/gccusr:/bin/csh

with /etc/login.conf (less /etc/login.conf, man login.conf, man 5
passwd, /handbook/users-limiting.html):

interactive:\
        :priority=20:\
        :tc=default:

To renice interactively, you can su - gccuser, do so manually, or
spawn/exec the current login shell:

    exec bash --login

with ~/.bash_login:

    renice 20 $$
    export PS1="[\u@\h:\j:\w]\$ "

But be sure not to nice background processes -- it might break the
warrantee....

Regards,
Tom McIntyre


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030702034556.26288.qmail>