Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12623

Output of pstree -p <pid> shows threads with different pids

From Adam Stanton <adamstanton1979@gmail.com>
Newsgroups comp.os.linux.misc
Subject Output of pstree -p <pid> shows threads with different pids
Date 2014-11-05 09:44 -0800
Organization A noiseless patient Spider
Message-ID <20141105094408.3d6d3fec@adam> (permalink)

Show all headers | View raw


I ran the program pstree -p 31872 which printed the following output:

ruby(31872)─┬─{ruby}(31906)
            └─{ruby}(32372)

The man page for pstree says:

Child threads of a process are found under the parent process and are
shown with the process name in curly braces, e.g.

           icecast2---13*[{icecast2}]

(The above is different output because of the missing -p option.
However running pstree 31872 gives:

ruby───2*[{ruby}]

which suggests a ruby process running 2 ruby threads. 

My question is, why does the -p option show the threads with different
pids? I would expect them to be the same (31872) as the process. Running
htop also shows the same results.

Back to comp.os.linux.misc | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Output of pstree -p <pid> shows threads with different pids Adam Stanton <adamstanton1979@gmail.com> - 2014-11-05 09:44 -0800
  Re: Output of pstree -p <pid> shows threads with different pids Richard Kettlewell <rjk@greenend.org.uk> - 2014-11-05 18:23 +0000
    Re: Output of pstree -p <pid> shows threads with different pids Adam Stanton <adamstanton1979@gmail.com> - 2014-11-05 11:05 -0800
      Re: Output of pstree -p <pid> shows threads with different pids Richard Kettlewell <rjk@greenend.org.uk> - 2014-11-05 19:34 +0000
        Re: Output of pstree -p <pid> shows threads with different pids Adam Stanton <adamstanton1979@gmail.com> - 2014-11-05 11:52 -0800

csiph-web