How can I monitor the thread count of a process on linux

0 votes
I would like to monitor the number of threads used by a specific process on Linux. Is there an easy way to get this information without impacting the performance of the process?
Apr 21, 2022 in Linux Administration by Edureka
• 13,690 points
530 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
  1. To add to the above comment. You can use this command to find the number of threads: find /proc/<PID>/task -maxdepth 1 -type d -print | wc -l . Just replace the <PID> with your process ID that you can get from top or using ps
  2. @Navigatron: A simple ls /proc/<PID>/task | wc will do nicely. 
answered Apr 27, 2022 by Edureka
• 13,690 points

edited Mar 5

Related Questions In Linux Administration

0 votes
0 answers

How can I kill a process by name instead of PID, on Linux?

Sometimes when I try to start Firefox ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
573 views
0 votes
0 answers

How can I convert a series of images to a PDF from the command line on linux?

I have a scanning server I wrote ...READ MORE

Apr 21, 2022 in Linux Administration by Edureka
• 13,690 points
823 views
0 votes
0 answers

How can I delete a user in linux when the system says its currently used in a process

I am trying to delete a user ...READ MORE

Apr 26, 2022 in Linux Administration by Edureka
• 13,690 points
609 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to check permissions of a folder in the Linux system?

Hi@akhtar, You can use ls command to check ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,460 points
10,175 views
0 votes
1 answer

How to give the read power of a folder in Linux system?

Hi@akhtar, You can use chmod command in your ...READ MORE

answered Aug 13, 2020 in Linux Administration by MD
• 95,460 points
1,447 views
0 votes
1 answer

How to change the group of a folder in Linux system?

Hi@akhtar, You can use chgrp command in your ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
1,500 views
0 votes
1 answer

How to find the process ID of a program?

Hi@akhtar, You can find one program named pgrep ...READ MORE

answered Oct 12, 2020 in Linux Administration by MD
• 95,460 points
886 views
0 votes
1 answer

How to find Resident Set Size of a process in Linux?

Hi@akhtar, RSS is a memory currently used by ...READ MORE

answered Oct 12, 2020 in Linux Administration by MD
• 95,460 points
2,055 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP