LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-29-2006, 07:38 PM   #1
tim24
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Rep: Reputation: 0
display thread number in process


Hi all,
I wonder if there is any tool to display how many threads are currently running in a particular process ?
with kernel 2.4 and 2.6 ?

Thanks
 
Old 03-30-2006, 01:06 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,772

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
Take a look at htop
 
Old 03-31-2006, 12:59 PM   #3
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 542

Rep: Reputation: 33
I have to ask ...what advantage if any does htop have over top? From the screen shot I see less info than I get with top on my Linux servers.

to the original posters if you really want to track processes & the respective threads you can use ps -ef you'll probably want to pipe the output to more (ie: ps -ef | more )
 
Old 04-02-2006, 01:58 AM   #4
tim24
LQ Newbie
 
Registered: Mar 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks...
htop gathers information like top...Actually I ask the question because I have a program that has 3 threads running and on a 2.4 kernel redhat, i see 3 of them displayed as separate processes (when i do ps -ef). But On 2.6 kernel, i only see 1 single.
 
Old 07-07-2006, 12:50 AM   #5
scanner
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Rep: Reputation: 15
Post

Quote:
Originally Posted by tim24
Thanks...
htop gathers information like top...Actually I ask the question because I have a program that has 3 threads running and on a 2.4 kernel redhat, i see 3 of them displayed as separate processes (when i do ps -ef). But On 2.6 kernel, i only see 1 single.
Actually your question should due to Linux version changes. The Linux of previous v2.6(maybe) displays all user processs and threads to ps command while all have same PID. But the Linux of v2.6 just displays parent process.
Any help to you?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what happens if i create a thread and then fork the process? Thinking Programming 7 10-31-2005 02:22 PM
what advantage do kernel thread has over process? keiwu Linux - Newbie 3 03-04-2005 04:04 PM
Multi-Thread/Process Pipes JanusPaul Programming 2 02-27-2005 02:52 PM
Process and thread PIDs msriram_linux Programming 4 11-27-2004 11:43 AM
Controlling process and thread security synna Programming 4 01-27-2004 06:28 AM


All times are GMT -5. The time now is 07:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration