add directory study
This commit is contained in:
327
study/Ref-docs/POSIX/susv3/utilities/renice.html
Normal file
327
study/Ref-docs/POSIX/susv3/utilities/renice.html
Normal file
@@ -0,0 +1,327 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
||||
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
||||
<title>renice</title>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
||||
</script>
|
||||
|
||||
<basefont size="3"> <a name="renice"></a> <a name="tag_04_119"></a><!-- renice -->
|
||||
<!--header start-->
|
||||
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
||||
IEEE Std 1003.1-2001<br>
|
||||
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
||||
|
||||
<!--header end-->
|
||||
<hr size="2" noshade>
|
||||
<h4><a name="tag_04_119_01"></a>NAME</h4>
|
||||
|
||||
<blockquote>renice - set nice values of running processes</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_02"></a>SYNOPSIS</h4>
|
||||
|
||||
<blockquote class="synopsis">
|
||||
<div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt=
|
||||
"[Option Start]" border="0"> renice -n</tt> <i>increment</i> <b>[</b><tt>-g | -p | -u</tt><b>]</b> <i>ID</i> <tt>... <img src=
|
||||
"../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_03"></a>DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>renice</i> utility shall request that the nice values (see the Base Definitions volume of IEEE Std 1003.1-2001,
|
||||
<a href="../basedefs/xbd_chap03.html#tag_03_239">Section 3.239, Nice Value</a>) of one or more running processes be changed. By
|
||||
default, the applicable processes are specified by their process IDs. When a process group is specified (see <b>-g</b>), the
|
||||
request shall apply to all processes in the process group.</p>
|
||||
|
||||
<p>The nice value shall be bounded in an implementation-defined manner. If the requested <i>increment</i> would raise or lower the
|
||||
nice value of the executed utility beyond implementation-defined limits, then the limit whose value was exceeded shall be used.</p>
|
||||
|
||||
<p>When a user is <i>renice</i>d, the request applies to all processes whose saved set-user-ID matches the user ID corresponding to
|
||||
the user.</p>
|
||||
|
||||
<p>Regardless of which options are supplied or any other factor, <i>renice</i> shall not alter the nice values of any process
|
||||
unless the user requesting such a change has appropriate privileges to do so for the specified process. If the user lacks
|
||||
appropriate privileges to perform the requested action, the utility shall return an error status.</p>
|
||||
|
||||
<p>The saved set-user-ID of the user's process shall be checked instead of its effective user ID when <i>renice</i> attempts to
|
||||
determine the user ID of the process in order to determine whether the user has appropriate privileges.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_04"></a>OPTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>renice</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
||||
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
|
||||
|
||||
<p>The following options shall be supported:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><b>-g</b></dt>
|
||||
|
||||
<dd>Interpret all operands as unsigned decimal integer process group IDs.</dd>
|
||||
|
||||
<dt><b>-n </b> <i>increment</i></dt>
|
||||
|
||||
<dd>Specify how the nice value of the specified process or processes is to be adjusted. The <i>increment</i> option-argument is a
|
||||
positive or negative decimal integer that shall be used to modify the nice value of the specified process or processes.
|
||||
|
||||
<p>Positive <i>increment</i> values shall cause a lower nice value. Negative <i>increment</i> values may require appropriate
|
||||
privileges and shall cause a higher nice value.</p>
|
||||
</dd>
|
||||
|
||||
<dt><b>-p</b></dt>
|
||||
|
||||
<dd>Interpret all operands as unsigned decimal integer process IDs. The <b>-p</b> option is the default if no options are
|
||||
specified.</dd>
|
||||
|
||||
<dt><b>-u</b></dt>
|
||||
|
||||
<dd>Interpret all operands as users. If a user exists with a user name equal to the operand, then the user ID of that user is used
|
||||
in further processing. Otherwise, if the operand represents an unsigned decimal integer, it shall be used as the numeric user ID of
|
||||
the user.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_05"></a>OPERANDS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The following operands shall be supported:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><i>ID</i></dt>
|
||||
|
||||
<dd>A process ID, process group ID, or user name/user ID, depending on the option selected.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_06"></a>STDIN</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Not used.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_07"></a>INPUT FILES</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_08"></a>ENVIRONMENT VARIABLES</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The following environment variables shall affect the execution of <i>renice</i>:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt><i>LANG</i></dt>
|
||||
|
||||
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
||||
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
||||
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
||||
|
||||
<dt><i>LC_ALL</i></dt>
|
||||
|
||||
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
||||
|
||||
<dt><i>LC_CTYPE</i></dt>
|
||||
|
||||
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
||||
opposed to multi-byte characters in arguments).</dd>
|
||||
|
||||
<dt><i>LC_MESSAGES</i></dt>
|
||||
|
||||
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
||||
error.</dd>
|
||||
|
||||
<dt><i>NLSPATH</i></dt>
|
||||
|
||||
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
||||
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
|
||||
"[Option End]" border="0"></dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_09"></a>ASYNCHRONOUS EVENTS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Default.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_10"></a>STDOUT</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Not used.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_11"></a>STDERR</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The standard error shall be used only for diagnostic messages.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_12"></a>OUTPUT FILES</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_13"></a>EXTENDED DESCRIPTION</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_14"></a>EXIT STATUS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The following exit values shall be returned:</p>
|
||||
|
||||
<dl compact>
|
||||
<dt> 0</dt>
|
||||
|
||||
<dd>Successful completion.</dd>
|
||||
|
||||
<dt>>0</dt>
|
||||
|
||||
<dd>An error occurred.</dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_15"></a>CONSEQUENCES OF ERRORS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>Default.</p>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
<div class="box"><em>The following sections are informative.</em></div>
|
||||
|
||||
<h4><a name="tag_04_119_16"></a>APPLICATION USAGE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_17"></a>EXAMPLES</h4>
|
||||
|
||||
<blockquote>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Adjust the nice value so that process IDs 987 and 32 would have a lower nice value:</p>
|
||||
|
||||
<pre>
|
||||
<tt>renice -n 5 -p 987 32
|
||||
</tt>
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>Adjust the nice value so that group IDs 324 and 76 would have a higher nice value, if the user has the appropriate privileges to
|
||||
do so:</p>
|
||||
|
||||
<pre>
|
||||
<tt>renice -n -4 -g 324 76
|
||||
</tt>
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<p>Adjust the nice value so that numeric user ID 8 and user <b>sas</b> would have a lower nice value:</p>
|
||||
|
||||
<pre>
|
||||
<tt>renice -n 4 -u 8 sas
|
||||
</tt>
|
||||
</pre>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>Useful nice value increments on historical systems include 19 or 20 (the affected processes run only when nothing else in the
|
||||
system attempts to run) and any negative number (to make processes run faster).</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_18"></a>RATIONALE</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>The <i>gid</i>, <i>pid</i>, and <i>user</i> specifications do not fit either the definition of operand or option-argument.
|
||||
However, for clarity, they have been included in the OPTIONS section, rather than the OPERANDS section.</p>
|
||||
|
||||
<p>The definition of nice value is not intended to suggest that all processes in a system have priorities that are comparable.
|
||||
Scheduling policy extensions such as the realtime priorities in the System Interfaces volume of IEEE Std 1003.1-2001 make
|
||||
the notion of a single underlying priority for all scheduling policies problematic. Some implementations may implement the <a href=
|
||||
"../utilities/nice.html"><i>nice</i></a>-related features to affect all processes on the system, others to affect just the general
|
||||
time-sharing activities implied by this volume of IEEE Std 1003.1-2001, and others may have no effect at all. Because of
|
||||
the use of "implementation-defined" in <a href="../utilities/nice.html"><i>nice</i></a> and <i>renice</i>, a wide range of
|
||||
implementation strategies are possible.</p>
|
||||
|
||||
<p>Originally, this utility was written in the historical manner, using the term "nice value". This was always a point of concern
|
||||
with users because it was never intuitively obvious what this meant. With a newer version of <i>renice</i>, which used the term
|
||||
"system scheduling priority", it was hoped that novice users could better understand what this utility was meant to do. Also, it
|
||||
would be easier to document what the utility was meant to do. Unfortunately, the addition of the POSIX realtime scheduling
|
||||
capabilities introduced the concepts of process and thread scheduling priorities that were totally unaffected by the <a href=
|
||||
"../utilities/nice.html"><i>nice</i></a>/ <i>renice</i> utilities or the <a href="../functions/nice.html"><i>nice</i>()</a>/ <a
|
||||
href="../functions/setpriority.html"><i>setpriority</i>()</a> functions. Continuing to use the term "system scheduling priority''
|
||||
would have incorrectly suggested that these utilities and functions were indeed affecting these realtime priorities. It was decided
|
||||
to revert to the historical term "nice value" to reference this unrelated process attribute.</p>
|
||||
|
||||
<p>Although this utility has use by system administrators (and in fact appears in the system administration portion of the BSD
|
||||
documentation), the standard developers considered that it was very useful for individual end users to control their own
|
||||
processes.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_19"></a>FUTURE DIRECTIONS</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>None.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_20"></a>SEE ALSO</h4>
|
||||
|
||||
<blockquote>
|
||||
<p><a href="nice.html"><i>nice</i>()</a></p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_21"></a>CHANGE HISTORY</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>First released in Issue 4.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_22"></a>Issue 5</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>In the SYNOPSIS, an ellipsis is added to the <b>-u</b> option in all three obsolescent forms.</p>
|
||||
</blockquote>
|
||||
|
||||
<h4><a name="tag_04_119_23"></a>Issue 6</h4>
|
||||
|
||||
<blockquote>
|
||||
<p>This utility is marked as part of the User Portability Utilities option.</p>
|
||||
|
||||
<p>The APPLICATION USAGE section is added.</p>
|
||||
|
||||
<p>The obsolescent forms of the SYNOPSIS are removed.</p>
|
||||
|
||||
<p>Text previously conditional on POSIX_SAVED_IDS is mandatory in this issue. This is a FIPS requirement.</p>
|
||||
</blockquote>
|
||||
|
||||
<div class="box"><em>End of informative text.</em></div>
|
||||
|
||||
<hr>
|
||||
<hr size="2" noshade>
|
||||
<center><font size="2"><!--footer start-->
|
||||
UNIX ® is a registered Trademark of The Open Group.<br>
|
||||
POSIX ® is a registered Trademark of The IEEE.<br>
|
||||
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
||||
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
||||
]</font></center>
|
||||
|
||||
<!--footer end-->
|
||||
<hr size="2" noshade>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user