CPU Usage

Joel Sherrill joel at rtems.org
Sat Jan 14 17:51:44 UTC 2023


On Fri, Jan 13, 2023, 8:17 PM <mbenson at windhoverlabs.com> wrote:

> I basically just copied and renamed the existing function that prints to
> the console, but changed it to return a struct.  I couldn’t personally give
> it back.  I thought my customer at the time would roll it back in.  Looks
> like that never happened.  Sorry.
>

That's more or less what I've had in mind. Asking for the info for a single
thread is easy from an API view but asking for all threads is more
complicated since the user has to pass an array of structures to receive
the information and it might not be long enough.

--joel

>
>
> On Jan 13, 2023, at 17:05, Joel Sherrill <joel at rtems.org> wrote:
>
> 
> That's the right answer Karel.
>
> I will add that we have been open to the addition of an API to obtain this
> information if someone could propose one. <hint>
>
> This is an area where not knowing what users would like to have has been a
> hurdle.
>
> On Fri, Jan 13, 2023 at 3:42 PM Karel Gardas <karel.gardas at centrum.cz>
> wrote:
>
>>
>> I would guess it is, but judge yourself by going to the RTEMS source
>> code[*] and grepping for "rtems_cpu_usage".
>>
>> Cheers,
>> Karel
>>
>> [*] used few months old trunk here.
>>
>> On 1/13/23 21:48, Molock, Dwaine S. (GSFC-5820) wrote:
>> > Hello,
>> >
>> > Is there a RTEMS API available to obtain the current CPU usage or
>> > anything similar to the “/proc/stat” file in Linux that can be read to
>> > obtain this information?
>> >
>> > Thanks,
>> >
>> > Dwaine
>> >
>> >
>> > _______________________________________________
>> > users mailing list
>> > users at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/users
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20230114/f7f3fb5c/attachment.htm>


More information about the users mailing list