CPU_usage_Dump question...

Chris Johns cjohns at cybertec.com.au
Wed Sep 10 00:17:41 UTC 2003


John schilling wrote:
> I was trying to find a way to get information about tasks (usage, id, 
> etc), and ran across the CPU_usage_Dump function. However, I have a 
> specific need to get information regarding tasks but not by having 
> CPU_usage_Dump send the info to printf. Is anyone aware of any functions 
> which would allow me to have access to the task information that 
> CPU_usage_Dump prints out as a struct or something similar?
> 
> Thanks for your time.
> 

The capture engine provides a means to capture and buffer each task 
switch. You can set triggers, filters, and watch ceiling and floors to 
capture only what you are interested in when it happens. This may not be 
what you want, but it does show you how to get task information and may 
help.

You can find the capture engine under:

   http://www.rtems.com/cgi-bin/viewcvs.cgi/rtems/cpukit/libmisc/capture/

The engine comes with a CLI so uses printf and the RTEMS monitor. The 
engine only prints in response to a command you enter and is setup with:

   #include <rtems/monitor.h>
   #include <rtems/capture-cli.h>

   int main_or_whatever ()
   {
     rtems_monitor_init (0);
     rtems_capture_cli_init (0);

     ....
   }

It does use a small amount of task stack space.

-- 
  Chris Johns, cjohns at cybertec.com.au




More information about the users mailing list