diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-03-16 16:36:07 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2007-03-16 16:36:07 +0000 |
commit | 1ffb1a1d36d92abc99f3f6d00dc1929a5cb3bc07 (patch) | |
tree | 1398ea6c2c3960cdedcd3bbe0bdf2b04706826df /usr.bin/renice | |
parent | 573feba58373fc17d229990857902094c04d6303 (diff) |
make this page more readable;
Diffstat (limited to 'usr.bin/renice')
-rw-r--r-- | usr.bin/renice/renice.8 | 81 | ||||
-rw-r--r-- | usr.bin/renice/renice.c | 6 |
2 files changed, 41 insertions, 46 deletions
diff --git a/usr.bin/renice/renice.8 b/usr.bin/renice/renice.8 index a8d8d4d9456..b1ee8ea4b4e 100644 --- a/usr.bin/renice/renice.8 +++ b/usr.bin/renice/renice.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: renice.8,v 1.14 2003/06/03 02:56:15 millert Exp $ +.\" $OpenBSD: renice.8,v 1.15 2007/03/16 16:36:06 jmc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -39,58 +39,32 @@ .Nm renice .Ar priority .Oo -.Op Fl p -.Ar pid ... -.Oc -.Oo .Op Fl g .Ar pgrp ... .Oc .Oo +.Op Fl p +.Ar pid ... +.Oc +.Oo .Op Fl u .Ar user ... .Oc .Sh DESCRIPTION .Nm alters the scheduling -.Ar priority -(an integer) of one or more running processes. -The following -.Ar who -parameters (pid, pgrp and user) are interpreted as process IDs, process group -IDs, or user names. -.Nm renice Ns ing -a process group causes all processes in the process group -to have their scheduling priority altered. -.Nm renice Ns ing -a user causes all processes owned by the user to have -their scheduling priority altered. -By default, the processes to be affected are specified by -their process IDs. -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl g -Force -.Ar who -parameters to be interpreted as process group IDs. -.It Fl u -Force the -.Ar who -parameters to be interpreted as user names. -.It Fl p -Resets the -.Ar who -interpretation to be (the default) process IDs. -.El -.Pp -For example, -.Bd -literal -offset -# renice +1 987 -u daemon root -p 32 -.Ed -.Pp -would change the priority of process IDs 987 and 32, and -all processes owned by users daemon and root. +.Em priority +of one or more running processes. +Processes may be selected using the parameters +.Ar pid +(process ID), +.Ar pgrp +(process group ID), +and +.Ar user +(user name). +If no flag is specified, +the default is to select by process ID. .Pp Users other than the superuser may only alter the priority of processes they own, @@ -107,6 +81,7 @@ and set the priority to any value in the range (\-20) to .Dv PRIO_MAX . +.Pp Useful priorities are: 20 (the affected processes will run only when nothing else in the system wants to), @@ -114,11 +89,31 @@ in the system wants to), .Dq base scheduling priority), anything negative (to make things go very fast). +.Pp +The options are as follows: +.Bl -tag -width Ds +.It Fl g Ar pgrp +Alter the scheduling priority of all processes in process group +.Ar pgrp . +.It Fl p Ar pid +Alter the scheduling priority of process +.Ar pid . +.It Fl u Ar user +Alter the scheduling priority of all processes belonging to user +.Ar user . +.El .Sh FILES .Bl -tag -width /etc/passwd -compact .It Pa /etc/passwd for mapping user names to user IDs .El +.Sh EXAMPLES +The following example +changes the priority of process IDs 987 and 32, +and all processes owned by users daemon and root: +.Bd -literal -offset indent +# renice +1 987 -u daemon root -p 32 +.Ed .Sh SEE ALSO .Xr nice 1 , .Xr getpriority 2 , diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index 755a776b19e..686ad4a448a 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -1,4 +1,4 @@ -/* $OpenBSD: renice.c,v 1.11 2003/07/10 00:06:51 david Exp $ */ +/* $OpenBSD: renice.c,v 1.12 2007/03/16 16:36:06 jmc Exp $ */ /* * Copyright (c) 1983, 1989, 1993 @@ -39,7 +39,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)renice.c 8.1 (Berkeley) 6/9/93"; #else -static char rcsid[] = "$OpenBSD: renice.c,v 1.11 2003/07/10 00:06:51 david Exp $"; +static char rcsid[] = "$OpenBSD: renice.c,v 1.12 2007/03/16 16:36:06 jmc Exp $"; #endif #endif /* not lint */ @@ -138,7 +138,7 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s priority [[-p] pid ...] [[-g] pgrp ...] " + fprintf(stderr, "usage: %s priority [[-g] pgrp ...] [[-p] pid ...] " "[[-u] user ...]\n", __progname); exit(1); } |