[lug] automatic renice?

Zan Lynx zlynx at acm.org
Fri Jun 17 16:03:36 MDT 2005


On Fri, 2005-06-17 at 16:03 -0600, D. Stimits wrote:
> I have a program (x2x), that when it runs (regardless of what user runs 
> it), I'd like it to automatically renice to -1...but this is a root only 
> command. I don't think there is any automatic way to renice this program 
> any time it is run, I believe sudo and compound commands are probably 
> required. But maybe someone here knows, is there a way to tell the 
> system that no matter who runs x2x, that it should be reniced to -1? Is 
> there any kind of renice daemon facility?
> 
> D. Stimits, stimits AT comcast DOT net

People have written renicer daemons.  It's pretty easy to roll up a
quick script using renice, pgrep and a while/sleep loop.

Or, you could rename x2x to x2x.real and make a shell script called x2x
that does: exec nice --1 x2x.real
-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20050617/6ff35494/attachment.pgp>


More information about the LUG mailing list