[fpc-pascal] multi threading under Linux

2007-03-23 Thread Graeme Geldenhuys

Hi,

Anybody know how I can see the amount of threads running in a process
under Linux?  I don't mean programmatically in Free Pascal, I mean an
external tool.  Something like 'top' or 'ps aux' or Gnome System
Monitor, etc..

I wrote a program the executes multiple threads to calculate CRC32
values on files.  It verifies a CD-ROM against a list of previously
calculated CRC values (from the master CD) to make sure the copied
CD's has been written correctly.

Doing a 'ps aux' or using Gnome System Monitor, I can't see if those
threads are actually running or the amount of threads running.

BTW, I'm trying to run a maximum of 10 threads at a time.  This
exercise is to see if dual core or qaud core processors can do crc
checks against a CD-ROM faster than a single processor with a single
thread.


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi threading under Linux

2007-03-23 Thread Jonas Maebe


On 23 Mar 2007, at 09:11, Graeme Geldenhuys wrote:


Anybody know how I can see the amount of threads running in a process
under Linux?  I don't mean programmatically in Free Pascal, I mean an
external tool.  Something like 'top' or 'ps aux' or Gnome System
Monitor, etc..


Attach with gdb (gdb -p ) and type "info threads"


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi threading under Linux

2007-03-23 Thread Graeme Geldenhuys

Thank you!

G.

On 3/23/07, Jonas Maebe <[EMAIL PROTECTED]> wrote:


Attach with gdb (gdb -p ) and type "info threads"


Jonas

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi threading under Linux

2007-03-23 Thread Henry Vermaak

On 23/03/07, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:

Hi,

Anybody know how I can see the amount of threads running in a process
under Linux?  I don't mean programmatically in Free Pascal, I mean an
external tool.  Something like 'top' or 'ps aux' or Gnome System
Monitor, etc..



ps -eLf gives you information about threads.  the NLWP (number of
threads) and LWP (thread ID) columns are added with the -L option.

henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi threading under Linux

2007-03-23 Thread Graeme Geldenhuys

Even easier, thanks.

G.

On 3/23/07, Henry Vermaak <[EMAIL PROTECTED]> wrote:


ps -eLf gives you information about threads.  the NLWP (number of
threads) and LWP (thread ID) columns are added with the -L option.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] multi threading under Linux

2007-03-23 Thread Marc PERTRON

Henry Vermaak a écrit :

On 23/03/07, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:

Hi,

Anybody know how I can see the amount of threads running in a process
under Linux?  I don't mean programmatically in Free Pascal, I mean an
external tool.  Something like 'top' or 'ps aux' or Gnome System
Monitor, etc..



ps -eLf gives you information about threads.  the NLWP (number of
threads) and LWP (thread ID) columns are added with the -L option.

Hi,
There is also pstree (display a tree of processes)
--
Marc
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal