stack_checker_report_usage and cpu_usage_report to array

Cudmore, Alan P. (GSFC-5820) alan.p.cudmore at nasa.gov
Fri Jan 27 14:07:33 UTC 2012


Hi Eddie,
Sure. Below is the call, the end result should be a file containing the output from the shell command.
Let me know if you need more details, I pulled this from our OS abstraction layer ( osal.sf.net<http://osal.sf.net> )

Alan


#include <rtems/shell.h>

               /*
               ** Spawn a task to execute the shell command
               */
               rtemsRc =  rtems_shell_script (
                         "RSHL",
                         OS_SHELL_CMD_TASK_STACK_SIZE,
                         OS_SHELL_CMD_TASK_PRIORITY,
                         OS_SHELL_CMD_INPUT_FILE_NAME,
                         outputFileName,
                         FALSE,       /* Do not append output to file */
                         TRUE,        /* Wait for shell task to complete */
                         FALSE        /* Echo output */
                        );




On Jan 27, 2012, at 5:12 AM, Eduardo Esteban wrote:

Hello Alan,

Could you please provide me an example of the use of rtems_shell_script because I was not able to find it.

Best regards,

Eddie

On 26 January 2012 19:49, Cudmore, Alan P. (GSFC-5820) <alan.p.cudmore at nasa.gov<mailto:alan.p.cudmore at nasa.gov>> wrote:
We use the rtems_shell_script API to execute a single shell command and store the results in a file. We then downlink the file with the results.
It should work with all of the commands.

Alan




On Jan 26, 2012, at 1:17 PM, Phil Smith wrote:

> We're using RTEMS for ESA's Solar Orbiter and one change we need and would be
> useful in general for space missions is to send the output of
>  rtems_stack_checker_report_usage
> and
>  rtems_cpu_usage_report
> to an array/structure instead of to printk so that the results can be part of
> regular telemetry.
>
> We could use rtems_stack_checker_report_usage_with_plugin and
> rtems_cpu_usage_report_with_plugin and have the plugin be a function to
> intercept the text and extract it ... however it would save precious (space
> qualified) memory to just edit the RTEMS code.
>
> Is anyone else interested in this or done it already?
>
> --
> Philip J. Smith            __o    Dept. of Space and Climate Physics,
> pjs1 at mssl.ucl.ac.uk<mailto:pjs1 at mssl.ucl.ac.uk>       _'\<;    Mullard Space Science Laboratory,
>                     ((( (*)/(*)      University College London.
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org<mailto:rtems-users at rtems.org>
> http://www.rtems.org/mailman/listinfo/rtems-users


_______________________________________________
rtems-users mailing list
rtems-users at rtems.org<mailto:rtems-users at rtems.org>
http://www.rtems.org/mailman/listinfo/rtems-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120127/536f2228/attachment-0001.html>


More information about the users mailing list