Processor Load
Nick.SIMON at syntegra.bt.co.uk
Nick.SIMON at syntegra.bt.co.uk
Tue Sep 26 14:07:49 UTC 2000
This is a bit h/w dependent, but how about using a spare timer? Timer ISR
looks at the interrupted address, increments idle counter if in idle task,
busy counter otherwise. You'd have to ensure the period of this timer
didn't have common factor with other regular system events or your results
would be distorted by synchronisation. Make it a prime number of system
clocks and you're laughing.
-- Nick Simon
> -----Original Message-----
> From: leonp at plris.com [mailto:leonp at plris.com]
> Sent: 26 September 2000 09:15
> To: William Halliburton
> Cc: rtems-users at oarcorp.com
> Subject: Re: Processor Load
>
>
> At 17:17 25/09/2000 -0400, you wrote:
> > Is there an easy way to get/calculate information
> on the amount
> > of time the
> >system is spending in user/system/idle?
> I did the following:
> - In the idle task I wrote: while(1) { counter++; };
> - Stopped all tasks, so that idle task was the only one to run
> - Measured how many counter increments where in 1min, this
> showed me the
> "price" of one count in the loop.
> - Opened all tasks, gave the system full load, reset the counter and
> measured once more.
> May be there are other, more useful ways?
>
>
>
> Leon Pollak
> leonp at plris.com
>
More information about the users
mailing list