Skip to contentSkip to conversation

C-API to access task runtime statistic?

Xenomai-help M. Koehrer 2 participants 2 messages Feb 5, 2007

lore
Share & tools
lore

M. Koehrer

author
#0 lore raw

Hi,

is there a C-API in Xenomai that allows to retrieve the runtime statistic from user space? My realtime application has a background task that has to provide such information to the user.
Of course I can get the information by parsing the /proc/xenomai/stat file. However, as my application is written in C, a direct access of the runtime information is actually more straightforward...

Thanks for all hints on that.

Regards

Mathias

Signature · 9 lines
Mathias Koehrer
[email protected]


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  44,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2
#1 lore raw
Quoted 6 lines

is there a C-API in Xenomai that allows to retrieve the runtime statistic from user space? My realtime application has a background task that has to provide such information to the user.
Of course I can get the information by parsing the /proc/xenomai/stat file. However, as my application is written in C, a direct access of the runtime information is actually more straightforward...

/proc/.. is already a generic interface to the user space. I don't see how 2 interfaces could be more straightforward.

The only justification - I'd think of at the moment - would be a requirement to have an interface from the real-time domain.

At least for the "native" skin, there are functions like rt_object_inquire() to provide some info about a given object. Indeed, rt_task_inquire() could be easily extended to return related statistics counters as an additional bonus (although, one should have an object's descriptor).

Otherwise, linux standard utilities like ps, top, ... retireve information from /proc as well.

Signature · 2 lines
Best regards,
Dmitry Adamushko