isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

renice.html (15414B)


      1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved -->
      2 <!DOCTYPE HTML>
      3 <html lang="en">
      4 <head>
      5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0">
      6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 -->
      8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved -->
      9 <title>renice</title>
     10 </head>
     11 <body bgcolor="white">
     12 <div class="NAVHEADER">
     13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
     14 <tr class="nav">
     15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/realpath.html" accesskey="P">&lt;&lt;&lt;
     16 Previous</a></td>
     17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
     18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/rm.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
     19 </tr>
     20 </table>
     21 <hr align="left" width="100%"></div>
     22 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3">
     23 <center><font size="2">The Open Group Base Specifications Issue 8<br>
     24 IEEE Std 1003.1-2024<br>
     25 Copyright © 2001-2024 The IEEE and The Open Group</font></center>
     26 <hr size="2" noshade>
     27 <a name="top" id="top"></a> <a name="renice" id="renice"></a> <a name="tag_20_103" id="tag_20_103"></a><!-- renice -->
     28 <h4 class="mansect"><a name="tag_20_103_01" id="tag_20_103_01"></a>NAME</h4>
     29 <blockquote>renice — set nice values of running processes</blockquote>
     30 <h4 class="mansect"><a name="tag_20_103_02" id="tag_20_103_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt>renice</tt> <b>[</b><tt>-g|-p|-u</tt><b>]</b> <tt>-n</tt> <i>increment ID</i><tt>...</tt></code></p>
     33 </blockquote>
     34 <h4 class="mansect"><a name="tag_20_103_03" id="tag_20_103_03"></a>DESCRIPTION</h4>
     35 <blockquote>
     36 <p>The <i>renice</i> utility shall request that the nice values (see XBD <a href="../basedefs/V1_chap03.html#tag_03_225"><i>3.225
     37 Nice Value</i></a> ) of one or more running processes be changed. By default, the applicable processes are specified by their
     38 process IDs. When a process group is specified (see <b>-g</b>), the request shall apply to all processes in the process group.</p>
     39 <p>The nice value shall be bounded in an implementation-defined manner. If the requested <i>increment</i> would raise or lower the
     40 nice value of the executed utility beyond implementation-defined limits, then the limit whose value was exceeded shall be used.</p>
     41 <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
     42 the user.</p>
     43 <p>Regardless of which options are supplied or any other factor, <i>renice</i> shall not alter the nice values of any process
     44 unless the user requesting such a change has appropriate privileges to do so for the specified process. If the user lacks
     45 appropriate privileges to perform the requested action, the utility shall return an error status.</p>
     46 <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
     47 determine the user ID of the process in order to determine whether the user has appropriate privileges.</p>
     48 </blockquote>
     49 <h4 class="mansect"><a name="tag_20_103_04" id="tag_20_103_04"></a>OPTIONS</h4>
     50 <blockquote>
     51 <p>The <i>renice</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
     52 Guidelines</i></a> , except for Guideline 9.</p>
     53 <p>The following options shall be supported:</p>
     54 <dl compact>
     55 <dd></dd>
     56 <dt><b>-g</b></dt>
     57 <dd>Interpret the following operands as unsigned decimal integer process group IDs.</dd>
     58 <dt><b>-n&nbsp;</b><i>increment</i></dt>
     59 <dd>Specify how the nice value of the specified process or processes is to be adjusted. The <i>increment</i> option-argument is a
     60 positive or negative decimal integer that shall be used to modify the nice value of the specified process or processes. Negative
     61 <i>increment</i> values may require appropriate privileges.</dd>
     62 <dt><b>-p</b></dt>
     63 <dd>Interpret the following operands as unsigned decimal integer process IDs. The <b>-p</b> option is the default if no options are
     64 specified.</dd>
     65 <dt><b>-u</b></dt>
     66 <dd>Interpret the following operands as users. If a user exists with a user name equal to the operand, then the user ID of that
     67 user is used in further processing. Otherwise, if the operand represents an unsigned decimal integer, it shall be used as the
     68 numeric user ID of the user.</dd>
     69 </dl>
     70 </blockquote>
     71 <h4 class="mansect"><a name="tag_20_103_05" id="tag_20_103_05"></a>OPERANDS</h4>
     72 <blockquote>
     73 <p>The following operands shall be supported:</p>
     74 <dl compact>
     75 <dd></dd>
     76 <dt><i>ID</i></dt>
     77 <dd>A process ID, process group ID, or user name/user ID, depending on the option selected.</dd>
     78 </dl>
     79 </blockquote>
     80 <h4 class="mansect"><a name="tag_20_103_06" id="tag_20_103_06"></a>STDIN</h4>
     81 <blockquote>
     82 <p>Not used.</p>
     83 </blockquote>
     84 <h4 class="mansect"><a name="tag_20_103_07" id="tag_20_103_07"></a>INPUT FILES</h4>
     85 <blockquote>
     86 <p>None.</p>
     87 </blockquote>
     88 <h4 class="mansect"><a name="tag_20_103_08" id="tag_20_103_08"></a>ENVIRONMENT VARIABLES</h4>
     89 <blockquote>
     90 <p>The following environment variables shall affect the execution of <i>renice</i>:</p>
     91 <dl compact>
     92 <dd></dd>
     93 <dt><i>LANG</i></dt>
     94 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
     95 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
     96 variables used to determine the values of locale categories.)</dd>
     97 <dt><i>LC_ALL</i></dt>
     98 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
     99 <dt><i>LC_CTYPE</i></dt>
    100 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
    101 opposed to multi-byte characters in arguments).</dd>
    102 <dt><i>LC_MESSAGES</i></dt>
    103 <dd><br>
    104 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd>
    105 <dt><i>NLSPATH</i></dt>
    106 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    107 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
    108 "0"></dd>
    109 </dl>
    110 </blockquote>
    111 <h4 class="mansect"><a name="tag_20_103_09" id="tag_20_103_09"></a>ASYNCHRONOUS EVENTS</h4>
    112 <blockquote>
    113 <p>Default.</p>
    114 </blockquote>
    115 <h4 class="mansect"><a name="tag_20_103_10" id="tag_20_103_10"></a>STDOUT</h4>
    116 <blockquote>
    117 <p>Not used.</p>
    118 </blockquote>
    119 <h4 class="mansect"><a name="tag_20_103_11" id="tag_20_103_11"></a>STDERR</h4>
    120 <blockquote>
    121 <p>The standard error shall be used only for diagnostic messages.</p>
    122 </blockquote>
    123 <h4 class="mansect"><a name="tag_20_103_12" id="tag_20_103_12"></a>OUTPUT FILES</h4>
    124 <blockquote>
    125 <p>None.</p>
    126 </blockquote>
    127 <h4 class="mansect"><a name="tag_20_103_13" id="tag_20_103_13"></a>EXTENDED DESCRIPTION</h4>
    128 <blockquote>
    129 <p>None.</p>
    130 </blockquote>
    131 <h4 class="mansect"><a name="tag_20_103_14" id="tag_20_103_14"></a>EXIT STATUS</h4>
    132 <blockquote>
    133 <p>The following exit values shall be returned:</p>
    134 <dl compact>
    135 <dd></dd>
    136 <dt>&nbsp;0</dt>
    137 <dd>Successful completion.</dd>
    138 <dt>&gt;0</dt>
    139 <dd>An error occurred.</dd>
    140 </dl>
    141 </blockquote>
    142 <h4 class="mansect"><a name="tag_20_103_15" id="tag_20_103_15"></a>CONSEQUENCES OF ERRORS</h4>
    143 <blockquote>
    144 <p>Default.</p>
    145 </blockquote>
    146 <hr>
    147 <div class="box"><em>The following sections are informative.</em></div>
    148 <h4 class="mansect"><a name="tag_20_103_16" id="tag_20_103_16"></a>APPLICATION USAGE</h4>
    149 <blockquote>
    150 <p>None.</p>
    151 </blockquote>
    152 <h4 class="mansect"><a name="tag_20_103_17" id="tag_20_103_17"></a>EXAMPLES</h4>
    153 <blockquote>
    154 <ol>
    155 <li>
    156 <p>Adjust the nice value so that process IDs 987 and 32 would have a lower nice value:</p>
    157 <pre>
    158 <tt>renice -n 5 -p 987 32
    159 </tt></pre></li>
    160 <li>
    161 <p>Adjust the nice value so that group IDs 324 and 76 would have a higher nice value, if the user has appropriate privileges to do
    162 so:</p>
    163 <pre>
    164 <tt>renice -n -4 -g 324 76
    165 </tt></pre></li>
    166 <li>
    167 <p>Adjust the nice value so that numeric user ID 8 and user <b>sas</b> would have a lower nice value:</p>
    168 <pre>
    169 <tt>renice -n 4 -u 8 sas
    170 </tt></pre></li>
    171 </ol>
    172 <p>Useful nice value increments on historical systems include 19 or 20 (the affected processes run only when nothing else in the
    173 system attempts to run) and any negative number (to make processes run faster).</p>
    174 </blockquote>
    175 <h4 class="mansect"><a name="tag_20_103_18" id="tag_20_103_18"></a>RATIONALE</h4>
    176 <blockquote>
    177 <p>The <i>gid</i>, <i>pid</i>, and <i>user</i> specifications do not fit either the definition of operand or option-argument.
    178 However, for clarity, they have been included in the OPTIONS section, rather than the OPERANDS section.</p>
    179 <p>The definition of nice value is not intended to suggest that all processes in a system have priorities that are comparable.
    180 Scheduling policy extensions such as the realtime priorities in the System Interfaces volume of POSIX.1-2024 make the notion of a
    181 single underlying priority for all scheduling policies problematic. Some implementations may implement the <a href=
    182 "../utilities/nice.html"><i>nice</i></a>-related features to affect all processes on the system, others to affect just the general
    183 time-sharing activities implied by this volume of POSIX.1-2024, and others may have no effect at all. Because of the use of
    184 &quot;implementation-defined&quot; in <a href="../utilities/nice.html"><i>nice</i></a> and <i>renice</i>, a wide range of implementation
    185 strategies are possible.</p>
    186 <p>Originally, this utility was written in the historical manner, using the term &quot;nice value&quot;. This was always a point of concern
    187 with users because it was never intuitively obvious what this meant. With a newer version of <i>renice</i>, which used the term
    188 &quot;system scheduling priority&quot;, it was hoped that novice users could better understand what this utility was meant to do. Also, it
    189 would be easier to document what the utility was meant to do. Unfortunately, the addition of the POSIX realtime scheduling
    190 capabilities introduced the concepts of process and thread scheduling priorities that were totally unaffected by the <a href=
    191 "../utilities/nice.html"><i>nice</i></a>/<a href="../utilities/renice.html"><i>renice</i></a> utilities or the <a href=
    192 "../functions/nice.html"><i>nice</i>()</a>/<a href="../functions/setpriority.html"><i>setpriority</i>()</a> functions. Continuing
    193 to use the term &quot;system scheduling priority&quot; would have incorrectly suggested that these utilities and functions were indeed
    194 affecting these realtime priorities. It was decided to revert to the historical term &quot;nice value&quot; to reference this unrelated
    195 process attribute.</p>
    196 <p>Although this utility has use by system administrators (and in fact appears in the system administration portion of the BSD
    197 documentation), the standard developers considered that it was very useful for individual end users to control their own
    198 processes.</p>
    199 <p>Earlier versions of this standard allowed the following forms in the SYNOPSIS:</p>
    200 <pre>
    201 <tt>renice </tt><i>nice_value</i><b>[</b><tt>-p</tt><b>] </b><i>pid</i><tt>...</tt><b>[</b><tt>-g </tt><i>gid</i><tt>...</tt><b>][</b><tt>-p </tt><i>pid</i><tt>...</tt><b>][</b><tt>-u </tt><i>user</i><tt>...</tt><b>]</b><tt>
    202 renice </tt><i>nice_value -g gid</i><tt>...</tt><b>[</b><tt>-g </tt><i>gid</i><tt>...</tt><b>]</b><tt>-p </tt><i>pid</i><tt>...</tt><b>][</b><tt>-u </tt><i>user</i><tt>...</tt><b>]</b><tt>
    203 renice </tt><i>nice_value -u user</i><tt>...</tt><b>[</b><tt>-g </tt><i>gid</i><tt>...</tt><b>]</b><tt>-p </tt><i>pid</i><tt>...</tt><b>][</b><tt>-u </tt><i>user</i><tt>...</tt><b>]</b><tt>
    204 </tt></pre>
    205 <p>These forms are no longer specified by POSIX.1-2024 but may be present in some implementations.</p>
    206 </blockquote>
    207 <h4 class="mansect"><a name="tag_20_103_19" id="tag_20_103_19"></a>FUTURE DIRECTIONS</h4>
    208 <blockquote>
    209 <p>None.</p>
    210 </blockquote>
    211 <h4 class="mansect"><a name="tag_20_103_20" id="tag_20_103_20"></a>SEE ALSO</h4>
    212 <blockquote>
    213 <p><a href="../utilities/nice.html#tag_20_86"><i>nice</i></a></p>
    214 <p>XBD <a href="../basedefs/V1_chap03.html#tag_03_225"><i>3.225 Nice Value</i></a> , <a href=
    215 "../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2
    216 Utility Syntax Guidelines</i></a></p>
    217 </blockquote>
    218 <h4 class="mansect"><a name="tag_20_103_21" id="tag_20_103_21"></a>CHANGE HISTORY</h4>
    219 <blockquote>
    220 <p>First released in Issue 4.</p>
    221 </blockquote>
    222 <h4 class="mansect"><a name="tag_20_103_22" id="tag_20_103_22"></a>Issue 5</h4>
    223 <blockquote>
    224 <p>In the SYNOPSIS, an ellipsis is added to the <b>-u</b> option in all three obsolescent forms.</p>
    225 </blockquote>
    226 <h4 class="mansect"><a name="tag_20_103_23" id="tag_20_103_23"></a>Issue 6</h4>
    227 <blockquote>
    228 <p>This utility is marked as part of the User Portability Utilities option.</p>
    229 <p>The APPLICATION USAGE section is added.</p>
    230 <p>The obsolescent forms of the SYNOPSIS are removed.</p>
    231 <p>Text previously conditional on POSIX_SAVED_IDS is mandatory in this version. This is a FIPS requirement.</p>
    232 </blockquote>
    233 <h4 class="mansect"><a name="tag_20_103_24" id="tag_20_103_24"></a>Issue 7</h4>
    234 <blockquote>
    235 <p>Austin Group Interpretation 1003.1-2001 #027 is applied, clarifying that Guideline 9 of the Utility Syntax Guidelines does not
    236 apply.</p>
    237 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
    238 <p>The <i>renice</i> utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an
    239 option for interactive utilities.</p>
    240 </blockquote>
    241 <h4 class="mansect"><a name="tag_20_103_25" id="tag_20_103_25"></a>Issue 8</h4>
    242 <blockquote>
    243 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    244 <p>Austin Group Defect 1286 is applied, changing the description of the <b>-n</b> option.</p>
    245 </blockquote>
    246 <div class="box"><em>End of informative text.</em></div>
    247 <hr>
    248 <p>&nbsp;</p>
    249 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    250 <hr size="2" noshade>
    251 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    252 POSIX™ is a Trademark of The IEEE.<br>
    253 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    254 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    255 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    256 ]</font></center>
    257 <hr size="2" noshade>
    258 <div class="NAVHEADER">
    259 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    260 <tr class="nav">
    261 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/realpath.html" accesskey="P">&lt;&lt;&lt;
    262 Previous</a></td>
    263 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    264 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/rm.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    265 </tr>
    266 </table>
    267 <hr align="left" width="100%"></div>
    268 </body>
    269 </html>