Subj : Re: how to know what 'fork()'ed and/or threads are running for a process To : comp.os.linux,comp.os.linux.misc From : Juhan Leemet Date : Fri Jul 30 2004 06:13 pm On Fri, 30 Jul 2004 10:30:32 +1000, Steve wrote: > I have a process running on a dual processor machine. It basically > forks() itself and launches another process, which is basically run in > parallel on the second processor to utilize the two processors. I also > have another process that does the same thing using light-weight > processes (threads - pthread). How can I tell what 'slave' processes > belong to what 'master' process in the first case where I fork() another > process, as well as the second case where I have another thread spawned. > Is there something similar to the 'ps' command which can tell me such > info? I am running Redhat 9.0. Thanks Well, ps (with options) can show you PID and PPID (parent process ID). Do you have pstree? That shows processes in a tree form. BTW, I don't know about lwp or threads, but I guess there are option switches (on ps anyway). -- Juhan Leemet Logicognosis, Inc. .