Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 May 1997 14:28:24 +0000 (GMT)
From:      spork <spork@super-g.com>
To:        Zahemszky Gabor <zgabor@CoDe.hu>
Cc:        iFreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: nice
Message-ID:  <Pine.BSF.3.95q.970530142723.25347A-100000@super-g.inch.com>
In-Reply-To: <199705281425.QAA00376@CoDe.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
It also seems the 2.2 login.conf file could help here; just make a certain
class of users and impose limits there...

Charles

On Wed, 28 May 1997, Zahemszky Gabor wrote:

> > On Tue, 27 May 1997, Wayne Baety wrote:
> > 
> > > 
> > > Is there a way to have all of a users programs automatically run at a
> > > certain nice level?
> > 
> > I havent tried this but maybe you could nice the shell the user is 
> > dropped into at login time by changing his passwd file. ie set his shell 
> > to /usr/bin/nice -5 /usr/bin/sh
> 
> Hm.  Change his/her shell to an executable script, which contains this line.
> In your way, you get: "/usr/bin/nice -5 /usr/bin/sh": no shell - or
> something like this
> But:
> what about this one:
> in /etc/profile (or in /etc/csh.login) make a big case (switch) statement,
> eg:
> case "$LOGNAME" in 	# maybe use "$USER"
> 	user1withLowPrio|user2withLowPrio|...)	# the users, who need lower priority
> 		renice <priority> -p $$
> 		;;
> 	*)	# anybody else
> 		: nothing, only for convenience
> 		;;
> 	esac
> 
> That's it.
> 
> Gabor
> 
> -- 
> #!/bin/ksh
> Z='21N16I25C25E30, 40M30E33E25T15U!' ;IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ ';set $Z;for i { [[ $i = ? ]]&&print $i&&break;[[ $i = ??? ]]&&j=$i&&i=${i%?};typeset -i40 i=8#$i;print -n ${i#???};[[ "$j" = ??? ]]&&print -n "${j#??} "&&j=;typeset +i i;};IFS=' 0123456789 ';set $Z;X=;for i { [[ $i = , ]]&&i=2;[[ $i = ?? ]]||typeset -l i;X="$X $i";typeset +l i;};print "$X"
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970530142723.25347A-100000>