public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick LeRoy <nleroy@cs.wisc.edu>
To: linux-kernel@vger.kernel.org
Subject: Detecting threads vs processes with ps or /proc
Date: Fri, 6 Dec 2002 09:24:02 -0600	[thread overview]
Message-ID: <200212060924.02162.nleroy@cs.wisc.edu> (raw)

Hello, all.

>From searching through mail archives, etc., I'm pretty sure I know the answer 
already, but I'm going to post it anyway.

Our software (Condor) and some related software (Globus) is running on a 
number of systems around the world.  Condor attempts to monitor the RAM usage 
of it's "user" (maybe "client" is a better word here) processes.  If the 
client forks, we need to monitor the client and all of it's children, which 
really isn't difficult.  The _problem_ is that if the client creates threads, 
it's impossible, from what we can tell, to tell the difference between 
separate threads and processes.

So my question, I guess, is this.  How can you tell, from user space, whether 
a group of processes are related as threads or through a "normal" child / 
parent relationship?  The systems that we're running on currently are 2.2.19 
and 2.4.18/19.

>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.

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.

Thanks,

-Nick



             reply	other threads:[~2002-12-06 15:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 15:24 Nick LeRoy [this message]
2002-12-06 19:48 ` Detecting threads vs processes with ps or /proc Robert Love
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=200212060924.02162.nleroy@cs.wisc.edu \
    --to=nleroy@cs.wisc.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox