Figure out which process forks too many threads
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have a process in a Linux installation that at some point has some kind of spike and passes the max allowed number of threads/processes allowed by the system. I found this by checking ps -elfT | wc -l
repeatedly.
But what I don't know is what exactly is it that causes this spike.
The output of ps -elfT
has a lot of information, but I cannot easily understand if there is some child process that does some kind of "blurp" in forking and makes a mess.
How could I figure that out?
Example: ps -elfT | cut -d' ' -f3 | sort |uniq
gives me the processes running at the time. How could I add a count to see how much each contributes to the total?
process monitoring troubleshooting ulimit
add a comment |Â
up vote
3
down vote
favorite
I have a process in a Linux installation that at some point has some kind of spike and passes the max allowed number of threads/processes allowed by the system. I found this by checking ps -elfT | wc -l
repeatedly.
But what I don't know is what exactly is it that causes this spike.
The output of ps -elfT
has a lot of information, but I cannot easily understand if there is some child process that does some kind of "blurp" in forking and makes a mess.
How could I figure that out?
Example: ps -elfT | cut -d' ' -f3 | sort |uniq
gives me the processes running at the time. How could I add a count to see how much each contributes to the total?
process monitoring troubleshooting ulimit
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have a process in a Linux installation that at some point has some kind of spike and passes the max allowed number of threads/processes allowed by the system. I found this by checking ps -elfT | wc -l
repeatedly.
But what I don't know is what exactly is it that causes this spike.
The output of ps -elfT
has a lot of information, but I cannot easily understand if there is some child process that does some kind of "blurp" in forking and makes a mess.
How could I figure that out?
Example: ps -elfT | cut -d' ' -f3 | sort |uniq
gives me the processes running at the time. How could I add a count to see how much each contributes to the total?
process monitoring troubleshooting ulimit
I have a process in a Linux installation that at some point has some kind of spike and passes the max allowed number of threads/processes allowed by the system. I found this by checking ps -elfT | wc -l
repeatedly.
But what I don't know is what exactly is it that causes this spike.
The output of ps -elfT
has a lot of information, but I cannot easily understand if there is some child process that does some kind of "blurp" in forking and makes a mess.
How could I figure that out?
Example: ps -elfT | cut -d' ' -f3 | sort |uniq
gives me the processes running at the time. How could I add a count to see how much each contributes to the total?
process monitoring troubleshooting ulimit
edited Dec 13 '17 at 20:46
terdonâ¦
122k28230403
122k28230403
asked Dec 13 '17 at 19:54
Jim
39011
39011
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
ps -eo nlwp,pid,args --sort nlwp
Would show a list of processes sorted by their number of threads.
For a top-like view of that, you can always do:
watch -n 1 'ps -eo nlwp,pid,args --sort -nlwp | head'
Or you could use... top
.
- press f to select the fields to display.
- locate
nTH
(the number of threads) and press d to display it and s to make it the sort order - you can adjust its display position with â and then â and â and âÂÂ.
q to get back to the process list- press H if you want to see all the threads.
d to adjust the delay.
? for help.
Would I see for all users? And also would that show also threads like with theT
in the command in my post?
â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
ps -eo nlwp,pid,args --sort nlwp
Would show a list of processes sorted by their number of threads.
For a top-like view of that, you can always do:
watch -n 1 'ps -eo nlwp,pid,args --sort -nlwp | head'
Or you could use... top
.
- press f to select the fields to display.
- locate
nTH
(the number of threads) and press d to display it and s to make it the sort order - you can adjust its display position with â and then â and â and âÂÂ.
q to get back to the process list- press H if you want to see all the threads.
d to adjust the delay.
? for help.
Would I see for all users? And also would that show also threads like with theT
in the command in my post?
â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
add a comment |Â
up vote
4
down vote
accepted
ps -eo nlwp,pid,args --sort nlwp
Would show a list of processes sorted by their number of threads.
For a top-like view of that, you can always do:
watch -n 1 'ps -eo nlwp,pid,args --sort -nlwp | head'
Or you could use... top
.
- press f to select the fields to display.
- locate
nTH
(the number of threads) and press d to display it and s to make it the sort order - you can adjust its display position with â and then â and â and âÂÂ.
q to get back to the process list- press H if you want to see all the threads.
d to adjust the delay.
? for help.
Would I see for all users? And also would that show also threads like with theT
in the command in my post?
â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
ps -eo nlwp,pid,args --sort nlwp
Would show a list of processes sorted by their number of threads.
For a top-like view of that, you can always do:
watch -n 1 'ps -eo nlwp,pid,args --sort -nlwp | head'
Or you could use... top
.
- press f to select the fields to display.
- locate
nTH
(the number of threads) and press d to display it and s to make it the sort order - you can adjust its display position with â and then â and â and âÂÂ.
q to get back to the process list- press H if you want to see all the threads.
d to adjust the delay.
? for help.
ps -eo nlwp,pid,args --sort nlwp
Would show a list of processes sorted by their number of threads.
For a top-like view of that, you can always do:
watch -n 1 'ps -eo nlwp,pid,args --sort -nlwp | head'
Or you could use... top
.
- press f to select the fields to display.
- locate
nTH
(the number of threads) and press d to display it and s to make it the sort order - you can adjust its display position with â and then â and â and âÂÂ.
q to get back to the process list- press H if you want to see all the threads.
d to adjust the delay.
? for help.
edited Dec 14 '17 at 21:38
answered Dec 13 '17 at 20:24
Stéphane Chazelas
282k53520854
282k53520854
Would I see for all users? And also would that show also threads like with theT
in the command in my post?
â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
add a comment |Â
Would I see for all users? And also would that show also threads like with theT
in the command in my post?
â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
Would I see for all users? And also would that show also threads like with the
T
in the command in my post?â Jim
Dec 13 '17 at 20:36
Would I see for all users? And also would that show also threads like with the
T
in the command in my post?â Jim
Dec 13 '17 at 20:36
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
How can I view this information constantly instead of running it constanly? I.e. keep it refreshing like top?
â Jim
Dec 13 '17 at 21:29
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
@Jim, see edit.
â Stéphane Chazelas
Dec 13 '17 at 22:27
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%2f410727%2ffigure-out-which-process-forks-too-many-threads%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