SUMMARY: niced login

From: Jacques Rall (jacques.rall@za.eds.com)
Date: Wed Feb 26 1997 - 23:31:44 CST


Original question:

Dear SMs,

How can a user's account be niced when he logs in?

I've tried this:

/etc/passwd:
user:x:111:222:Development user:/export/home/user:/usr/bin/nice 10
/usr/bin/ksh

What I hope to achieve with this is that all the development user's
processes (spawned ones as well) run with a lower priority than the
production processes.

Thanks

Answers:

* Change the /etc/passwd file to:

        user:x:111:222:Development user:/export/home/user:/usr/bin/nksh
        
        And create /usr/bin/nksh:
        #!/usr/bin/sh
        
        exec /usr/bin/nice -10 /usr/bin/ksh

* Add nice to either ~/.profile or ~/.login. The problem with this is
that the user can remove this himself.

* Use tcpwarp (suggested by janq@duchess.csufresno.edu)

* Another clever solution is to replace the original compiler program
(cc or cobol) with a script:

        /usr/bin/cc:
        exec /usr/bin/nice -10 /usr/bin/cc.orig

        This way only the processor intensive processes are niced and not
vi's and the like.

Thanks to *



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:47 CDT