[Breezy] "top" versus "gkrellm" - disparity in process numbers?
Marius Gedminas
marius at pov.lt
Thu Feb 9 11:14:47 UTC 2006
On Thu, Feb 09, 2006 at 07:52:58AM +1100, Peter Garrett wrote:
> I've noticed, both in Hoary and Breezy (possibly in Warty as well but I
> can't remember), that when I have gkrellm running it reports a far higher
> number of processes then does "top" in a terminal.
I can confirm this.
> For example currently "top" reports
>
> Tasks: 96 total, 2 running, 94 sleeping, 0 stopped, 0 zombie
>
> while gkrellm claims I have 150 processes .
>
> Not a big deal ... but I'm curious as to why this happens - does anyone
> know how gkrellm and top respectively measure the number of processes?
top shows the total number of processes.
gkrellm shows the total number of threads.
ps -e will list all processes in the system -- the number of output
lines matches the number of tasks that top shows. ps -em will also list
all threads for each process, as well as listing all processes -- the
number of lines matches the sum of the numbers shown by top and gkrellm.
> I used to run Debian on this machine, and gkrellm reported more or less the
> same numbers as "top". (This was 2004 and before)
Linux kernel 2.4 used to assign different process IDs to each thread,
so top also used to show the total number of threads. Linux 2.6 and the
new threading library (NPTL) changed this.
HTH,
Marius Gedminas
--
MCSE == Marginal Computer Software Enthusiast
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060209/5c478a2e/attachment.sig>
More information about the ubuntu-users
mailing list