mwette@csi.jpl.nasa.gov (Matt Wette) (06/14/91)
We have users who refuse to run number-crunching programs suitably
"nice"d on our server, often resulting in several users' workstations
being locked up waiting for access.
Is there any way to have the user's login run at a suitable nice value?
I heard that some login's look for a "pri=n" string in the GCOS field.
However, on our Sun (SunOS4.1) this doesn't seem to work (i.e.,
GCOS is :pri=10,Name,office,phone:).
I've even tried to run a C program which nices itself and then execs
/bin/csh ...
#ifndef NICEVAL
#define NICEVAL 10
#endif
main(argc, argv)
int argc;
char *argv[];
{
setpriority(0, getpid(), NICEVAL);
execl("/bin/csh", "-csh", (char *)0);
}
but this doesn't always seem to work (can't remember why). Am I doing
something wrong here?
Matt
frustrated system administrator
--
_________________________________________________________________
Matthew R. Wette | Jet Propulsion Laboratory, 198-326
mwette@csi.jpl.nasa.gov | 4800 Oak Grove Dr, Pasadena,CA 91109
-----------------------------------------------------------------