What is a command to find priority of process in Linux?
Clash Royale CLAN TAG#URR8PPP
up vote
13
down vote
favorite
How can i view the priority of a specific process ?
linux process-management priority
add a comment |Â
up vote
13
down vote
favorite
How can i view the priority of a specific process ?
linux process-management priority
add a comment |Â
up vote
13
down vote
favorite
up vote
13
down vote
favorite
How can i view the priority of a specific process ?
linux process-management priority
How can i view the priority of a specific process ?
linux process-management priority
linux process-management priority
edited Aug 24 '11 at 23:08
Gilles
512k12010151547
512k12010151547
asked Aug 24 '11 at 7:27
Rupesh Pawar
332359
332359
add a comment |Â
add a comment |Â
6 Answers
6
active
oldest
votes
up vote
9
down vote
accepted
The top
command lists the priority of running processes under the PR
heading. If you have it installed, you can also search for a process and sort by priority in htop
.
add a comment |Â
up vote
10
down vote
awk 'print $18' /proc/1337/stat
(gets the prio for process 1337).
Other options:
Use ps -o pri
. Specify the process id with -p 1337
. Or, use -e
to list all processes.
Experiment with this as a starting point if you want more than just the priority:
ps -e -o uid,pid,ppid,pri,ni,cmd
add a comment |Â
up vote
5
down vote
ps
is probably the right way to go. You can then grep and awk your way to the relevant row and column
add a comment |Â
up vote
3
down vote
ps -o ni $(pidof processname)
For example:
ps -o ni $(pidof mysqld)
# ps -o ni $(pidof mysqld)
NI
15
add a comment |Â
up vote
1
down vote
If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information.
cat /proc/PID/stat | awk 'print "priority " $18 " nice " $19'
The values at position 18 and 19 of stat file represent priority and nice
For more: https://linux.die.net/man/5/proc
add a comment |Â
up vote
0
down vote
ps -le | grep 'process name'
ps -lp 'PID of specific process'
add a comment |Â
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
9
down vote
accepted
The top
command lists the priority of running processes under the PR
heading. If you have it installed, you can also search for a process and sort by priority in htop
.
add a comment |Â
up vote
9
down vote
accepted
The top
command lists the priority of running processes under the PR
heading. If you have it installed, you can also search for a process and sort by priority in htop
.
add a comment |Â
up vote
9
down vote
accepted
up vote
9
down vote
accepted
The top
command lists the priority of running processes under the PR
heading. If you have it installed, you can also search for a process and sort by priority in htop
.
The top
command lists the priority of running processes under the PR
heading. If you have it installed, you can also search for a process and sort by priority in htop
.
answered Aug 24 '11 at 7:39
jasonwryan
47.7k14131180
47.7k14131180
add a comment |Â
add a comment |Â
up vote
10
down vote
awk 'print $18' /proc/1337/stat
(gets the prio for process 1337).
Other options:
Use ps -o pri
. Specify the process id with -p 1337
. Or, use -e
to list all processes.
Experiment with this as a starting point if you want more than just the priority:
ps -e -o uid,pid,ppid,pri,ni,cmd
add a comment |Â
up vote
10
down vote
awk 'print $18' /proc/1337/stat
(gets the prio for process 1337).
Other options:
Use ps -o pri
. Specify the process id with -p 1337
. Or, use -e
to list all processes.
Experiment with this as a starting point if you want more than just the priority:
ps -e -o uid,pid,ppid,pri,ni,cmd
add a comment |Â
up vote
10
down vote
up vote
10
down vote
awk 'print $18' /proc/1337/stat
(gets the prio for process 1337).
Other options:
Use ps -o pri
. Specify the process id with -p 1337
. Or, use -e
to list all processes.
Experiment with this as a starting point if you want more than just the priority:
ps -e -o uid,pid,ppid,pri,ni,cmd
awk 'print $18' /proc/1337/stat
(gets the prio for process 1337).
Other options:
Use ps -o pri
. Specify the process id with -p 1337
. Or, use -e
to list all processes.
Experiment with this as a starting point if you want more than just the priority:
ps -e -o uid,pid,ppid,pri,ni,cmd
edited Apr 9 '14 at 7:31
answered Aug 25 '11 at 7:47
MattBianco
2,19231839
2,19231839
add a comment |Â
add a comment |Â
up vote
5
down vote
ps
is probably the right way to go. You can then grep and awk your way to the relevant row and column
add a comment |Â
up vote
5
down vote
ps
is probably the right way to go. You can then grep and awk your way to the relevant row and column
add a comment |Â
up vote
5
down vote
up vote
5
down vote
ps
is probably the right way to go. You can then grep and awk your way to the relevant row and column
ps
is probably the right way to go. You can then grep and awk your way to the relevant row and column
answered Aug 24 '11 at 8:12
Sarah
1512
1512
add a comment |Â
add a comment |Â
up vote
3
down vote
ps -o ni $(pidof processname)
For example:
ps -o ni $(pidof mysqld)
# ps -o ni $(pidof mysqld)
NI
15
add a comment |Â
up vote
3
down vote
ps -o ni $(pidof processname)
For example:
ps -o ni $(pidof mysqld)
# ps -o ni $(pidof mysqld)
NI
15
add a comment |Â
up vote
3
down vote
up vote
3
down vote
ps -o ni $(pidof processname)
For example:
ps -o ni $(pidof mysqld)
# ps -o ni $(pidof mysqld)
NI
15
ps -o ni $(pidof processname)
For example:
ps -o ni $(pidof mysqld)
# ps -o ni $(pidof mysqld)
NI
15
edited Oct 12 '15 at 7:31
answered Oct 11 '15 at 19:59
Paul
36116
36116
add a comment |Â
add a comment |Â
up vote
1
down vote
If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information.
cat /proc/PID/stat | awk 'print "priority " $18 " nice " $19'
The values at position 18 and 19 of stat file represent priority and nice
For more: https://linux.die.net/man/5/proc
add a comment |Â
up vote
1
down vote
If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information.
cat /proc/PID/stat | awk 'print "priority " $18 " nice " $19'
The values at position 18 and 19 of stat file represent priority and nice
For more: https://linux.die.net/man/5/proc
add a comment |Â
up vote
1
down vote
up vote
1
down vote
If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information.
cat /proc/PID/stat | awk 'print "priority " $18 " nice " $19'
The values at position 18 and 19 of stat file represent priority and nice
For more: https://linux.die.net/man/5/proc
If you have a cut-down Linux distribution where ps and top does not give you priority information, you can parse the stat file of proc for your process ID to get the priority information.
cat /proc/PID/stat | awk 'print "priority " $18 " nice " $19'
The values at position 18 and 19 of stat file represent priority and nice
For more: https://linux.die.net/man/5/proc
edited Mar 3 '17 at 2:55
answered Mar 3 '17 at 1:22
Razan Paul
1114
1114
add a comment |Â
add a comment |Â
up vote
0
down vote
ps -le | grep 'process name'
ps -lp 'PID of specific process'
add a comment |Â
up vote
0
down vote
ps -le | grep 'process name'
ps -lp 'PID of specific process'
add a comment |Â
up vote
0
down vote
up vote
0
down vote
ps -le | grep 'process name'
ps -lp 'PID of specific process'
ps -le | grep 'process name'
ps -lp 'PID of specific process'
answered Oct 1 at 5:31
firo
26035
26035
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f19301%2fwhat-is-a-command-to-find-priority-of-process-in-linux%23new-answer', 'question_page');
);
Post as a guest
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
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
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