Retrive processes Ids from a group process on Java application
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   yau_meileng
Posted On:   Thursday, October 30, 2003 06:22 PM

I have written a java program which consist of several explicit defined threads and background threads. I am using JNI to retrive the process id of this java application. It managed to return the process id and the parent process id using getpid() and getppid() respectively. When i use pstree -lp it shows this tree: ---bash(21137)--java(21219)--java(21220)-+-java(21221) +-java(21222) +-java(21223) +-java(21224) +-java(21225) +-java(21226) +-java(21227) +-java(21228) +-java(21229) 21137 is the parent process id and 21219 is the process id.the threads id from 21220 to 21229 are the ids for b   More>>

I have written a java program which consist of several
explicit defined threads and background threads. I am

using JNI to retrive the process id of this java
application. It managed to return the process id and

the parent process id using getpid() and getppid()
respectively. When i use pstree -lp it shows this tree:

			
---bash(21137)--java(21219)--java(21220)-+-java(21221)
+-java(21222)
+-java(21223)
+-java(21224)
+-java(21225)
+-java(21226)
+-java(21227)
+-java(21228)
+-java(21229)


21137 is the parent process id and 21219 is the

process id.the threads id from 21220 to 21229 are the

ids for background threads and explicit defined

threads. So, how can I write a program using JNI to
retrieve those threads Ids? I can only manage to

retrive the processId and parent process Id. Please

help.


Thanx: meileng    <<Less
About | Sitemap | Contact