[comp.unix.admin] Priority field in /etc/passwd??

gulik@motcid.UUCP (Gregory Gulik) (09/20/90)

I've seen several mentions of an undocemented priority field
in the /etc/passwd in System V.

Does anyone have any information about this?

Thanks.

-greg

-- 
-- 
Gregory A. Gulik
	uunet!motcid!gulik  ||  greg@gagme.chi.il.us
	||  gulik@depaul.edu

cpcahil@virtech.uucp (Conor P. Cahill) (09/20/90)

In article <4670@teal10.UUCP> gulik@motcid.UUCP (Gregory Gulik) writes:
>
>I've seen several mentions of an undocemented priority field
>in the /etc/passwd in System V.
>
>Does anyone have any information about this?

If the GCOS field starts with "pri=number" the login shell is started with
number as it's nice value.  The higher the number the lower the priority
of the process.  You can give a negative number to give the process a 
higher priority.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

dmt@PacBell.COM (Dave Turner) (09/21/90)

In article <4670@teal10.UUCP> gulik@motcid.UUCP (Gregory Gulik) writes:
>I've seen several mentions of an undocemented priority field
>in the /etc/passwd in System V.
>Does anyone have any information about this?

The GCOS (name) field may optionally begin with "pri=" to set a
different nice at login.

To let root login with a nice of zero (highest user priority)
try something like this:

	root:GSDXoZZuPItTc:0:3:pri=-20-Admin(0000):/:/bin/ksh
                               ^^^^^^^



-- 
Dave Turner	415/823-2001	{att,bellcore,sun,ames,decwrl}!pacbell!dmt

jrw@mtune.ATT.COM (Jim Webb) (09/21/90)

In article <4670@teal10.UUCP>, gulik@motcid.UUCP (Gregory Gulik) writes:
> 
> I've seen several mentions of an undocemented priority field
> in the /etc/passwd in System V.

It is documented SOMEWHERE, so I guess I can talk about it without
getting in trouble :-)  Anyway, if you start the 'gecos' comment
field with pri=foo, the nice value will be incremented by foo.

In this example:

	jrw:b1vf-tw-k+mse:198:69:pri=-20*Jim Webb:/f1/jrw:/bin/ksh

the nice priority of my login shell would be set to 0, which is quite,
er, nice.  Since niceness is inherited, all my commands would have this
niceness, too.  Anyway, I am not sure how far into the future or past
this is/was supported, but it is easily tested by using ps -l after
logging in.

Have fun,

-- 
Jim Webb                "Out of Phase -- Get Help"               att!mtune!jrw
                  "I'm bored with this....Let's Dance!"

bill@astph.UUCP (8592x1) (09/21/90)

In article <1990Sep20.112400.20416@virtech.uucp> cpcahil@virtech.UUCP (Conor P. Cahill) writes:
>If the GCOS field starts with "pri=number" the login shell is
>started with number as it's nice value.

I have RTFM and never seen a hint of this! Thanks - this is a
useful feature. Where do you find out these things?

Bill Dripps