How can I identify the top-level thread of a Java process?

Nathan Meyers

Because each thread has a separate PID that shows up in ps and top output, it's difficult to figure out which is the top-level process. Two possible ways to do it are:

    ps -fax


    pstree -lp

Both display tree-structured representations of the process list, making it easy to identify the top-level process.