Dan Jacobson <[EMAIL PROTECTED]> wrote:
> $ info nice does not get one info about nice(1), instead it is some C thing.
Thanks for mentioning that.
The same thing happens for a few others, like rename and stat.
FWIW, as of coreutils-5.1.2, the automatically-generated man pages
refer people to
info coreutils nice
which does do what we want.
> $ man nice
> Run COMMAND with an adjusted scheduling priority. With no COMMAND, print the
> current
> scheduling priority. ADJUST is 10 by default. Range goes from -20 (highest
> prior-
> ity) to 19 (lowest).
>
> -n, --adjustment=ADJUST
> increment priority by ADJUST first
>
> Well, maybe I know what you are trying to say, but maybe add examples:
> A practical one, and these:
> $ nice
> 0
> $ nice nice
> 10
> $ nice -n 10 nice #default
> 10
> $ nice -n 30 nice #hits max
> 19
> $ nice -n -22 nice #only root can
> nice: cannot set priority: Permission denied
Thanks.
I've made this change:
Index: coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.152
diff -u -p -u -p -r1.152 coreutils.texi
--- coreutils.texi 27 Jan 2004 12:53:24 -0000 1.152
+++ coreutils.texi 2 Feb 2004 13:18:31 -0000
@@ -11669,6 +11669,53 @@ Exit status:
the exit status of @var{command} otherwise
@end display
+It is sometimes useful to run non-interactive programs with reduced priority.
+
[EMAIL PROTECTED]
+$ nice factor `echo '2^997 - 1'|bc`
[EMAIL PROTECTED] example
+
+Since @command{nice} prints the current priority,
+we can invoke it through itself to demonstrate how it works:
+
+The default behavior is to reduce priority by @samp{10}.
+
[EMAIL PROTECTED]
+$ nice nice
+10
[EMAIL PROTECTED] example
+
[EMAIL PROTECTED]
+$ nice -n 10 nice
+10
[EMAIL PROTECTED] example
+
+The @var{adjustment} is relative to the current priority.
+Here, the first @command{nice} invocation runs the second one at priority
[EMAIL PROTECTED], and it in turn runs the final one at a priority lowered by
[EMAIL PROTECTED] more.
+
[EMAIL PROTECTED]
+$ nice nice -n 3 nice
+13
[EMAIL PROTECTED] example
+
+Specifying a priority larger than @samp{19} is the same as specifying @samp{19}.
+
[EMAIL PROTECTED]
+$ nice -n 30 nice
+19
[EMAIL PROTECTED] example
+
+Only a privileged user may run a process with higher priority.
+
[EMAIL PROTECTED]
+$ nice -n -1 nice
+nice: cannot set priority: Permission denied
+$ sudo nice -n -1 nice
+-1
[EMAIL PROTECTED] example
+
@node nohup invocation
@section @command{nohup}: Run a command immune to hangups
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils