<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 13, 2023, 8:17 PM <<a href="mailto:mbenson@windhoverlabs.com">mbenson@windhoverlabs.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">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.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">--joel</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><br><div dir="ltr"><br><blockquote type="cite">On Jan 13, 2023, at 17:05, Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank" rel="noreferrer">joel@rtems.org</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">That's the right answer Karel.<div><br></div><div>I will add that we have been open to the addition of an API to obtain this information if someone could propose one. <hint></div><div><br></div><div>This is an area where not knowing what users would like to have has been a hurdle.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 13, 2023 at 3:42 PM Karel Gardas <<a href="mailto:karel.gardas@centrum.cz" target="_blank" rel="noreferrer">karel.gardas@centrum.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I would guess it is, but judge yourself by going to the RTEMS source <br>
code[*] and grepping for "rtems_cpu_usage".<br>
<br>
Cheers,<br>
Karel<br>
<br>
[*] used few months old trunk here.<br>
<br>
On 1/13/23 21:48, Molock, Dwaine S. (GSFC-5820) wrote:<br>
> Hello,<br>
> <br>
> Is there a RTEMS API available to obtain the current CPU usage or <br>
> anything similar to the “/proc/stat” file in Linux that can be read to <br>
> obtain this information?<br>
> <br>
> Thanks,<br>
> <br>
> Dwaine<br>
> <br>
> <br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@rtems.org" target="_blank" rel="noreferrer">users@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a><br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank" rel="noreferrer">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></blockquote></div>
<span>_______________________________________________</span><br><span>users mailing list</span><br><span><a href="mailto:users@rtems.org" target="_blank" rel="noreferrer">users@rtems.org</a></span><br><span><a href="http://lists.rtems.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.rtems.org/mailman/listinfo/users</a></span></div></blockquote></div></blockquote></div></div></div>