summaryrefslogtreecommitdiffstats
path: root/shell/rtems_specific_commands.rst
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-19 15:06:37 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-19 15:06:37 +0100
commitf5170100f1a2fe449c327cb6786c4f3202cf07e8 (patch)
treea4be338726448bf087189062a7f533fe6d03eb06 /shell/rtems_specific_commands.rst
parentCONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS (diff)
downloadrtems-docs-f5170100f1a2fe449c327cb6786c4f3202cf07e8.tar.bz2
Document CPUINFO
Close #2723.
Diffstat (limited to '')
-rw-r--r--shell/rtems_specific_commands.rst70
1 files changed, 70 insertions, 0 deletions
diff --git a/shell/rtems_specific_commands.rst b/shell/rtems_specific_commands.rst
index 219c0f7..fa37790 100644
--- a/shell/rtems_specific_commands.rst
+++ b/shell/rtems_specific_commands.rst
@@ -14,6 +14,8 @@ The RTEMS shell has the following RTEMS specific commands:
- shutdown_ - Shutdown the system
+- cpuinfo_ - print per-processor information
+
- cpuuse_ - print or reset per thread cpu usage
- stackuse_ - print per thread stack usage
@@ -113,6 +115,74 @@ PROGRAMMING INFORMATION:
\clearpage
+.. _cpuinfo:
+
+cpuinfo - print per-processor information
+--------------------------------------------
+.. index:: cpuinfo
+
+SYNOPSYS:
+ .. code-block:: shell
+
+ cpuinfo
+
+DESCRIPTION:
+ This command may be used to print per-processor information.
+
+EXIT STATUS:
+ This command returns 0 on success and non-zero if an error is encountered.
+
+EXAMPLES:
+ The following is an example of how to use ``cpuinfo``:
+
+ .. code-block:: shell
+
+ SHLL [/] $ cpuinfo
+ -------------------------------------------------------------------------------
+ PER PROCESSOR INFORMATION
+ -------+--------+--------------+-----------------------------------------------
+ INDEX | ONLINE | SCHEDULER ID | SCHEDULER NAME
+ -------+--------+--------------+-----------------------------------------------
+ 0 | 1 | 0x0f010001 | UPD
+
+ In the above example, the system has only one processor. This processor
+ has the index zero and is online. It is owned by the scheduler with the
+ identifier ``0x0f010001`` and name ``UPD``.
+
+.. index:: CONFIGURE_SHELL_NO_COMMAND_CPUINFO
+.. index:: CONFIGURE_SHELL_COMMAND_CPUINFO
+
+CONFIGURATION:
+ This command is included in the default shell command set. When building a
+ custom command set, define ``CONFIGURE_SHELL_COMMAND_CPUINFO`` to have this
+ command included.
+
+ This command can be excluded from the shell command set by defining
+ ``CONFIGURE_SHELL_NO_COMMAND_CPUINFO`` when all shell commands have been
+ configured.
+
+.. index:: rtems_shell_rtems_main_cpuinfo
+
+PROGRAMMING INFORMATION:
+ The ``cpuinfo`` is implemented by a C language function which has the following
+ prototype:
+
+ .. code-block:: c
+
+ int rtems_cpu_info_report(
+ const rtems_printer *printer
+ );
+
+ The configuration structure for the ``cpuinfo`` has the following prototype:
+
+ .. code-block:: c
+
+ extern rtems_shell_cmd_t rtems_shell_CPUINFO_Command;
+
+.. raw:: latex
+
+ \clearpage
+
.. _cpuuse:
cpuuse - print or reset per thread cpu usage