Re: Binary CPU / Thread information.

2022-08-12 Thread Sam Price
Is there a preferred api style, or just mimic the linux kernel task?
https://docs.huihoo.com/doxygen/linux/kernel/3.7/structtask__struct.html

FreeRTOS has
https://www.freertos.org/a00021.html#xTaskGetTickCount

vxworks has a spy interface.
https://www.ecb.torontomu.ca/~courses/ee8205/Data-Sheets/Tornado-VxWorks/vxworks/ref/spyLib.html#top

I would probably prefer a function and pass in a const task identifier, and
a pointer to a struct task to populate.
(Similar to the linux kernel example, possibly with the same names that get
populated?)

Sam
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Binary CPU / Thread information.

2022-08-11 Thread Sebastian Huber

Hello Sam,

On 10.08.22 17:03, Sam Price wrote:

I saw that there was a console command to see cpu usage information.
https://docs.rtems.org/branches/master/c-user/cpu_usage_statistics.html 



Is there a binary api to get this, and stack usage?
I want to get this info out and send it in binary packets.

Is this something that I need to just copy whats going on in this file?
cpukit/libmisc/cpuuse/cpuusagereport.c

https://github.com/RTEMS/rtems/blob/fab1a86221e057a93bb9c1423dac81ed2b29ecde/cpukit/libmisc/cpuuse/cpuusagereport.c#L60 



or is there a c api out there that i am missing that fills usage 
information into c structs?


there is currently no API to get the CPU usage information in a 
structure. You can add one if you like.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Binary CPU / Thread information.

2022-08-10 Thread Sam Price
I saw that there was a console command to see cpu usage information.
https://docs.rtems.org/branches/master/c-user/cpu_usage_statistics.html

Is there a binary api to get this, and stack usage?
I want to get this info out and send it in binary packets.

Is this something that I need to just copy whats going on in this file?
cpukit/libmisc/cpuuse/cpuusagereport.c

https://github.com/RTEMS/rtems/blob/fab1a86221e057a93bb9c1423dac81ed2b29ecde/cpukit/libmisc/cpuuse/cpuusagereport.c#L60

or is there a c api out there that i am missing that fills usage
information into c structs?


-- 
Thank you,

Sam Price
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel