Modifying the priority of a running process (renice)

The renice command is used to change the nice level of an existing process. Its syntax is as follows:

$ renice    -n    <NICELEVEL>   <PID’s>

In the following screenshot, a standard user is trying to increase the priority of a process by assigning a negative value, hence they are getting Permission denied, as shown in the following screenshot:

Now, when a standard user lowers the priority of a process by assigning a positive value, it is set immediately, as shown in the following screenshot:

Apart from the renice command, the top command can also be used to modify the nice value of a running process. The following steps are used to modify a process priority using the top command:

  1. Invoke the top command
  2. Press r key on the keyboard to bring up the option for specifying a new nice value on the top command's current interactive session
  3. Enter the new nice value and PID, followed by pressing the Enter key
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.102.179