LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-30-2010, 11:08 AM   #1
kauuttt
Member
 
Registered: Dec 2008
Location: Atlanta, GA, USA
Distribution: Ubuntu
Posts: 135

Rep: Reputation: 26
To know process name from thread ID


Hi,

Might be its a silly Q.

I want to know the process name/process ID under which a particular thread is running. I have the thread ID with me.

thanks.
 
Old 08-30-2010, 11:52 AM   #2
quanta
Member
 
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724

Rep: Reputation: 101Reputation: 101
ps -eLf | grep <thread_ID>
 
Old 08-31-2010, 05:14 AM   #3
kauuttt
Member
 
Registered: Dec 2008
Location: Atlanta, GA, USA
Distribution: Ubuntu
Posts: 135

Original Poster
Rep: Reputation: 26
Thanks Quanta.
I know we can get it through the 'ps', but I want a system call to get the PID from TID.

Sorry, for the lack of this info in my original Q.

Anybody any idea?
 
Old 08-31-2010, 05:35 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by kauuttt View Post
I want to know the process name/process ID under which a particular thread is running.
Check this out !
http://www.makelinux.net/alp/032.htm
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What happen if my thread in process crash?? Linux_Kid_ Linux - Software 3 08-20-2009 07:53 AM
Process suicide upon thread death tranzmatt Linux - Software 1 02-12-2009 07:10 PM
Get Process size and Thread count for a particular running process haseit Linux - Newbie 2 01-22-2009 11:09 PM
choice of process vs thread girish_hilage Programming 2 05-11-2007 03:45 AM
Process and thread PIDs msriram_linux Programming 4 11-27-2004 11:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:36 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration