All of lore.kernel.org
 help / color / mirror / Atom feed
* FW: [Xenomai-help] Xenomai thread runtime statistics
@ 2006-03-17 15:17 Moser, Dan
  2006-03-17 15:57 ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Moser, Dan @ 2006-03-17 15:17 UTC (permalink / raw)
  To: xenomai

Hi,

I am still searching for ways (hopefully via some API(s)) to get Xenomai
run-time thread execution info (my original post is below).

Being a newbie, I apologize if the answer "should be obvious".  I am
still getting up to speed with both Linux and Xenomai.

Is there a better list on which I should post this question?

Hope to hear from someone.


Thanks,
Dan



> -----Original Message-----
> From: xenomai-help-bounces@domain.hid
> [mailto:xenomai-help-bounces@domain.hid] On Behalf Of Moser, Dan
> Sent: Wednesday, March 15, 2006 4:06 PM
> To: xenomai@xenomai.org
> Subject: [Xenomai-help] Xenomai thread runtime statistics
> 
> Hi,
> 
> I am seeking whatever information is available regarding 
> Xenomai task runtime statistics.  Things such as thread 
> real-time usage, CPU usage, etc. and how to access that 
> information from within an application.
> 
> In particular, I would like to find out things such as how long (in
> real-time) each iteration of a given periodic task takes to 
> run.  I ultimately want to use this info to figure out how 
> much "head room" I have left in a given rate group of a 
> multi-rate/multi-tasking control system.
> 
> Thanks in advance,
> Dan
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FW: [Xenomai-help] Xenomai thread runtime statistics
  2006-03-17 15:17 FW: [Xenomai-help] Xenomai thread runtime statistics Moser, Dan
@ 2006-03-17 15:57 ` Philippe Gerum
  2006-03-17 16:11   ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2006-03-17 15:57 UTC (permalink / raw)
  To: Moser, Dan; +Cc: xenomai

Moser, Dan wrote:
> Hi,
> 
> I am still searching for ways (hopefully via some API(s)) to get Xenomai
> run-time thread execution info (my original post is below).
> 
> Being a newbie, I apologize if the answer "should be obvious".  I am
> still getting up to speed with both Linux and Xenomai.
> 
> Is there a better list on which I should post this question?
>

This question is perfectly relevant to this list, the thing is that there's no 
simple, built-in way of getting execution stats for real-time threads yet. The 
best way to find out the execution time of your work cycle would be to measure it 
using the high precision clock information.

With the Xenomai-enabled POSIX API, you can use clock_gettime(CLOCK_MONOTONIC) to 
get a precise timestamp derived from the onboard TSC. With the native API, 
rt_timer_tsc() returns the same information.

e.g.

    for (;;) {
    struct timespec ts_start, ts_end;
    clock_gettime(CLOCK_MONOTONIC,&ts_start);
	<work>
    clock_gettime(CLOCK_MONOTONIC,&ts_end);
    /* work cycle consumption: ts_end - ts_start */
    }

> Hope to hear from someone.
> 
> 
> Thanks,
> Dan
> 
> 
> 
> 
>>-----Original Message-----
>>From: xenomai-help-bounces@domain.hid 
>>[mailto:xenomai-help-bounces@domain.hid] On Behalf Of Moser, Dan
>>Sent: Wednesday, March 15, 2006 4:06 PM
>>To: xenomai@xenomai.org
>>Subject: [Xenomai-help] Xenomai thread runtime statistics
>>
>>Hi,
>>
>>I am seeking whatever information is available regarding 
>>Xenomai task runtime statistics.  Things such as thread 
>>real-time usage, CPU usage, etc. and how to access that 
>>information from within an application.
>>
>>In particular, I would like to find out things such as how long (in
>>real-time) each iteration of a given periodic task takes to 
>>run.  I ultimately want to use this info to figure out how 
>>much "head room" I have left in a given rate group of a 
>>multi-rate/multi-tasking control system.
>>
>>Thanks in advance,
>>Dan
>>
>>_______________________________________________
>>Xenomai-help mailing list
>>Xenomai-help@domain.hid
>>https://mail.gna.org/listinfo/xenomai-help
>>
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FW: [Xenomai-help] Xenomai thread runtime statistics
  2006-03-17 15:57 ` Philippe Gerum
@ 2006-03-17 16:11   ` Jan Kiszka
  2006-03-17 16:13     ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2006-03-17 16:11 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai, Moser, Dan

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Philippe Gerum wrote:
> Moser, Dan wrote:
>> Hi,
>>
>> I am still searching for ways (hopefully via some API(s)) to get Xenomai
>> run-time thread execution info (my original post is below).
>>
>> Being a newbie, I apologize if the answer "should be obvious".  I am
>> still getting up to speed with both Linux and Xenomai.
>>
>> Is there a better list on which I should post this question?
>>
> 
> This question is perfectly relevant to this list, the thing is that
> there's no simple, built-in way of getting execution stats for real-time
> threads yet. The best way to find out the execution time of your work
> cycle would be to measure it using the high precision clock information.

Hmm, wouldn't it be feasible to add such statistics to I-pipe level? I'm
thinking of something like time spent in domain X, Y, Z vs. the overall
runtime, preferably converted to percentage usage.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FW: [Xenomai-help] Xenomai thread runtime statistics
  2006-03-17 16:11   ` Jan Kiszka
