snippetbashTip
nice — Execute a program with a custom scheduling priority (niceness). Niceness values range from -20 (the
Viewed 0 times
commandniceschedulingexecuteclicustomwithprogram
Problem
How to use the
nice command: Execute a program with a custom scheduling priority (niceness). Niceness values range from -20 (the highest priority) to 19 (the lowest). Note: Some modern schedulers ignore niceness or limit its effects inside autogroups. More information: <https://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html>.Solution
nice — Execute a program with a custom scheduling priority (niceness). Niceness values range from -20 (the highest priority) to 19 (the lowest). Note: Some modern schedulers ignore niceness or limit its effects inside autogroups. More information: <https://www.gnu.org/software/coreutils/manual/html_node/nice-invocation.html>.Print the current niceness value:
niceIncrement the current niceness value by 10:
nice niceLaunch a program with lowered priority:
nice -{{niceness_value}} {{command}}Launch a program with heightened priority:
sudo nice --{{niceness_value}} {{command}}Define the priority with an explicit option:
nice {{[-n|--adjustment]}} {{niceness_value}} {{command}}Code Snippets
Print the current niceness value
niceIncrement the current niceness value by 10
nice niceLaunch a program with lowered priority
nice -{{niceness_value}} {{command}}Launch a program with heightened priority
sudo nice --{{niceness_value}} {{command}}Define the priority with an explicit option
nice {{[-n|--adjustment]}} {{niceness_value}} {{command}}Context
tldr-pages: common/nice
Revisions (0)
No revisions yet.