RENICE(1)                  POSIX Programmer's Manual                 RENICE(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       renice -- set nice values of running processes

SSYYNNOOPPSSIISS
       renice [[-g|-p|-u]] -n _i_n_c_r_e_m_e_n_t _I_D...

DDEESSCCRRIIPPTTIIOONN
       The _r_e_n_i_c_e utility shall request that the nice values (see the Base
       Definitions volume of POSIX.1-2017, _S_e_c_t_i_o_n _3_._2_4_4, _N_i_c_e _V_a_l_u_e) 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 --gg), the request shall apply to all processes in the
       process group.

       The nice value shall be bounded in an implementation-defined manner.
       If the requested _i_n_c_r_e_m_e_n_t 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.

       When a user is _r_e_n_i_c_ed, the request applies to all processes whose
       saved set-user-ID matches the user ID corresponding to the user.

       Regardless of which options are supplied or any other factor, _r_e_n_i_c_e
       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.

       The saved set-user-ID of the user's process shall be checked instead of
       its effective user ID when _r_e_n_i_c_e attempts to determine the user ID of
       the process in order to determine whether the user has appropriate
       privileges.

OOPPTTIIOONNSS
       The _r_e_n_i_c_e utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, except for
       Guideline 9.

       The following options shall be supported:

       --gg        Interpret the following operands as unsigned decimal integer
                 process group IDs.

       --nn _i_n_c_r_e_m_e_n_t
                 Specify how the nice value of the specified process or
                 processes is to be adjusted. The _i_n_c_r_e_m_e_n_t option-argument is
                 a positive or negative decimal integer that shall be used to
                 modify the nice value of the specified process or processes.

                 Positive _i_n_c_r_e_m_e_n_t values shall cause a lower nice value.
                 Negative _i_n_c_r_e_m_e_n_t values may require appropriate privileges
                 and shall cause a higher nice value.

       --pp        Interpret the following operands as unsigned decimal integer
                 process IDs. The --pp option is the default if no options are
                 specified.

       --uu        Interpret the following 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.

OOPPEERRAANNDDSS
       The following operands shall be supported:

       _I_D        A process ID, process group ID, or user name/user ID,
                 depending on the option selected.

SSTTDDIINN
       Not used.

IINNPPUUTT FFIILLEESS
       None.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of
       _r_e_n_i_c_e:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  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).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       Not used.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

EEXXAAMMPPLLEESS
        1. Adjust the nice value so that process IDs 987 and 32 would have a
           lower nice value:


               renice -n 5 -p 987 32

        2. 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 so:


               renice -n -4 -g 324 76

        3. Adjust the nice value so that numeric user ID 8 and user ssaass would
           have a lower nice value:


               renice -n 4 -u 8 sas

       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).

RRAATTIIOONNAALLEE
       The _g_i_d, _p_i_d, and _u_s_e_r 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.

       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 POSIX.1-2017 make the notion of a single
       underlying priority for all scheduling policies problematic. Some
       implementations may implement the _n_i_c_e-related features to affect all
       processes on the system, others to affect just the general time-sharing
       activities implied by this volume of POSIX.1-2017, and others may have
       no effect at all. Because of the use of ``implementation-defined'' in
       _n_i_c_e and _r_e_n_i_c_e, a wide range of implementation strategies are
       possible.

       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 _r_e_n_i_c_e, 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
       _n_i_c_e/_r_e_n_i_c_e utilities or the _n_i_c_e()/_s_e_t_p_r_i_o_r_i_t_y() 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.

       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.

       Earlier versions of this standard allowed the following forms in the
       SYNOPSIS:


           renice _n_i_c_e___v_a_l_u_e[[-p]] _p_i_d...[[-g _g_i_d...]][[-p _p_i_d...]][[-u _u_s_e_r...]]
           renice _n_i_c_e___v_a_l_u_e _-_g _g_i_d...[[-g _g_i_d...]]-p _p_i_d...]][[-u _u_s_e_r...]]
           renice _n_i_c_e___v_a_l_u_e _-_u _u_s_e_r...[[-g _g_i_d...]]-p _p_i_d...]][[-u _u_s_e_r...]]

       These forms are no longer specified by POSIX.1-2008 but may be present
       in some implementations.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _n_i_c_e

       The Base Definitions volume of POSIX.1-2017, _S_e_c_t_i_o_n _3_._2_4_4, _N_i_c_e _V_a_l_u_e,
       _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x
       _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                            RENICE(1)