@ 2006-03-17 16:13     ` Philippe Gerum
  2006-03-17 16:22       ` Jan Kiszka
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Gerum @ 2006-03-17 16:13 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai, Moser, Dan

Jan Kiszka wrote:
> Philippe Gerum wrote:
> 
>>Moser, Dan wrote:
>>
>>>Hi,
>>>
>>>I am still searching for ways (hopefully via some API(s)) to get Xenomai
>>>run-time thread execution info (my original post is below).
>>>
>>>Being a newbie, I apologize if the answer "should be obvious".  I am
>>>still getting up to speed with both Linux and Xenomai.
>>>
>>>Is there a better list on which I should post this question?
>>>
>>
>>This question is perfectly relevant to this list, the thing is that
>>there's no simple, built-in way of getting execution stats for real-time
>>threads yet. The best way to find out the execution time of your work
>>cycle would be to measure it using the high precision clock information.
> 
> 
> Hmm, wouldn't it be feasible to add such statistics to I-pipe level? I'm
> thinking of something like time spent in domain X, Y, Z vs. the overall
> runtime, preferably converted to percentage usage.
> 

This would be nice, but only part of the issue, since you might have several 
real-time context switches occurring in a single Xenomai domain activation.

> Jan
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FW: [Xenomai-help] Xenomai thread runtime statistics
  2006-03-17 16:13     ` Philippe Gerum
@ 2006-03-17 16:22       ` Jan Kiszka
  2006-03-17 16:26         ` Philippe Gerum
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2006-03-17 16:22 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai, Moser, Dan

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

Philippe Gerum wrote:
> Jan Kiszka wrote:
>> Philippe Gerum wrote:
>>
>>> Moser, Dan wrote:
>>>
>>>> Hi,
>>>>
>>>> I am still searching for ways (hopefully via some API(s)) to get
>>>> Xenomai
>>>> run-time thread execution info (my original post is below).
>>>>
>>>> Being a newbie, I apologize if the answer "should be obvious".  I am
>>>> still getting up to speed with both Linux and Xenomai.
>>>>
>>>> Is there a better list on which I should post this question?
>>>>
>>>
>>> This question is perfectly relevant to this list, the thing is that
>>> there's no simple, built-in way of getting execution stats for real-time
>>> threads yet. The best way to find out the execution time of your work
>>> cycle would be to measure it using the high precision clock information.
>>
>>
>> Hmm, wouldn't it be feasible to add such statistics to I-pipe level? I'm
>> thinking of something like time spent in domain X, Y, Z vs. the overall
>> runtime, preferably converted to percentage usage.
>>
> 
> This would be nice, but only part of the issue, since you might have
> several real-time context switches occurring in a single Xenomai domain
> activation.

You mean per-thread statistics? For sure, but a very common question is:
"How much remains for Linux?" And this feature could give a general hint
(although detailed benchmarking will typically be required as well, as
the effect of Xenomai+RT-load on application-specific Linux service may
have to be analysed more thoroughly).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FW: [Xenomai-help] Xenomai thread runtime statistics
  2006-03-17 16:22       ` Jan Kiszka
@ 2006-03-17 16:26         ` Philippe Gerum
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Gerum @ 2006-03-17 16:26 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai, Moser, Dan

Jan Kiszka wrote:
> Philippe Gerum wrote:
> 
>>Jan Kiszka wrote:
>>
>>>Philippe Gerum wrote:
>>>
>>>
>>>>Moser, Dan wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I am still searching for ways (hopefully via some API(s)) to get
>>>>>Xenomai
>>>>>run-time thread execution info (my original post is below).
>>>>>
>>>>>Being a newbie, I apologize if the answer "should be obvious".  I am
>>>>>still getting up to speed with both Linux and Xenomai.
>>>>>
>>>>>Is there a better list on which I should post this question?
>>>>>
>>>>
>>>>This question is perfectly relevant to this list, the thing is that
>>>>there's no simple, built-in way of getting execution stats for real-time
>>>>threads yet. The best way to find out the execution time of your work
>>>>cycle would be to measure it using the high precision clock information.
>>>
>>>
>>>Hmm, wouldn't it be feasible to add such statistics to I-pipe level? I'm
>>>thinking of something like time spent in domain X, Y, Z vs. the overall
>>>runtime, preferably converted to percentage usage.
>>>
>>
>>This would be nice, but only part of the issue, since you might have
>>several real-time context switches occurring in a single Xenomai domain
>>activation.
> 
> 
> You mean per-thread statistics?

Yes, like in Dan's case, I guess.

  For sure, but a very common question is:
> "How much remains for Linux?" And this feature could give a general hint
> (although detailed benchmarking will typically be required as well, as
> the effect of Xenomai+RT-load on application-specific Linux service may
> have to be analysed more thoroughly).
> 

Also true.

> Jan
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-03-17 16:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 15:17 FW: [Xenomai-help] Xenomai thread runtime statistics Moser, Dan
2006-03-17 15:57 ` Philippe Gerum
2006-03-17 16:11   ` Jan Kiszka
2006-03-17 16:13     ` Philippe Gerum
2006-03-17 16:22       ` Jan Kiszka
2006-03-17 16:26         ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.