This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Kernel API for PS application?
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: jyl087 at netscape dot net
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 04 Sep 2002 10:30:17 -0600
- Subject: Re: [ECOS] Kernel API for PS application?
- References: <2D5E5EF0.2D81761A.00067016@netscape.net>
On Wed, 2002-09-04 at 10:28, jyl087@netscape.net wrote:
> I'd like to write a simple "ps" (process status) type
> application which will allow me to dump thread info
> to the console at will, without firing up GDB. This
> info would include thread status (e.g. SLEEPING, RUNNING...)
> stack address, etc...
>
> Has anyone done this before (and be willing to share the
> source?) If not, what's the best place to go looking for
> the proper hooks into the kernel for this info? Eventually,
> I'd like to do a "top" kind of routine also, which will
> show CPU utilization... but that'll be for another day...
I'd start by looking at the code which supports GDB, found in
.../packages/hal/common/{src,include}
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss