source: rtems-docs/shell/rtems_specific_commands.rst @ f052446

Last change on this file since f052446 was f052446, checked in by Chris Johns <chrisj@…>, on 08/03/22 at 05:01:43

commands: Add 'rtems' command

  • Property mode set to 100644
File size: 48.2 KB
RevLine 
[e52906b]1.. SPDX-License-Identifier: CC-BY-SA-4.0
[489740f]2
[4886d60]3.. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
[35bcd00]4
[8ca13ed]5RTEMS Specific Commands
[f15d607]6***********************
[8ca13ed]7
8Introduction
9============
10
[a1c7180]11The RTEMS shell has the following RTEMS specific commands:
[8ca13ed]12
[f052446]13- rtems_ - Display RTEMS specific detail
14
[35bcd00]15- shutdown_ - Shutdown the system
[8ca13ed]16
[f517010]17- cpuinfo_ - print per-processor information
18
[35bcd00]19- cpuuse_ - print or reset per thread cpu usage
[8ca13ed]20
[35bcd00]21- stackuse_ - print per thread stack usage
[8ca13ed]22
[35bcd00]23- perioduse_ - print or reset per period usage
[8ca13ed]24
[35bcd00]25- profreport_ - print a profiling report
[8ca13ed]26
[35bcd00]27- wkspace_ - Display information on Executive Workspace
[8ca13ed]28
[35bcd00]29- config_ - Show the system configuration.
[8ca13ed]30
[35bcd00]31- itask_ - List init tasks for the system
[8ca13ed]32
[35bcd00]33- extension_ - Display information about extensions
[8ca13ed]34
[35bcd00]35- task_ - Display information about tasks
[8ca13ed]36
[35bcd00]37- queue_ - Display information about message queues
[8ca13ed]38
[35bcd00]39- sema_ - display information about semaphores
[8ca13ed]40
[35bcd00]41- region_ - display information about regions
[8ca13ed]42
[35bcd00]43- part_ - display information about partitions
[8ca13ed]44
[35bcd00]45- object_ - Display information about RTEMS objects
[8ca13ed]46
[35bcd00]47- driver_ - Display the RTEMS device driver table
[8ca13ed]48
[35bcd00]49- dname_ - Displays information about named drivers
[8ca13ed]50
[35bcd00]51- pthread_ - Displays information about POSIX threads
[8ca13ed]52
53Commands
54========
55
[bf61a8b]56This section details the RTEMS Specific Commands available.  A subsection is
57dedicated to each of the commands and describes the behavior and configuration
58of that command as well as providing an example usage.
59
[f052446]60.. raw:: latex
61
62   \clearpage
63
64.. _rtems:
65
66rtems - RTEMS Details
67---------------------
68.. index:: rtems
69
70SYNOPSYS:
71    .. code-block:: shell
72
73        rtems
74
75DESCRIPTION:
76    This command reports various RTEMS specific details such as a the
77    version, CPU and CPU module, BSP name, version of tools and the
78    build options.
79
80EXIT STATUS:
81    This command returns 0 on success and non-zero if an error is encountered.
82
83NOTES:
84    The following commands are supported:
85
86    - ``ver``:
87      Version of RTEMS running
88
89    - ``cpu``:
90      CPU name and model
91
92    - ``bsp``:
93      Name of the BSP
94
95    - ``tools``:
96      Version of the tools used to build RTEMS
97
98    - ``opts``:
99      RTEMS build options
100
101    - ``all``:
102      All of the available commands
103
104
105EXAMPLES:
106    The following is an example of how to use ``rtems``:
107
108    .. code-block:: shell
109
110        SHLL [/] # rtems
111        RTEMS: 6.0.0 (071640d310b432d15350188c2ebf086653a0d578)
112
113    The version of RTEMS running is displayed. To see the CPU name and
114    moduel enter:
115
116    .. code-block:: shell
117
118        SHLL [/] # rtems cpu
119        CPU: SPARC (w/FPU)
120
121    The ``help`` command will list all available commands. The ``all``
122    command will display all avalable output:
123
124    .. code-block:: shell
125
126        SHLL [/] # rtems all
127        RTEMS: 6.0.0 (071640d310b432d15350188c2ebf086653a0d578)
128        CPU: SPARC (w/FPU)
129        BSP: erc32
130        Tools: 12.1.1 20220622 (RTEMS 6, RSB f4f5d43a98051f7562103aaa2ec7723c628c6947, Newlib ea99f21)
131        Options: DEBUG POSIX
132
133.. index:: CONFIGURE_SHELL_NO_COMMAND_RTEMS
134.. index:: CONFIGURE_SHELL_COMMAND_RTEMS
135
136CONFIGURATION:
137    This command is included in the default shell command set.  When building a
138    custom command set, define ``CONFIGURE_SHELL_COMMAND_RTEMS`` to have
139    this command included.
140
141    This command can be excluded from the shell command set by defining
142    ``CONFIGURE_SHELL_NO_COMMAND_RTEMS`` when all shell commands have been
143    configured.
144
145PROGRAMMING INFORMATION:
146    The configuration structure for the ``rtems`` has the following
147    prototype:
148
149    .. code-block:: c
150
151        extern rtems_shell_cmd_t rtems_shell_RTEMS_Command;
152
[bf61a8b]153.. raw:: latex
154
155   \clearpage
[8ca13ed]156
[35bcd00]157.. _shutdown:
158
[8ca13ed]159shutdown - Shutdown the system
160------------------------------
161.. index:: shutdown
162
[bf61a8b]163SYNOPSYS:
164    .. code-block:: shell
[8ca13ed]165
[bf61a8b]166        shutdown
[8ca13ed]167
[bf61a8b]168DESCRIPTION:
169    This command is used to shutdown the RTEMS application.
[8ca13ed]170
[bf61a8b]171EXIT STATUS:
172    This command does not return.
[8ca13ed]173
[bf61a8b]174NOTES:
175    NONE
[8ca13ed]176
[bf61a8b]177EXAMPLES:
178    The following is an example of how to use ``shutdown``:
[8ca13ed]179
[bf61a8b]180    .. code-block:: shell
[35bcd00]181
[bf61a8b]182        SHLL [/] $ shutdown
183        System shutting down at user request
[8ca13ed]184
[bf61a8b]185    The user will not see another prompt and the system will shutdown.
[8ca13ed]186
187.. index:: CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN
188.. index:: CONFIGURE_SHELL_COMMAND_SHUTDOWN
189
[bf61a8b]190CONFIGURATION:
191    This command is included in the default shell command set.  When building a
192    custom command set, define ``CONFIGURE_SHELL_COMMAND_SHUTDOWN`` to have
193    this command included.
194
195    This command can be excluded from the shell command set by defining
196    ``CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN`` when all shell commands have been
197    configured.
[8ca13ed]198
[bf61a8b]199PROGRAMMING INFORMATION:
200    The configuration structure for the ``shutdown`` has the following
201    prototype:
[8ca13ed]202
[bf61a8b]203    .. code-block:: c
[8ca13ed]204
[bf61a8b]205        extern rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command;
[35bcd00]206
[bf61a8b]207.. raw:: latex
[8ca13ed]208
[bf61a8b]209   \clearpage
[8ca13ed]210
[f517010]211.. _cpuinfo:
212
213cpuinfo - print per-processor information
214--------------------------------------------
215.. index:: cpuinfo
216
217SYNOPSYS:
218    .. code-block:: shell
219
220        cpuinfo
221
222DESCRIPTION:
223    This command may be used to print per-processor information.
224
225EXIT STATUS:
226    This command returns 0 on success and non-zero if an error is encountered.
227
228EXAMPLES:
229    The following is an example of how to use ``cpuinfo``:
230
231    .. code-block:: shell
232
233        SHLL [/] $ cpuinfo
234        -------------------------------------------------------------------------------
235                                    PER PROCESSOR INFORMATION
236        -------+--------+--------------+-----------------------------------------------
237         INDEX | ONLINE | SCHEDULER ID | SCHEDULER NAME
238        -------+--------+--------------+-----------------------------------------------
239             0 |      1 |   0x0f010001 | UPD
240
241    In the above example, the system has only one processor.  This processor
242    has the index zero and is online.  It is owned by the scheduler with the
243    identifier ``0x0f010001`` and name ``UPD``.
244
245.. index:: CONFIGURE_SHELL_NO_COMMAND_CPUINFO
246.. index:: CONFIGURE_SHELL_COMMAND_CPUINFO
247
248CONFIGURATION:
249    This command is included in the default shell command set.  When building a
250    custom command set, define ``CONFIGURE_SHELL_COMMAND_CPUINFO`` to have this
251    command included.
252
253    This command can be excluded from the shell command set by defining
254    ``CONFIGURE_SHELL_NO_COMMAND_CPUINFO`` when all shell commands have been
255    configured.
256
257.. index:: rtems_shell_rtems_main_cpuinfo
258
259PROGRAMMING INFORMATION:
260    The ``cpuinfo`` is implemented by a C language function which has the following
261    prototype:
262
263    .. code-block:: c
264
265        int rtems_cpu_info_report(
266            const rtems_printer *printer
267        );
268
269    The configuration structure for the ``cpuinfo`` has the following prototype:
270
271    .. code-block:: c
272
273        extern rtems_shell_cmd_t rtems_shell_CPUINFO_Command;
274
275.. raw:: latex
276
277   \clearpage
278
[35bcd00]279.. _cpuuse:
280
[8ca13ed]281cpuuse - print or reset per thread cpu usage
282--------------------------------------------
283.. index:: cpuuse
284
[bf61a8b]285SYNOPSYS:
286    .. code-block:: shell
287
288        cpuuse [-r]
289
290DESCRIPTION:
291    This command may be used to print a report on the per thread cpu usage or
292    to reset the per thread CPU usage statistics. When invoked with the ``-r``
293    option, the CPU usage statistics are reset.
294
295EXIT STATUS:
296    This command returns 0 on success and non-zero if an error is encountered.
297
298NOTES:
299    The granularity of the timing information reported is dependent upon the
300    BSP and the manner in which RTEMS was built.  In the default RTEMS
301    configuration, if the BSP supports nanosecond granularity timestamps, then
302    the information reported will be highly accurate. Otherwise, the accuracy
303    of the information reported is limited by the clock tick quantum.
304
305EXAMPLES:
306    The following is an example of how to use ``cpuuse``:
307
308    .. code-block:: shell
309
[8363c3d]310        [/] cpuuse
311        -------------------------------------------------------------------------------
312                                      CPU USAGE BY THREAD
313        ------------+----------------------------------------+---------------+---------
314         ID         | NAME                                   | SECONDS       | PERCENT
315        ------------+----------------------------------------+---------------+---------
316         0x09010001 | IDLE                                   |     11.444381 |  73.938
317         0x0a010001 | UI1                                    |      0.206754 |   1.335
318         0x0a010002 | BSWP                                   |      0.008277 |   0.053
319         0x0a010003 | BRDA                                   |      0.000952 |   0.006
320         0x0a010004 | MDIA                                   |      0.000334 |   0.002
321         0x0a010005 | TIME                                   |      0.912809 |   5.895
322         0x0a010006 | IRQS                                   |      0.004810 |   0.031
323         0x0a010007 | swi1: netisr 0                         |      0.002593 |   0.016
324         0x0a010008 | kqueue_ctx task                        |      0.000663 |   0.004
325         0x0a010009 | swi5: fast task                        |      0.000059 |   0.000
326         0x0a01000a | thread taskq                           |      0.000057 |   0.000
327         0x0a01000b | swi6: task queu                        |      0.003063 |   0.019
328         0x0a01000c | DHCP                                   |      1.391745 |   8.986
329         0x0a01000d | FTPa                                   |      0.002203 |   0.014
330         0x0a01000e | FTPb                                   |      0.000233 |   0.001
331         0x0a01000f | FTPc                                   |      0.000226 |   0.001
332         0x0a010010 | FTPd                                   |      0.000228 |   0.001
333         0x0a010011 | FTPD                                   |      0.002959 |   0.019
334         0x0a010012 | TNTD                                   |      0.001111 |   0.007
335         0x0a010013 | SHLL                                   |      1.508445 |   9.736
336        ------------+----------------------------------------+---------------+---------
337         TIME SINCE LAST CPU USAGE RESET IN SECONDS:                         15.492171
338        -------------------------------------------------------------------------------
339        [/] # cpuuse -r
[bf61a8b]340        Resetting CPU Usage information
[8363c3d]341        [/] # cpuuse
342        -------------------------------------------------------------------------------
343                                      CPU USAGE BY THREAD
344        ------------+----------------------------------------+---------------+---------
345         ID         | NAME                                   | SECONDS       | PERCENT
346        ------------+----------------------------------------+---------------+---------
347         0x09010001 | IDLE                                   |      0.000000 |   0.000
348         0x0a010001 | UI1                                    |      0.000000 |   0.000
349         0x0a010002 | BSWP                                   |      0.000000 |   0.000
350         0x0a010003 | BRDA                                   |      0.000000 |   0.000
351         0x0a010004 | MDIA                                   |      0.000000 |   0.000
352         0x0a010005 | TIME                                   |      0.000000 |   0.000
353         0x0a010006 | IRQS                                   |      0.000000 |   0.000
354         0x0a010007 | swi1: netisr 0                         |      0.000000 |   0.000
355         0x0a010008 | kqueue_ctx task                        |      0.000000 |   0.000
356         0x0a010009 | swi5: fast task                        |      0.000000 |   0.000
357         0x0a01000a | thread taskq                           |      0.000000 |   0.000
358         0x0a01000b | swi6: task queu                        |      0.000000 |   0.000
359         0x0a01000c | DHCP                                   |      0.000000 |   0.000
360         0x0a01000d | FTPa                                   |      0.000000 |   0.000
361         0x0a01000e | FTPb                                   |      0.000000 |   0.000
362         0x0a01000f | FTPc                                   |      0.000000 |   0.000
363         0x0a010010 | FTPd                                   |      0.000000 |   0.000
364         0x0a010011 | FTPD                                   |      0.000000 |   0.000
365         0x0a010012 | TNTD                                   |      0.000000 |   0.000
366         0x0a010013 | SHLL                                   |      0.016503 |  99.962
367        ------------+----------------------------------------+---------------+---------
368         TIME SINCE LAST CPU USAGE RESET IN SECONDS:                          0.016509
369        -------------------------------------------------------------------------------
370
371    In the above example, the system did something for roughly 15 seconds when the
372    first report was generated.  The ``cpuuse -r`` and ``cpuuse`` commands were
[bf61a8b]373    pasted from another window so were executed with no gap between.  In the
[8363c3d]374    second report, only the ``SHLL`` thread has run since the CPU Usage was
375    reset.  It has consumed approximately 16.509 milliseconds of CPU time
[bf61a8b]376    processing the two commands and generating the output.
[8ca13ed]377
378.. index:: CONFIGURE_SHELL_NO_COMMAND_CPUUSE
379.. index:: CONFIGURE_SHELL_COMMAND_CPUUSE
380
[bf61a8b]381CONFIGURATION:
382    This command is included in the default shell command set.  When building a
383    custom command set, define ``CONFIGURE_SHELL_COMMAND_CPUUSE`` to have this
384    command included.
[8ca13ed]385
[bf61a8b]386    This command can be excluded from the shell command set by defining
387    ``CONFIGURE_SHELL_NO_COMMAND_CPUUSE`` when all shell commands have been
388    configured.
[8ca13ed]389
390.. index:: rtems_shell_rtems_main_cpuuse
391
[bf61a8b]392PROGRAMMING INFORMATION:
393    The ``cpuuse`` is implemented by a C language function which has the following
394    prototype:
395
396    .. code-block:: c
[35bcd00]397
[bf61a8b]398        int rtems_shell_rtems_main_cpuuse(
399           int    argc,
400           char **argv
401        );
[8ca13ed]402
[bf61a8b]403    The configuration structure for the ``cpuuse`` has the following prototype:
[8ca13ed]404
[bf61a8b]405    .. code-block:: c
[35bcd00]406
[bf61a8b]407        extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
[8ca13ed]408
[bf61a8b]409.. raw:: latex
410
411   \clearpage
[8ca13ed]412
[35bcd00]413.. _stackuse:
414
[8ca13ed]415stackuse - print per thread stack usage
416---------------------------------------
417.. index:: stackuse
418
[bf61a8b]419SYNOPSYS:
420    .. code-block:: shell
[8ca13ed]421
[bf61a8b]422        stackuse
[8ca13ed]423
[bf61a8b]424DESCRIPTION:
425    This command prints a Stack Usage Report for all of the tasks and threads
426    in the system.  On systems which support it, the usage of the interrupt
427    stack is also included in the report.
[8ca13ed]428
[bf61a8b]429EXIT STATUS:
430    This command always succeeds and returns 0.
[8ca13ed]431
[bf61a8b]432NOTES:
433    The ``CONFIGURE_STACK_CHECKER_ENABLED`` ``confdefs.h`` constant must be
434    defined when the application is configured for this command to have any
435    information to report.
[8ca13ed]436
[bf61a8b]437EXAMPLES:
438    The following is an example of how to use ``stackuse``:
[8ca13ed]439
[bf61a8b]440    .. code-block:: shell
[8ca13ed]441
[8363c3d]442        [/] # stackuse
443                                     STACK USAGE BY THREAD
444        ID         NAME                  LOW        HIGH       CURRENT    AVAIL  USED
445        0x09010001 IDLE                  0x03559960 0x03564055 0x03563728   4080    584
446        0x0a010001 UI1                   0x03564664 0x03597431 0x03596976  32752   4168
447        0x0a010002 BSWP                  0x03714576 0x03718671 0x03718408   4080    564
448        0x0a010003 BRDA                  0x03718680 0x03722775 0x03722480   4080    596
449        0x0a010004 MDIA                  0x03722808 0x03755575 0x03755288  32752    588
450        0x0a010005 TIME                  0x03755664 0x03788431 0x03788168  32752   1448
451        0x0a010006 IRQS                  0x03788440 0x03821207 0x03820952  32752    608
452        0x0a010007 swi1: netisr 0        0x03896880 0x03929647 0x03929376  32752    820
453        0x0a010008 kqueue_ctx task       0x03929872 0x03962639 0x03962392  32752    580
454        0x0a010009 swi5: fast task       0x03963088 0x03995855 0x03995584  32752    572
455        0x0a01000a thread taskq          0x03996080 0x04028847 0x04028600  32752    548
456        0x0a01000b swi6: task queu       0x04029296 0x04062063 0x04061792  32752   1364
457        0x0a01000c DHCP                  0x04250192 0x04258383 0x04257288   8176   2764
458        0x0a01000d FTPa                  0x04258792 0x04266983 0x04265792   8176   1548
459        0x0a01000e FTPb                  0x04267120 0x04275311 0x04274120   8176   1496
460        0x0a01000f FTPc                  0x04275448 0x04283639 0x04282448   8176   1496
461        0x0a010010 FTPd                  0x04283776 0x04291967 0x04290776   8176   1496
462        0x0a010011 FTPD                  0x04292104 0x04296199 0x04295784   4080    772
463        0x0a010012 TNTD                  0x04297088 0x04329855 0x04329368  32752    804
464        0x0a010013 SHLL                  0x04329976 0x04346359 0x04344576  16368   3616
[8ca13ed]465
466.. index:: CONFIGURE_SHELL_NO_COMMAND_STACKUSE
467.. index:: CONFIGURE_SHELL_COMMAND_STACKUSE
468
[bf61a8b]469CONFIGURATION:
470    This command is included in the default shell command set.  When building a
471    custom command set, define ``CONFIGURE_SHELL_COMMAND_STACKUSE`` to have
472    this command included.
[8ca13ed]473
[bf61a8b]474    This command can be excluded from the shell command set by defining
475    ``CONFIGURE_SHELL_NO_COMMAND_STACKUSE`` when all shell commands have been
476    configured.
[8ca13ed]477
478.. index:: rtems_shell_rtems_main_stackuse
479
[bf61a8b]480PROGRAMMING INFORMATION:
481    The ``stackuse`` is implemented by a C language function which has the
482    following prototype:
[35bcd00]483
[bf61a8b]484    .. code-block:: c
[8ca13ed]485
[bf61a8b]486        int rtems_shell_rtems_main_stackuse(
487            int    argc,
488            char **argv
489        );
[8ca13ed]490
[bf61a8b]491    The configuration structure for the ``stackuse`` has the following prototype:
[35bcd00]492
[bf61a8b]493    .. code-block:: c
[8ca13ed]494
[bf61a8b]495        extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
496
497.. raw:: latex
498
499   \clearpage
[8ca13ed]500
[35bcd00]501.. _perioduse:
502
[8ca13ed]503perioduse - print or reset per period usage
504-------------------------------------------
505.. index:: perioduse
506
[bf61a8b]507SYNOPSYS:
508    .. code-block:: shell
509
510        perioduse [-r]
511
512DESCRIPTION:
513    This command may be used to print a statistics report on the rate monotonic
514    periods in the application or to reset the rate monotonic period usage
515    statistics. When invoked with the ``-r`` option, the usage statistics are
516    reset.
517
518EXIT STATUS:
519    This command returns 0 on success and non-zero if an error is encountered.
520
521NOTES:
522    The granularity of the timing information reported is dependent upon the
523    BSP and the manner in which RTEMS was built.  In the default RTEMS
524    configuration, if the BSP supports nanosecond granularity timestamps, then
525    the information reported will be highly accurate. Otherwise, the accuracy
526    of the information reported is limited by the clock tick quantum.
527
528EXAMPLES:
529    The following is an example of how to use ``perioduse``:
530
531    .. code-block:: shell
532
533        SHLL [/] $ perioduse
534        Period information by period
535        --- CPU times are in seconds ---
536        --- Wall times are in seconds ---
537        ID     OWNER COUNT MISSED          CPU TIME                  WALL TIME
538        MIN/MAX/AVG                MIN/MAX/AVG
539        0x42010001 TA1    502      0 0:000039/0:042650/0:004158 0:000039/0:020118/0:002848
540        0x42010002 TA2    502      0 0:000041/0:042657/0:004309 0:000041/0:020116/0:002848
541        0x42010003 TA3    501      0 0:000041/0:041564/0:003653 0:000041/0:020003/0:002814
542        0x42010004 TA4    501      0 0:000043/0:044075/0:004911 0:000043/0:020004/0:002814
543        0x42010005 TA5     10      0 0:000065/0:005413/0:002739 0:000065/1:000457/0:041058
544        MIN/MAX/AVG                MIN/MAX/AVG
545        SHLL [/] $ perioduse -r
546        Resetting Period Usage information
547        SHLL [/] $ perioduse
548        --- CPU times are in seconds ---
549        --- Wall times are in seconds ---
550        ID     OWNER COUNT MISSED          CPU TIME                  WALL TIME
551        MIN/MAX/AVG                MIN/MAX/AVG
552        0x42010001 TA1      0      0
553        0x42010002 TA2      0      0
554        0x42010003 TA3      0      0
555        0x42010004 TA4      0      0
556        0x42010005 TA5      0      0
[8ca13ed]557
558.. index:: CONFIGURE_SHELL_NO_COMMAND_PERIODUSE
559.. index:: CONFIGURE_SHELL_COMMAND_PERIODUSE
560
[bf61a8b]561CONFIGURATION:
562    This command is included in the default shell command set.  When building a
563    custom command set, define ``CONFIGURE_SHELL_COMMAND_PERIODUSE`` to have
564    this command included.
[8ca13ed]565
[bf61a8b]566    This command can be excluded from the shell command set by defining
567    ``CONFIGURE_SHELL_NO_COMMAND_PERIODUSE`` when all shell commands have been
568    configured.
[8ca13ed]569
570.. index:: rtems_shell_rtems_main_perioduse
571
[bf61a8b]572PROGRAMMING INFORMATION:
573    The ``perioduse`` is implemented by a C language function which has the
574    following prototype:
[35bcd00]575
[bf61a8b]576    .. code-block:: c
[8ca13ed]577
[bf61a8b]578        int rtems_shell_rtems_main_perioduse(
579            int    argc,
580            char **argv
581        );
[8ca13ed]582
[bf61a8b]583    The configuration structure for the ``perioduse`` has the following prototype:
[35bcd00]584
[bf61a8b]585    .. code-block:: c
[8ca13ed]586
[bf61a8b]587        extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
588
589.. raw:: latex
590
591   \clearpage
[8ca13ed]592
[35bcd00]593.. _profreport:
594
[8ca13ed]595profreport - print a profiling report
596-------------------------------------
597.. index:: profreport
598
[bf61a8b]599SYNOPSYS:
600    .. code-block:: shell
601
602        profreport
603
604DESCRIPTION:
605    This command may be used to print a profiling report if profiling is built
606    into the RTEMS kernel.
607
608EXIT STATUS:
609    This command returns 0.
610
611NOTES:
612    Profiling must be enabled at build configuration time to get profiling
613    information.
614
615EXAMPLES:
616    The following is an example of how to use ``profreport``:
617
618    .. code-block:: shell
619
620        SHLL [/] $ profreport
621        <ProfilingReport name="Shell">
622        <PerCPUProfilingReport processorIndex="0">
623        <MaxThreadDispatchDisabledTime unit="ns">10447</MaxThreadDispatchDisabledTime>
624        <MeanThreadDispatchDisabledTime unit="ns">2</MeanThreadDispatchDisabledTime>
625        <TotalThreadDispatchDisabledTime unit="ns">195926627</TotalThreadDispatchDisabledTime>
626        <ThreadDispatchDisabledCount>77908688</ThreadDispatchDisabledCount>
627        <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
628        <MaxInterruptTime unit="ns">688</MaxInterruptTime>
629        <MeanInterruptTime unit="ns">127</MeanInterruptTime>
630        <TotalInterruptTime unit="ns">282651157</TotalInterruptTime>
631        <InterruptCount>2215855</InterruptCount>
632        </PerCPUProfilingReport>
633        <PerCPUProfilingReport processorIndex="1">
634        <MaxThreadDispatchDisabledTime unit="ns">9053</MaxThreadDispatchDisabledTime>
635        <MeanThreadDispatchDisabledTime unit="ns">41</MeanThreadDispatchDisabledTime>
636        <TotalThreadDispatchDisabledTime unit="ns">3053830335</TotalThreadDispatchDisabledTime>
637        <ThreadDispatchDisabledCount>73334202</ThreadDispatchDisabledCount>
638        <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
639        <MaxInterruptTime unit="ns">57</MaxInterruptTime>
640        <MeanInterruptTime unit="ns">35</MeanInterruptTime>
641        <TotalInterruptTime unit="ns">76980203</TotalInterruptTime>
642        <InterruptCount>2141179</InterruptCount>
643        </PerCPUProfilingReport>
644        <SMPLockProfilingReport name="SMP lock stats">
645        <MaxAcquireTime unit="ns">608</MaxAcquireTime>
646        <MaxSectionTime unit="ns">1387</MaxSectionTime>
647        <MeanAcquireTime unit="ns">112</MeanAcquireTime>
648        <MeanSectionTime unit="ns">338</MeanSectionTime>
649        <TotalAcquireTime unit="ns">119031</TotalAcquireTime>
650        <TotalSectionTime unit="ns">357222</TotalSectionTime>
651        <UsageCount>1055</UsageCount>
652        <ContentionCount initialQueueLength="0">1055</ContentionCount>
653        <ContentionCount initialQueueLength="1">0</ContentionCount>
654        <ContentionCount initialQueueLength="2">0</ContentionCount>
655        <ContentionCount initialQueueLength="3">0</ContentionCount>
656        </SMPLockProfilingReport>
657        <SMPLockProfilingReport name="Giant">
658        <MaxAcquireTime unit="ns">4186</MaxAcquireTime>
659        <MaxSectionTime unit="ns">7575</MaxSectionTime>
660        <MeanAcquireTime unit="ns">160</MeanAcquireTime>
661        <MeanSectionTime unit="ns">183</MeanSectionTime>
662        <TotalAcquireTime unit="ns">1772793111</TotalAcquireTime>
663        <TotalSectionTime unit="ns">2029733879</TotalSectionTime>
664        <UsageCount>11039140</UsageCount>
665        <ContentionCount initialQueueLength="0">11037655</ContentionCount>
666        <ContentionCount initialQueueLength="1">1485</ContentionCount>
667        <ContentionCount initialQueueLength="2">0</ContentionCount>
668        <ContentionCount initialQueueLength="3">0</ContentionCount>
669        </SMPLockProfilingReport>
670        </ProfilingReport>
[8ca13ed]671
672.. index:: CONFIGURE_SHELL_NO_COMMAND_PROFREPORT
673.. index:: CONFIGURE_SHELL_COMMAND_PROFREPORT
674
[bf61a8b]675CONFIGURATION:
676    When building a custom command set, define
677    ``CONFIGURE_SHELL_COMMAND_PROFREPORT`` to have this command included.
678
679    This command can be excluded from the shell command set by defining
680    ``CONFIGURE_SHELL_NO_COMMAND_PROFREPORT`` when all shell commands have been
681    configured.
[8ca13ed]682
[bf61a8b]683PROGRAMMING INFORMATION:
684    The configuration structure for the ``profreport`` has the following
685    prototype:
[8ca13ed]686
[bf61a8b]687    .. code-block:: c
[8ca13ed]688
[bf61a8b]689        extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command;
[35bcd00]690
[bf61a8b]691.. raw:: latex
[8ca13ed]692
[bf61a8b]693   \clearpage
[8ca13ed]694
[35bcd00]695.. _wkspace:
696
[8ca13ed]697wkspace - display information on executive workspace
698----------------------------------------------------
699.. index:: wkspace
700
[bf61a8b]701SYNOPSYS:
702    .. code-block:: shell
[8ca13ed]703
[bf61a8b]704        wkspace
[8ca13ed]705
[bf61a8b]706DESCRIPTION:
707    This command prints information on the current state of the RTEMS Executive
708    Workspace reported.  This includes the following information:
[8ca13ed]709
[bf61a8b]710    - Number of free blocks
[8ca13ed]711
[bf61a8b]712    - Largest free block
[8ca13ed]713
[bf61a8b]714    - Total bytes free
[8ca13ed]715
[bf61a8b]716    - Number of used blocks
[8ca13ed]717
[bf61a8b]718    - Largest used block
[8ca13ed]719
[bf61a8b]720    - Total bytes used
[8ca13ed]721
[bf61a8b]722EXIT STATUS:
723    This command always succeeds and returns 0.
[8ca13ed]724
[bf61a8b]725NOTES:
726    NONE
[8ca13ed]727
[bf61a8b]728EXAMPLES:
729    The following is an example of how to use ``wkspace``:
[8ca13ed]730
[bf61a8b]731    .. code-block:: shell
[8ca13ed]732
[bf61a8b]733        SHLL [/] $ wkspace
734        Number of free blocks: 1
735        Largest free block:    132336
736        Total bytes free:      132336
737        Number of used blocks: 36
738        Largest used block:    16408
739        Total bytes used:      55344
[8ca13ed]740
741.. index:: CONFIGURE_SHELL_NO_COMMAND_WKSPACE
742.. index:: CONFIGURE_SHELL_COMMAND_WKSPACE
743
[bf61a8b]744CONFIGURATION:
745    This command is included in the default shell command set.  When building a
746    custom command set, define ``CONFIGURE_SHELL_COMMAND_WKSPACE`` to have this
747    command included.
[8ca13ed]748
[bf61a8b]749    This command can be excluded from the shell command set by defining
750    ``CONFIGURE_SHELL_NO_COMMAND_WKSPACE`` when all shell commands have been
751    configured.
[8ca13ed]752
753.. index:: rtems_shell_rtems_main_wkspace
754
[bf61a8b]755PROGRAMMING INFORMATION:
756    The ``wkspace`` is implemented by a C language function which has the
757    following prototype:
[35bcd00]758
[bf61a8b]759    .. code-block:: c
[8ca13ed]760
[bf61a8b]761        int rtems_shell_rtems_main_wkspace(
762            int    argc,
763            char **argv
764        );
[8ca13ed]765
[bf61a8b]766    The configuration structure for the ``wkspace`` has the following prototype:
[35bcd00]767
[bf61a8b]768    .. code-block:: c
[8ca13ed]769
[bf61a8b]770        extern rtems_shell_cmd_t rtems_shell_WKSPACE_Command;
771
772.. raw:: latex
773
774   \clearpage
[8ca13ed]775
[35bcd00]776.. _config:
777
[8ca13ed]778config - show the system configuration.
779---------------------------------------
780.. index:: config
781
[bf61a8b]782SYNOPSYS:
783    .. code-block:: shell
[8ca13ed]784
[bf61a8b]785        config
[8ca13ed]786
[bf61a8b]787DESCRIPTION:
788    This command display information about the RTEMS Configuration.
[8ca13ed]789
[bf61a8b]790EXIT STATUS:
791    This command always succeeds and returns 0.
[8ca13ed]792
[bf61a8b]793NOTES:
794    At this time, it does not report every configuration parameter.  This is an
795    area in which user submissions or sponsorship of a developer would be
796    appreciated.
[8ca13ed]797
[bf61a8b]798EXAMPLES:
799    The following is an example of how to use ``config``:
[8ca13ed]800
[bf61a8b]801    .. code-block:: shell
[8ca13ed]802
[bf61a8b]803        SHLL [/] $ config
804        INITIAL (startup) Configuration Info
[8ca13ed]805
[bf61a8b]806        WORKSPACE      start: 0x23d22e0;  size: 0x2dd20
807        TIME           usec/tick: 10000;  tick/timeslice: 50;  tick/sec: 100
808        MAXIMUMS       tasks: 20;  timers: 0;  sems: 50;  que's: 20;  ext's: 1
809        partitions: 0;  regions: 0;  ports: 0;  periods: 0
[8ca13ed]810
811.. index:: CONFIGURE_SHELL_NO_COMMAND_CONFIG
812.. index:: CONFIGURE_SHELL_COMMAND_CONFIG
813
[bf61a8b]814CONFIGURATION:
815    This command is included in the default shell command set.  When building a
816    custom command set, define ``CONFIGURE_SHELL_COMMAND_CONFIG`` to have this
817    command included.
[8ca13ed]818
[bf61a8b]819    This command can be excluded from the shell command set by defining
820    ``CONFIGURE_SHELL_NO_COMMAND_CONFIG`` when all shell commands have been
821    configured.
[8ca13ed]822
823.. index:: rtems_shell_rtems_main_config
824
[bf61a8b]825PROGRAMMING INFORMATION:
826    The ``config`` is implemented by a C language function which has the
827    following prototype:
828
829    .. code-block:: c
[35bcd00]830
[bf61a8b]831        int rtems_shell_rtems_main_config(
832            int    argc,
833            char **argv
834        );
[8ca13ed]835
[bf61a8b]836    The configuration structure for the ``config`` has the following prototype:
[8ca13ed]837
[bf61a8b]838    .. code-block:: c
[35bcd00]839
[bf61a8b]840        extern rtems_shell_cmd_t rtems_shell_CONFIG_Command;
[8ca13ed]841
[bf61a8b]842.. raw:: latex
843
844   \clearpage
[8ca13ed]845
[35bcd00]846.. _itask:
847
[8ca13ed]848itask - list init tasks for the system
849--------------------------------------
850.. index:: itask
851
[bf61a8b]852SYNOPSYS:
853    .. code-block:: shell
[8ca13ed]854
[bf61a8b]855        itask
[8ca13ed]856
[bf61a8b]857DESCRIPTION:
858    This command prints a report on the set of initialization tasks and threads
859    in the system.
[8ca13ed]860
[bf61a8b]861EXIT STATUS:
862    This command always succeeds and returns 0.
[8ca13ed]863
[bf61a8b]864NOTES:
865    At this time, it includes only Classic API Initialization Tasks.  This is an
866    area in which user submissions or sponsorship of a developer would be
867    appreciated.
[8ca13ed]868
[bf61a8b]869EXAMPLES:
870    The following is an example of how to use ``itask``:
[8ca13ed]871
[bf61a8b]872    .. code-block:: shell
[8ca13ed]873
[bf61a8b]874        SHLL [/] $ itask
875        #    NAME   ENTRY        ARGUMENT    PRIO   MODES  ATTRIBUTES   STACK SIZE
876        ------------------------------------------------------------------------------
877        0   UI1    [0x2002258] 0 [0x0]        1    nP      DEFAULT     4096 [0x1000]
[8ca13ed]878
879.. index:: CONFIGURE_SHELL_NO_COMMAND_ITASK
880.. index:: CONFIGURE_SHELL_COMMAND_ITASK
881
[bf61a8b]882CONFIGURATION:
883    This command is included in the default shell command set.  When building a
884    custom command set, define ``CONFIGURE_SHELL_COMMAND_ITASK`` to have this
885    command included.
[8ca13ed]886
[bf61a8b]887    This command can be excluded from the shell command set by defining
888    ``CONFIGURE_SHELL_NO_COMMAND_ITASK`` when all shell commands have been
889    configured.
[8ca13ed]890
891.. index:: rtems_shell_rtems_main_itask
892
[bf61a8b]893PROGRAMMING INFORMATION:
894    The ``itask`` is implemented by a C language function which has the
895    following prototype:
896
897    .. code-block:: c
898
899        int rtems_shell_rtems_main_itask(
900            int    argc,
901            char **argv
902        );
[35bcd00]903
[bf61a8b]904    The configuration structure for the ``itask`` has the following prototype:
[8ca13ed]905
[bf61a8b]906    .. code-block:: c
[8ca13ed]907
[bf61a8b]908        extern rtems_shell_cmd_t rtems_shell_ITASK_Command;
[35bcd00]909
[bf61a8b]910.. raw:: latex
[8ca13ed]911
[bf61a8b]912   \clearpage
[8ca13ed]913
[35bcd00]914.. _extension:
915
[8ca13ed]916extension - display information about extensions
917------------------------------------------------
918.. index:: extension
919
[bf61a8b]920SYNOPSYS:
921    .. code-block:: shell
[8ca13ed]922
[bf61a8b]923        extension [id [id ...]]
[8ca13ed]924
[bf61a8b]925DESCRIPTION:
926    When invoked with no arguments, this command prints information on the set
927    of User Extensions currently active in the system.
[8ca13ed]928
[bf61a8b]929    If invoked with a set of ids as arguments, then just those objects are
930    included in the information printed.
[8ca13ed]931
[bf61a8b]932EXIT STATUS:
933    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]934
[bf61a8b]935NOTES:
936    NONE
[8ca13ed]937
[bf61a8b]938EXAMPLES:
939    The following is an example of using the ``extension`` command on a system
940    with no user extensions.
[8ca13ed]941
[bf61a8b]942    .. code-block:: shell
[35bcd00]943
[bf61a8b]944        SHLL [/] $ extension
945        ID       NAME
946        ------------------------------------------------------------------------------
[8ca13ed]947
948.. index:: CONFIGURE_SHELL_NO_COMMAND_EXTENSION
949.. index:: CONFIGURE_SHELL_COMMAND_EXTENSION
950
[bf61a8b]951CONFIGURATION:
952    This command is included in the default shell command set.  When building a
953    custom command set, define ``CONFIGURE_SHELL_COMMAND_EXTENSION`` to have
954    this command included.
[8ca13ed]955
[bf61a8b]956    This command can be excluded from the shell command set by defining
957    ``CONFIGURE_SHELL_NO_COMMAND_EXTENSION`` when all shell commands have been
958    configured.
[8ca13ed]959
960.. index:: rtems_shell_rtems_main_extension
961
[bf61a8b]962PROGRAMMING INFORMATION:
963    The ``extension`` is implemented by a C language function which has the
964    following prototype:
965
966    .. code-block:: c
[35bcd00]967
[bf61a8b]968        int rtems_shell_rtems_main_extension(
969            int    argc,
970            char **argv
971        );
[8ca13ed]972
[bf61a8b]973    The configuration structure for the ``extension`` has the following prototype:
[8ca13ed]974
[bf61a8b]975    .. code-block:: c
[35bcd00]976
[bf61a8b]977        extern rtems_shell_cmd_t rtems_shell_EXTENSION_Command;
[8ca13ed]978
[bf61a8b]979.. raw:: latex
980
981   \clearpage
[8ca13ed]982
[35bcd00]983.. _task:
984
[8ca13ed]985task - display information about tasks
986--------------------------------------
987.. index:: task
988
[bf61a8b]989SYNOPSYS:
990    .. code-block:: shell
[8ca13ed]991
[bf61a8b]992        task [id [id ...]]
[8ca13ed]993
[bf61a8b]994DESCRIPTION:
995    When invoked with no arguments, this command prints information on the set
996    of Classic API Tasks currently active in the system.
[8ca13ed]997
[bf61a8b]998    If invoked with a set of ids as arguments, then just those objects are
999    included in the information printed.
[8ca13ed]1000
[bf61a8b]1001EXIT STATUS:
1002    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1003
[bf61a8b]1004NOTES:
1005    NONE
[8ca13ed]1006
[bf61a8b]1007EXAMPLES:
1008    The following is an example of how to use the ``task`` on an application
1009    with just two Classic API tasks:
[8ca13ed]1010
[bf61a8b]1011    .. code-block:: shell
[8ca13ed]1012
[e6cb6b7]1013        SHLL [/] # task
[4e85468]1014        ID       NAME                 SHED PRI STATE  MODES    EVENTS WAITINFO
[bf61a8b]1015        ------------------------------------------------------------------------------
[4e85468]1016        0a010001 UI1                  UPD  254 EV     P:T:nA   NONE
1017        0a010002 SHLL                 UPD  100 READY  P:T:nA   NONE
[8ca13ed]1018
1019.. index:: CONFIGURE_SHELL_NO_COMMAND_TASK
1020.. index:: CONFIGURE_SHELL_COMMAND_TASK
1021
[bf61a8b]1022CONFIGURATION:
1023    This command is included in the default shell command set.  When building a
1024    custom command set, define ``CONFIGURE_SHELL_COMMAND_TASK`` to have this
1025    command included.
[8ca13ed]1026
[bf61a8b]1027    This command can be excluded from the shell command set by defining
1028    ``CONFIGURE_SHELL_NO_COMMAND_TASK`` when all shell commands have been
1029    configured.
[8ca13ed]1030
1031.. index:: rtems_shell_rtems_main_task
1032
[bf61a8b]1033PROGRAMMING INFORMATION:
1034    The ``task`` is implemented by a C language function which has the
1035    following prototype:
[35bcd00]1036
[bf61a8b]1037    .. code-block:: shell
[8ca13ed]1038
[bf61a8b]1039        int rtems_shell_rtems_main_task(
1040            int    argc,
1041            char **argv
1042        );
[8ca13ed]1043
[bf61a8b]1044    The configuration structure for the ``task`` has the following prototype:
[35bcd00]1045
[bf61a8b]1046    .. code-block:: c
[8ca13ed]1047
[bf61a8b]1048        extern rtems_shell_cmd_t rtems_shell_TASK_Command;
1049
1050.. raw:: latex
1051
1052   \clearpage
[8ca13ed]1053
[35bcd00]1054.. _queue:
1055
[8ca13ed]1056queue - display information about message queues
1057------------------------------------------------
1058.. index:: queue
1059
[bf61a8b]1060SYNOPSYS:
1061    .. code-block:: shell
[8ca13ed]1062
[bf61a8b]1063        queue [id [id ... ]]
[8ca13ed]1064
[bf61a8b]1065DESCRIPTION:
1066    When invoked with no arguments, this command prints information on the set
1067    of Classic API Message Queues currently active in the system.
[8ca13ed]1068
[bf61a8b]1069    If invoked with a set of ids as arguments, then just those objects are
1070    included in the information printed.
[8ca13ed]1071
[bf61a8b]1072EXIT STATUS:
1073    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1074
[bf61a8b]1075NOTES:
1076    NONE
[8ca13ed]1077
[bf61a8b]1078EXAMPLES:
1079    The following is an example of using the ``queue`` command on a system with
1080    no Classic API Message Queues.
[8ca13ed]1081
[bf61a8b]1082    .. code-block:: shell
[8ca13ed]1083
[bf61a8b]1084        SHLL [/] $ queue
1085        ID       NAME   ATTRIBUTES   PEND   MAXPEND  MAXSIZE
1086        ------------------------------------------------------------------------------
[8ca13ed]1087
1088.. index:: CONFIGURE_SHELL_NO_COMMAND_QUEUE
1089.. index:: CONFIGURE_SHELL_COMMAND_QUEUE
1090
[bf61a8b]1091CONFIGURATION:
1092    This command is included in the default shell command set.  When building a
1093    custom command set, define ``CONFIGURE_SHELL_COMMAND_QUEUE`` to have this
1094    command included.
[8ca13ed]1095
[bf61a8b]1096    This command can be excluded from the shell command set by defining
1097    ``CONFIGURE_SHELL_NO_COMMAND_QUEUE`` when all shell commands have been
1098    configured.
[8ca13ed]1099
1100.. index:: rtems_shell_rtems_main_queue
1101
[bf61a8b]1102PROGRAMMING INFORMATION:
1103    The ``queue`` is implemented by a C language function which has the
1104    following prototype:
1105
1106    .. code-block:: c
[35bcd00]1107
[bf61a8b]1108        int rtems_shell_rtems_main_queue(
1109            int    argc,
1110            char **argv
1111        );
[8ca13ed]1112
[bf61a8b]1113    The configuration structure for the ``queue`` has the following prototype:
[8ca13ed]1114
[bf61a8b]1115    .. code-block:: c
[35bcd00]1116
[bf61a8b]1117        extern rtems_shell_cmd_t rtems_shell_QUEUE_Command;
[8ca13ed]1118
[bf61a8b]1119.. raw:: latex
1120
1121   \clearpage
[8ca13ed]1122
[35bcd00]1123.. _sema:
1124
[8ca13ed]1125sema - display information about semaphores
1126-------------------------------------------
1127.. index:: sema
1128
[bf61a8b]1129SYNOPSYS:
1130    .. code-block:: shell
[8ca13ed]1131
[bf61a8b]1132        sema [id [id ... ]]
[8ca13ed]1133
[bf61a8b]1134DESCRIPTION:
1135    When invoked with no arguments, this command prints information on the set
1136    of Classic API Semaphores currently active in the system.
[8ca13ed]1137
[bf61a8b]1138    If invoked with a set of objects ids as arguments, then just those objects
1139    are included in the information printed.
[8ca13ed]1140
[bf61a8b]1141EXIT STATUS:
1142    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1143
[bf61a8b]1144NOTES:
1145    NONE
[8ca13ed]1146
[bf61a8b]1147EXAMPLES:
1148    The following is an example of how to use ``sema``:
[8ca13ed]1149
[bf61a8b]1150    .. code-block:: shell
[35bcd00]1151
[bf61a8b]1152        SHLL [/] $ sema
1153        ID       NAME   ATTR        PRICEIL CURR_CNT HOLDID
1154        ------------------------------------------------------------------------------
1155        1a010001   LBIO   PR:BI:IN      0        1     00000000
1156        1a010002   TRmi   PR:BI:IN      0        1     00000000
1157        1a010003   LBI00  PR:BI:IN      0        1     00000000
1158        1a010004   TRia   PR:BI:IN      0        1     00000000
1159        1a010005   TRoa   PR:BI:IN      0        1     00000000
1160        1a010006   TRxa   <assoc.c: BAD NAME>   0    0 09010001
1161        1a010007   LBI01  PR:BI:IN      0        1     00000000
1162        1a010008   LBI02  PR:BI:IN      0        1     00000000
[8ca13ed]1163
1164.. index:: CONFIGURE_SHELL_NO_COMMAND_SEMA
1165.. index:: CONFIGURE_SHELL_COMMAND_SEMA
1166
[bf61a8b]1167CONFIGURATION:
1168    This command is included in the default shell command set.  When building a
1169    custom command set, define ``CONFIGURE_SHELL_COMMAND_SEMA`` to have this
1170    command included.
[8ca13ed]1171
[bf61a8b]1172    This command can be excluded from the shell command set by defining
1173    ``CONFIGURE_SHELL_NO_COMMAND_SEMA`` when all shell commands have been
1174    configured.
[8ca13ed]1175
1176.. index:: rtems_shell_rtems_main_sema
1177
[bf61a8b]1178PROGRAMMING INFORMATION:
1179    The ``sema`` is implemented by a C language function which has the following
1180    prototype:
1181
1182    .. code-block:: c
[35bcd00]1183
[bf61a8b]1184        int rtems_shell_rtems_main_sema(
1185            int    argc,
1186            char **argv
1187        );
[8ca13ed]1188
[bf61a8b]1189    The configuration structure for the ``sema`` has the following prototype:
[8ca13ed]1190
[bf61a8b]1191    .. code-block:: c
[35bcd00]1192
[bf61a8b]1193        extern rtems_shell_cmd_t rtems_shell_SEMA_Command;
[8ca13ed]1194
[bf61a8b]1195.. raw:: latex
1196
1197   \clearpage
[8ca13ed]1198
[35bcd00]1199.. _region:
1200
[8ca13ed]1201region - display information about regions
1202------------------------------------------
1203.. index:: region
1204
[bf61a8b]1205SYNOPSYS:
1206    .. code-block:: shell
[8ca13ed]1207
[bf61a8b]1208        region [id [id ... ]]
[8ca13ed]1209
[bf61a8b]1210DESCRIPTION:
1211    When invoked with no arguments, this command prints information on the set
1212    of Classic API Regions currently active in the system.
[8ca13ed]1213
[bf61a8b]1214    If invoked with a set of object ids as arguments, then just those object
1215    are included in the information printed.
[8ca13ed]1216
[bf61a8b]1217EXIT STATUS:
1218    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1219
[bf61a8b]1220NOTES:
1221    NONE
[8ca13ed]1222
[bf61a8b]1223EXAMPLES:
1224    The following is an example of using the ``region`` command on a system
1225    with no user extensions.
[8ca13ed]1226
[bf61a8b]1227    .. code-block:: shell
[8ca13ed]1228
[bf61a8b]1229        SHLL [/] $ region
1230        ID       NAME   ATTR        STARTADDR LENGTH    PAGE_SIZE USED_BLOCKS
1231        ------------------------------------------------------------------------------
[8ca13ed]1232
1233.. index:: CONFIGURE_SHELL_NO_COMMAND_REGION
1234.. index:: CONFIGURE_SHELL_COMMAND_REGION
1235
[bf61a8b]1236CONFIGURATION:
1237    This command is included in the default shell command set.  When building a
1238    custom command set, define ``CONFIGURE_SHELL_COMMAND_REGION`` to have this
1239    command included.
[8ca13ed]1240
[bf61a8b]1241    This command can be excluded from the shell command set by defining
1242    ``CONFIGURE_SHELL_NO_COMMAND_REGION`` when all shell commands have been
1243    configured.
[8ca13ed]1244
1245.. index:: rtems_shell_rtems_main_region
1246
[bf61a8b]1247PROGRAMMING INFORMATION:
1248    The ``region`` is implemented by a C language function which has the
1249    following prototype:
1250
1251    .. code-block:: c
1252
1253        int rtems_shell_rtems_main_region(
1254            int    argc,
1255            char **argv
1256        );
[35bcd00]1257
[bf61a8b]1258    The configuration structure for the ``region`` has the following prototype:
[8ca13ed]1259
[bf61a8b]1260    .. code-block:: c
[8ca13ed]1261
[bf61a8b]1262        extern rtems_shell_cmd_t rtems_shell_REGION_Command;
[35bcd00]1263
[bf61a8b]1264.. raw:: latex
[8ca13ed]1265
[bf61a8b]1266   \clearpage
[8ca13ed]1267
[35bcd00]1268.. _part:
1269
[8ca13ed]1270part - display information about partitions
1271-------------------------------------------
1272.. index:: part
1273
[bf61a8b]1274SYNOPSYS:
1275    .. code-block:: shell
[8ca13ed]1276
[bf61a8b]1277        part [id [id ... ]]
[8ca13ed]1278
[bf61a8b]1279DESCRIPTION:
1280    When invoked with no arguments, this command prints information on the set
1281    of Classic API Partitions currently active in the system.
[8ca13ed]1282
[bf61a8b]1283    If invoked with a set of object ids as arguments, then just those objects
1284    are included in the information printed.
[8ca13ed]1285
[bf61a8b]1286EXIT STATUS:
1287    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1288
[bf61a8b]1289NOTES:
1290    NONE
[8ca13ed]1291
[bf61a8b]1292EXAMPLES:
1293    The following is an example of using the ``part`` command on a system with
1294    no user extensions.
[8ca13ed]1295
[bf61a8b]1296    .. code-block:: shell
[8ca13ed]1297
[bf61a8b]1298        SHLL [/] $ part
1299        ID       NAME   ATTR        STARTADDR LENGTH    BUF_SIZE  USED_BLOCKS
1300        ------------------------------------------------------------------------------
[8ca13ed]1301
1302.. index:: CONFIGURE_SHELL_NO_COMMAND_PART
1303.. index:: CONFIGURE_SHELL_COMMAND_PART
1304
[bf61a8b]1305CONFIGURATION:
1306    This command is included in the default shell command set.  When building a
1307    custom command set, define ``CONFIGURE_SHELL_COMMAND_PART`` to have this
1308    command included.
[8ca13ed]1309
[bf61a8b]1310    This command can be excluded from the shell command set by defining
1311    ``CONFIGURE_SHELL_NO_COMMAND_PART`` when all shell commands have been
1312    configured.
[8ca13ed]1313
1314.. index:: rtems_shell_rtems_main_part
1315
[bf61a8b]1316PROGRAMMING INFORMATION:
1317    The ``part`` is implemented by a C language function which has the
1318    following prototype:
1319
1320    .. code-block:: c
[35bcd00]1321
[bf61a8b]1322        int rtems_shell_rtems_main_part(
1323            int    argc,
1324            char **argv
1325        );
[8ca13ed]1326
[bf61a8b]1327    The configuration structure for the ``part`` has the following prototype:
[8ca13ed]1328
[bf61a8b]1329    .. code-block:: c
[35bcd00]1330
[bf61a8b]1331        extern rtems_shell_cmd_t rtems_shell_PART_Command;
[8ca13ed]1332
[bf61a8b]1333.. raw:: latex
1334
1335   \clearpage
[8ca13ed]1336
[35bcd00]1337.. _object:
1338
[a1c7180]1339object - display information about RTEMS objects
[8ca13ed]1340------------------------------------------------
1341.. index:: object
1342
[bf61a8b]1343SYNOPSYS:
1344    .. code-block:: shell
[8ca13ed]1345
[bf61a8b]1346        object [id [id ...]]
[8ca13ed]1347
[bf61a8b]1348DESCRIPTION:
1349    When invoked with a set of object ids as arguments, then a report on those
1350    objects is printed.
[8ca13ed]1351
[bf61a8b]1352EXIT STATUS:
1353    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1354
[bf61a8b]1355NOTES:
1356    NONE
[8ca13ed]1357
[bf61a8b]1358EXAMPLES:
1359    The following is an example of how to use ``object``:
[8ca13ed]1360
[bf61a8b]1361    .. code-block:: shell
[8ca13ed]1362
[bf61a8b]1363        SHLL [/] $ object 0a010001 1a010002
1364        ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
1365        ------------------------------------------------------------------------------
1366        0a010001   UI1      1   SUSP   P:T:nA  NONE
1367        ID       NAME   ATTR        PRICEIL CURR_CNT HOLDID
1368        ------------------------------------------------------------------------------
1369        1a010002   TRmi   PR:BI:IN      0        1     00000000
[8ca13ed]1370
1371.. index:: CONFIGURE_SHELL_NO_COMMAND_OBJECT
1372.. index:: CONFIGURE_SHELL_COMMAND_OBJECT
1373
[bf61a8b]1374CONFIGURATION:
1375    This command is included in the default shell command set.  When building a
1376    custom command set, define ``CONFIGURE_SHELL_COMMAND_OBJECT`` to have this
1377    command included.
[8ca13ed]1378
[bf61a8b]1379    This command can be excluded from the shell command set by defining
1380    ``CONFIGURE_SHELL_NO_COMMAND_OBJECT`` when all shell commands have been
1381    configured.
[8ca13ed]1382
1383.. index:: rtems_shell_rtems_main_object
1384
[bf61a8b]1385PROGRAMMING INFORMATION:
1386    The ``object`` is implemented by a C language function which has the
1387    following prototype:
1388
1389    .. code-block:: c
1390
1391        int rtems_shell_rtems_main_object(
1392            int    argc,
1393            char **argv
1394        );
[35bcd00]1395
[bf61a8b]1396    The configuration structure for the ``object`` has the
1397    following prototype:
[8ca13ed]1398
[bf61a8b]1399    .. code-block:: c
[8ca13ed]1400
[bf61a8b]1401        extern rtems_shell_cmd_t rtems_shell_OBJECT_Command;
[35bcd00]1402
[bf61a8b]1403.. raw:: latex
[8ca13ed]1404
[bf61a8b]1405   \clearpage
[8ca13ed]1406
[35bcd00]1407.. _driver:
1408
[a1c7180]1409driver - display the RTEMS device driver table
[8ca13ed]1410----------------------------------------------
1411.. index:: driver
1412
[bf61a8b]1413SYNOPSYS:
1414    .. code-block:: shell
[8ca13ed]1415
[bf61a8b]1416        driver [major [major ...]]
[8ca13ed]1417
[bf61a8b]1418DESCRIPTION:
1419    When invoked with no arguments, this command prints information on the set
1420    of Device Drivers currently active in the system.
[8ca13ed]1421
[bf61a8b]1422    If invoked with a set of major numbers as arguments, then just those Device
1423    Drivers are included in the information printed.
[8ca13ed]1424
[bf61a8b]1425EXIT STATUS:
1426    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1427
[bf61a8b]1428NOTES:
1429    NONE
[8ca13ed]1430
[bf61a8b]1431EXAMPLES:
1432    The following is an example of how to use ``driver``:
[8ca13ed]1433
[bf61a8b]1434    .. code-block:: shell
[35bcd00]1435
[bf61a8b]1436        SHLL [/] $ driver
1437        Major      Entry points
1438        ------------------------------------------------------------------------------
1439        0          init: [0x200256c];  control: [0x20024c8]
1440        open: [0x2002518];  close: [0x2002504]
1441        read: [0x20024f0];  write: [0x20024dc]
1442        1          init: [0x20023fc];  control: [0x2002448]
1443        open: [0x0];  close: [0x0]
1444        read: [0x0];  write: [0x0]
1445        SHLL [/] $
[8ca13ed]1446
1447.. index:: CONFIGURE_SHELL_NO_COMMAND_DRIVER
1448.. index:: CONFIGURE_SHELL_COMMAND_DRIVER
1449
[bf61a8b]1450CONFIGURATION:
1451    This command is included in the default shell command set.  When building a
1452    custom command set, define ``CONFIGURE_SHELL_COMMAND_DRIVER`` to have this
1453    command included.
[8ca13ed]1454
[bf61a8b]1455    This command can be excluded from the shell command set by defining
1456    ``CONFIGURE_SHELL_NO_COMMAND_DRIVER`` when all shell commands have been
1457    configured.
[8ca13ed]1458
1459.. index:: rtems_shell_rtems_main_driver
1460
[bf61a8b]1461PROGRAMMING INFORMATION:
1462    The ``driver`` is implemented by a C language function which has the
1463    following prototype:
1464
1465    .. code-block:: c
[35bcd00]1466
[bf61a8b]1467        int rtems_shell_rtems_main_driver(
1468            int    argc,
1469            char **argv
1470        );
[8ca13ed]1471
[bf61a8b]1472    The configuration structure for the ``driver`` has the following prototype:
[8ca13ed]1473
[bf61a8b]1474    .. code-block:: c
[35bcd00]1475
[bf61a8b]1476        extern rtems_shell_cmd_t rtems_shell_DRIVER_Command;
[8ca13ed]1477
[bf61a8b]1478.. raw:: latex
1479
1480   \clearpage
[8ca13ed]1481
[35bcd00]1482.. _dname:
1483
[8ca13ed]1484dname - displays information about named drivers
1485------------------------------------------------
1486.. index:: dname
1487
[bf61a8b]1488SYNOPSYS:
1489    .. code-block:: shell
[8ca13ed]1490
[bf61a8b]1491        dname
[8ca13ed]1492
[bf61a8b]1493DESCRIPTION:
1494    WARNING! This command does not appear to work as of 27 February 2008.
[8ca13ed]1495
[bf61a8b]1496EXIT STATUS:
1497    This command returns 0 on success and non-zero if an error is encountered.
[8ca13ed]1498
[bf61a8b]1499NOTES:
1500    NONE
[35bcd00]1501
[bf61a8b]1502EXAMPLES:
1503    The following is an example of how to use ``dname``:
[8ca13ed]1504
[bf61a8b]1505    .. code-block:: shell
[8ca13ed]1506
[bf61a8b]1507        EXAMPLE_TBD
[8ca13ed]1508
1509.. index:: CONFIGURE_SHELL_NO_COMMAND_DNAME
1510.. index:: CONFIGURE_SHELL_COMMAND_DNAME
1511
[bf61a8b]1512CONFIGURATION:
1513    This command is included in the default shell command set.  When building a
1514    custom command set, define ``CONFIGURE_SHELL_COMMAND_DNAME`` to have this
1515    command included.
[8ca13ed]1516
[bf61a8b]1517    This command can be excluded from the shell command set by defining
1518    ``CONFIGURE_SHELL_NO_COMMAND_DNAME`` when all shell commands have been
1519    configured.
[8ca13ed]1520
1521.. index:: rtems_shell_rtems_main_dname
1522
[bf61a8b]1523PROGRAMMING INFORMATION:
1524    The ``dname`` is implemented by a C language function which has the
1525    following prototype:
1526
1527    .. code-block:: c
1528
1529        int rtems_shell_rtems_main_dname(
1530            int    argc,
1531            char **argv
1532        );
[35bcd00]1533
[bf61a8b]1534    The configuration structure for the ``dname`` has the following prototype:
[8ca13ed]1535
[bf61a8b]1536    .. code-block:: c
[8ca13ed]1537
[bf61a8b]1538        extern rtems_shell_cmd_t rtems_shell_DNAME_Command;
[35bcd00]1539
[bf61a8b]1540.. raw:: latex
[8ca13ed]1541
[bf61a8b]1542   \clearpage
[8ca13ed]1543
[35bcd00]1544.. _pthread:
1545
[8ca13ed]1546pthread - display information about POSIX threads
1547-------------------------------------------------
1548.. index:: pthread
1549
[bf61a8b]1550SYNOPSYS:
1551    .. code-block:: shell
[8ca13ed]1552
[bf61a8b]1553        pthread [id [id ...]]
[8ca13ed]1554
[bf61a8b]1555DESCRIPTION:
1556    When invoked with no arguments, this command prints information on the set
1557    of POSIX API threads currently active in the system.
[8ca13ed]1558
[bf61a8b]1559    If invoked with a set of ids as arguments, then just those objects are
1560    included in the information printed.
[8ca13ed]1561
[bf61a8b]1562EXIT STATUS:
1563    This command returns 0 on success and non-zero if an error is encountered.
[35bcd00]1564
[bf61a8b]1565NOTES:
1566    This command is only available when the POSIX API is configured.
[8ca13ed]1567
[bf61a8b]1568EXAMPLES:
1569    The following is an example of how to use the ``task`` on an application
1570    with four POSIX threads:
[8ca13ed]1571
[bf61a8b]1572    .. code-block:: shell
[8ca13ed]1573
[bf61a8b]1574        SHLL [/] $ pthread
1575        ID       NAME           PRI  STATE MODES   EVENTS    WAITID  WAITARG  NOTES
1576        ------------------------------------------------------------------------------
1577        0b010002   Main           133 READY  P:T:nA    NONE   43010001 0x7b1148
1578        0b010003   ISR            133 Wcvar  P:T:nA    NONE   43010003 0x7b1148
1579        0b01000c                  133 READY  P:T:nA    NONE   33010002 0x7b1148
1580        0b01000d                  133 Wmutex P:T:nA    NONE   33010002 0x7b1148
[8ca13ed]1581
[bf61a8b]1582CONFIGURATION:
1583    This command is part of the monitor commands which are always available in
1584    the shell.
[8ca13ed]1585
[bf61a8b]1586PROGRAMMING INFORMATION:
1587    This command is not directly available for invocation.
Note: See TracBrowser for help on using the repository browser.