Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] top and/or ps without all the java threads
Date: Fri, 29 Jul 2005 06:46:06
Message-Id: 42E9D05A.4060704@asmallpond.org
In Reply to: [gentoo-user] top and/or ps without all the java threads by "Chad Leigh -- Shire.Net LLC"
1 Chad Leigh -- Shire.Net LLC wrote:
2
3 > Hi
4 >
5 > Is there a way to get a ps or top like display of processes that
6 > shows just the master process and not all the threads as separate
7 > processes for java programs? This is on a 2.4.30 hardened gentoo
8 > system.
9
10
11 For 2.4.30, I don't know of any way to do this, because as far as the
12 kernel is concerned, every thread really is a separate process. They
13 are just communicating via signals and shared memory. I think it is
14 pretty much impossible for another process like top or ps to figure out
15 whether something is a 'thread' or a 'process' with 2.4.
16
17 If you use 2.6 and nptl+nptlonly, this is handled automatically. Notice
18 my ps output for thunderbird:
19
20 carcharias rjf # ps -A xw -f | grep thunderbird
21 rjf 978 963 0 07:06 ? Sl 0:50
22 /usr/lib/mozilla-thunderbird/thunderbird-bin -mail
23
24 carcharias rjf # ps -A xw -f -L | grep thunderbird
25 rjf 978 963 978 0 4 07:06 ? Sl 0:49
26 /usr/lib/mozilla-thunderbird/thunderbird-bin -mail
27 rjf 978 963 982 0 4 07:06 ? Sl 0:00
28 /usr/lib/mozilla-thunderbird/thunderbird-bin -mail
29 rjf 978 963 984 0 4 07:06 ? Sl 0:00
30 /usr/lib/mozilla-thunderbird/thunderbird-bin -mail
31 rjf 978 963 14672 0 4 08:38 ? Sl 0:00
32 /usr/lib/mozilla-thunderbird/thunderbird-bin -mail
33
34 -Richard
35
36 --
37 gentoo-user@g.o mailing list