2

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

1
  • perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities Nov 28, 2018 at 4:50

2 Answers 2

3

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
1

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

renice -5 -p 1234

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .