cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

os:linux:command:nice.html



Linux Commands#System

Linux Command :: nice

man nice

NAME
       nice - run a program with modified scheduling priority

SYNOPSIS
       nice [OPTION] [COMMAND [ARG]...]

DESCRIPTION
       Run COMMAND with an adjusted niceness, which affects process scheduling.  With no COMMAND, print the current niceness.
       Niceness values range from -20 (most favorable to the process) to 19 (least favorable to the process).


A niceness of −20 is the highest priority and 19 is the lowest priority.

nice (Unix)


Example

# nice -n 19 sleep 30
# ps axo pid,comm,nice |grep sleep
25106 sleep             0
25158 sleep            19
#

# renice -n 18  25158
25158 (process ID) old priority 19, new priority 18
#

# ps axo pid,comm,nice |grep sleep
25106 sleep             0
25158 sleep            18
#



os/linux/command/nice.html.txt · Last modified: 2017/05/14 by admin

Page Tools