2

I want to change the priority of a process using top command

  • perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities – AnonymousLurker Nov 28 '18 at 4:50
2

Once given top command, press r. Give PID value of the process you want to change the process value. Give renice value (from -20 to +19)

Nice value of -20 means highest priority value and +19 means lowest priority value. 0 is by default value.

Don't confuse renice value (-20 to +19) with process value (0 to 39)

relation between nice value and priority is :

PR = NI + 20
| improve this answer | |
1

In addition to erTugRul’s answer, the renice command exists for this exact function.

renice -5 -p 1234
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.