renice command: Change the Priority of a Already Running Process

Q. I’d like alter / change the scheduling priority of running processes. How do I change the Priority of a already running process under CentOS Linux or any UNIX like operating systems?

A. If you run CPU-bond processes you must use nice command used to start process with modified scheduling priority / nicenesses. renice command is used to change the priority of a process that’s already running.

renice command syntax:

The renice command changes the nice value of a process already running. It’s syntax is as follows:
renice {priority} pid
The following will change nice value of process 2243 to 19, enter:
# renice 19 2243
The following will change the priority of process ID’s 1024 and all processes owned by users vivek, enter:
# renice +1 1024 -u vivek
The following will change the priority of process ID’s 1024 and 66, and all processes owned by users daemon and root.
# renice +1 1024 -u daemon root -p 66
Please note that:

  1. Users can only change the nice value of processes which they own.
  2. User cannot start processes with nice values less than 20
  3. User cannot lower the nice values of their processes after they’ve raised them.
  4. As usual root has full access to renice command

For more details and options see renice command man page:
$ man renice

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts