All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Nick LeRoy <nleroy@cs.wisc.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Detecting threads vs processes with ps or /proc
Date: 06 Dec 2002 14:48:33 -0500	[thread overview]
Message-ID: <1039204112.1943.2142.camel@phantasy> (raw)
In-Reply-To: <200212060924.02162.nleroy@cs.wisc.edu>

On Fri, 2002-12-06 at 10:24, Nick LeRoy wrote:

> >From what else I've read, it seems that the new threading model in 2.5/2.6 is 
> changing to a more POSIX friendly model, which will effect this answer, but 
> we're not running 2.5 and really can't force such an upgrade -- hell, right 
> now we're having problems getting a switch from 2.2 pushed through.

Yep, you should get what you want with 2.5 + NPTL.  We need to add a few
bits, though, to make it complete.

> Thanks _very_ much in advance.  I'd be tickled pink if the answer is something 
> like "just look at the foo flag in ps", or "upgrade to version 1.2.3.4 of 
> procps and do xyzzy", but my intuition tells me otherwise.

See http://tech9.net/rml/procps

and "upgrade to version 2.0.8 or later of procps" :)

It is just a heuristic, though.  A hack in fact.  We look at a process's
children and compare RSS, VM size, and the process image they are
running.  If they are the same, we label them threads.

It is the default behavior.  Flag `-m' turns it off.

See thread_group() and flag_threads().

	Robert Love


  reply	other threads:[~2002-12-06 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 15:24 Detecting threads vs processes with ps or /proc Nick LeRoy
2002-12-06 19:48 ` Robert Love [this message]
2002-12-06 19:56   ` Nick LeRoy
2002-12-06 20:09     ` Robert Love
2002-12-09 16:27       ` Jeremy Fitzhardinge
2002-12-08 12:24 ` Gilad Ben-Yossef
  -- strict thread matches above, loose matches on Subject: below --
2002-12-09  0:24 Albert D. Cahalan
2002-12-09  3:18 ` Nick LeRoy
2002-12-09  3:47   ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1039204112.1943.2142.camel@phantasy \
    --to=rml@tech9.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nleroy@cs.wisc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.