How we can change the priority of a process with top command in linux?
up vote
2
down vote
favorite
I want to change the priority of a process using top command
linux
New contributor
add a comment |
up vote
2
down vote
favorite
I want to change the priority of a process using top command
linux
New contributor
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to change the priority of a process using top command
linux
New contributor
I want to change the priority of a process using top command
linux
linux
New contributor
New contributor
New contributor
asked Nov 28 at 4:38
Muhammad Imran
111
111
New contributor
New contributor
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50
add a comment |
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
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
add a comment |
up vote
1
down vote
In addition to erTugRul’s answer, the renice
command exists for this exact function.
renice -5 -p 1234
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
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
add a comment |
up vote
2
down vote
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
add a comment |
up vote
2
down vote
up vote
2
down vote
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
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
edited Nov 28 at 5:01
answered Nov 28 at 4:48
erTugRul
2329
2329
add a comment |
add a comment |
up vote
1
down vote
In addition to erTugRul’s answer, the renice
command exists for this exact function.
renice -5 -p 1234
add a comment |
up vote
1
down vote
In addition to erTugRul’s answer, the renice
command exists for this exact function.
renice -5 -p 1234
add a comment |
up vote
1
down vote
up vote
1
down vote
In addition to erTugRul’s answer, the renice
command exists for this exact function.
renice -5 -p 1234
In addition to erTugRul’s answer, the renice
command exists for this exact function.
renice -5 -p 1234
answered Nov 28 at 4:49
Peschke
2,195923
2,195923
add a comment |
add a comment |
Muhammad Imran is a new contributor. Be nice, and check out our Code of Conduct.
Muhammad Imran is a new contributor. Be nice, and check out our Code of Conduct.
Muhammad Imran is a new contributor. Be nice, and check out our Code of Conduct.
Muhammad Imran is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f484576%2fhow-we-can-change-the-priority-of-a-process-with-top-command-in-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
perhaps you meant htop? top and htop are two different tools and htop can indeed change priorities
– AnonymousLurker
Nov 28 at 4:50