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

4.115
Last change on this file since bf61a8b was bf61a8b, checked in by Chris Johns <chrisj@…>, on 11/08/16 at 10:33:20

shell: Update commands to use descriptions.

  • Property mode set to 100644
File size: 38.5 KB
Line 
1.. comment SPDX-License-Identifier: CC-BY-SA-4.0
2
3.. COMMENT: COPYRIGHT (c) 1988-2008.
4.. COMMENT: On-Line Applications Research Corporation (OAR).
5.. COMMENT: All rights reserved.
6
7RTEMS Specific Commands
8#######################
9
10Introduction
11============
12
13The RTEMS shell has the following RTEMS specific commands:
14
15- shutdown_ - Shutdown the system
16
17- cpuuse_ - print or reset per thread cpu usage
18
19- stackuse_ - print per thread stack usage
20
21- perioduse_ - print or reset per period usage
22
23- profreport_ - print a profiling report
24
25- wkspace_ - Display information on Executive Workspace
26
27- config_ - Show the system configuration.
28
29- itask_ - List init tasks for the system
30
31- extension_ - Display information about extensions
32
33- task_ - Display information about tasks
34
35- queue_ - Display information about message queues
36
37- sema_ - display information about semaphores
38
39- region_ - display information about regions
40
41- part_ - display information about partitions
42
43- object_ - Display information about RTEMS objects
44
45- driver_ - Display the RTEMS device driver table
46
47- dname_ - Displays information about named drivers
48
49- pthread_ - Displays information about POSIX threads
50
51Commands
52========
53
54This section details the RTEMS Specific Commands available.  A subsection is
55dedicated to each of the commands and describes the behavior and configuration
56of that command as well as providing an example usage.
57
58.. raw:: latex
59
60   \clearpage
61
62.. _shutdown:
63
64shutdown - Shutdown the system
65------------------------------
66.. index:: shutdown
67
68SYNOPSYS:
69    .. code-block:: shell
70
71        shutdown
72
73DESCRIPTION:
74    This command is used to shutdown the RTEMS application.
75
76EXIT STATUS:
77    This command does not return.
78
79NOTES:
80    NONE
81
82EXAMPLES:
83    The following is an example of how to use ``shutdown``:
84
85    .. code-block:: shell
86
87        SHLL [/] $ shutdown
88        System shutting down at user request
89
90    The user will not see another prompt and the system will shutdown.
91
92.. index:: CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN
93.. index:: CONFIGURE_SHELL_COMMAND_SHUTDOWN
94
95CONFIGURATION:
96    This command is included in the default shell command set.  When building a
97    custom command set, define ``CONFIGURE_SHELL_COMMAND_SHUTDOWN`` to have
98    this command included.
99
100    This command can be excluded from the shell command set by defining
101    ``CONFIGURE_SHELL_NO_COMMAND_SHUTDOWN`` when all shell commands have been
102    configured.
103
104PROGRAMMING INFORMATION:
105    The configuration structure for the ``shutdown`` has the following
106    prototype:
107
108    .. code-block:: c
109
110        extern rtems_shell_cmd_t rtems_shell_SHUTDOWN_Command;
111
112.. raw:: latex
113
114   \clearpage
115
116.. _cpuuse:
117
118cpuuse - print or reset per thread cpu usage
119--------------------------------------------
120.. index:: cpuuse
121
122SYNOPSYS:
123    .. code-block:: shell
124
125        cpuuse [-r]
126
127DESCRIPTION:
128    This command may be used to print a report on the per thread cpu usage or
129    to reset the per thread CPU usage statistics. When invoked with the ``-r``
130    option, the CPU usage statistics are reset.
131
132EXIT STATUS:
133    This command returns 0 on success and non-zero if an error is encountered.
134
135NOTES:
136    The granularity of the timing information reported is dependent upon the
137    BSP and the manner in which RTEMS was built.  In the default RTEMS
138    configuration, if the BSP supports nanosecond granularity timestamps, then
139    the information reported will be highly accurate. Otherwise, the accuracy
140    of the information reported is limited by the clock tick quantum.
141
142EXAMPLES:
143    The following is an example of how to use ``cpuuse``:
144
145    .. code-block:: shell
146
147        SHLL [/] $ cpuuse
148        CPU Usage by thread
149        ID            NAME         SECONDS   PERCENT
150        0x09010001   IDLE            49.745393   98.953
151        0x0a010001   UI1              0.000000    0.000
152        0x0a010002   SHLL             0.525928    1.046
153        Time since last CPU Usage reset 50.271321 seconds
154        SHLL [/] $ cpuuse -r
155        Resetting CPU Usage information
156        SHLL [/] $ cpuuse
157        CPU Usage by thread
158        ID            NAME         SECONDS   PERCENT
159        0x09010001   IDLE             0.000000    0.000
160        0x0a010001   UI1              0.000000    0.000
161        0x0a010002   SHLL             0.003092  100.000
162        Time since last CPU Usage reset 0.003092 seconds
163
164    In the above example, the system had set idle for nearly a minute when the
165    first report was generated.  The``cpuuse -r`` and ``cpuuse`` commands were
166    pasted from another window so were executed with no gap between.  In the
167    second report, only the ``shell`` thread has run since the CPU Usage was
168    reset.  It has consumed approximately 3.092 milliseconds of CPU time
169    processing the two commands and generating the output.
170
171.. index:: CONFIGURE_SHELL_NO_COMMAND_CPUUSE
172.. index:: CONFIGURE_SHELL_COMMAND_CPUUSE
173
174CONFIGURATION:
175    This command is included in the default shell command set.  When building a
176    custom command set, define ``CONFIGURE_SHELL_COMMAND_CPUUSE`` to have this
177    command included.
178
179    This command can be excluded from the shell command set by defining
180    ``CONFIGURE_SHELL_NO_COMMAND_CPUUSE`` when all shell commands have been
181    configured.
182
183.. index:: rtems_shell_rtems_main_cpuuse
184
185PROGRAMMING INFORMATION:
186    The ``cpuuse`` is implemented by a C language function which has the following
187    prototype:
188
189    .. code-block:: c
190
191        int rtems_shell_rtems_main_cpuuse(
192           int    argc,
193           char **argv
194        );
195
196    The configuration structure for the ``cpuuse`` has the following prototype:
197
198    .. code-block:: c
199
200        extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
201
202.. raw:: latex
203
204   \clearpage
205
206.. _stackuse:
207
208stackuse - print per thread stack usage
209---------------------------------------
210.. index:: stackuse
211
212SYNOPSYS:
213    .. code-block:: shell
214
215        stackuse
216
217DESCRIPTION:
218    This command prints a Stack Usage Report for all of the tasks and threads
219    in the system.  On systems which support it, the usage of the interrupt
220    stack is also included in the report.
221
222EXIT STATUS:
223    This command always succeeds and returns 0.
224
225NOTES:
226    The ``CONFIGURE_STACK_CHECKER_ENABLED`` ``confdefs.h`` constant must be
227    defined when the application is configured for this command to have any
228    information to report.
229
230EXAMPLES:
231    The following is an example of how to use ``stackuse``:
232
233    .. code-block:: shell
234
235        SHLL [/] $ stackuse
236        Stack usage by thread
237        ID      NAME    LOW          HIGH     CURRENT     AVAILABLE     USED
238        0x09010001  IDLE 0x023d89a0 - 0x023d99af 0x023d9760      4096        608
239        0x0a010001  UI1  0x023d9f30 - 0x023daf3f 0x023dad18      4096       1804
240        0x0a010002  SHLL 0x023db4c0 - 0x023df4cf 0x023de9d0     16384       5116
241        0xffffffff  INTR 0x023d2760 - 0x023d375f 0x00000000      4080        316
242
243.. index:: CONFIGURE_SHELL_NO_COMMAND_STACKUSE
244.. index:: CONFIGURE_SHELL_COMMAND_STACKUSE
245
246CONFIGURATION:
247    This command is included in the default shell command set.  When building a
248    custom command set, define ``CONFIGURE_SHELL_COMMAND_STACKUSE`` to have
249    this command included.
250
251    This command can be excluded from the shell command set by defining
252    ``CONFIGURE_SHELL_NO_COMMAND_STACKUSE`` when all shell commands have been
253    configured.
254
255.. index:: rtems_shell_rtems_main_stackuse
256
257PROGRAMMING INFORMATION:
258    The ``stackuse`` is implemented by a C language function which has the
259    following prototype:
260
261    .. code-block:: c
262
263        int rtems_shell_rtems_main_stackuse(
264            int    argc,
265            char **argv
266        );
267
268    The configuration structure for the ``stackuse`` has the following prototype:
269
270    .. code-block:: c
271
272        extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
273
274.. raw:: latex
275
276   \clearpage
277
278.. _perioduse:
279
280perioduse - print or reset per period usage
281-------------------------------------------
282.. index:: perioduse
283
284SYNOPSYS:
285    .. code-block:: shell
286
287        perioduse [-r]
288
289DESCRIPTION:
290    This command may be used to print a statistics report on the rate monotonic
291    periods in the application or to reset the rate monotonic period usage
292    statistics. When invoked with the ``-r`` option, the usage statistics are
293    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 ``perioduse``:
307
308    .. code-block:: shell
309
310        SHLL [/] $ perioduse
311        Period information by period
312        --- CPU times are in seconds ---
313        --- Wall times are in seconds ---
314        ID     OWNER COUNT MISSED          CPU TIME                  WALL TIME
315        MIN/MAX/AVG                MIN/MAX/AVG
316        0x42010001 TA1    502      0 0:000039/0:042650/0:004158 0:000039/0:020118/0:002848
317        0x42010002 TA2    502      0 0:000041/0:042657/0:004309 0:000041/0:020116/0:002848
318        0x42010003 TA3    501      0 0:000041/0:041564/0:003653 0:000041/0:020003/0:002814
319        0x42010004 TA4    501      0 0:000043/0:044075/0:004911 0:000043/0:020004/0:002814
320        0x42010005 TA5     10      0 0:000065/0:005413/0:002739 0:000065/1:000457/0:041058
321        MIN/MAX/AVG                MIN/MAX/AVG
322        SHLL [/] $ perioduse -r
323        Resetting Period Usage information
324        SHLL [/] $ perioduse
325        --- CPU times are in seconds ---
326        --- Wall times are in seconds ---
327        ID     OWNER COUNT MISSED          CPU TIME                  WALL TIME
328        MIN/MAX/AVG                MIN/MAX/AVG
329        0x42010001 TA1      0      0
330        0x42010002 TA2      0      0
331        0x42010003 TA3      0      0
332        0x42010004 TA4      0      0
333        0x42010005 TA5      0      0
334
335.. index:: CONFIGURE_SHELL_NO_COMMAND_PERIODUSE
336.. index:: CONFIGURE_SHELL_COMMAND_PERIODUSE
337
338CONFIGURATION:
339    This command is included in the default shell command set.  When building a
340    custom command set, define ``CONFIGURE_SHELL_COMMAND_PERIODUSE`` to have
341    this command included.
342
343    This command can be excluded from the shell command set by defining
344    ``CONFIGURE_SHELL_NO_COMMAND_PERIODUSE`` when all shell commands have been
345    configured.
346
347.. index:: rtems_shell_rtems_main_perioduse
348
349PROGRAMMING INFORMATION:
350    The ``perioduse`` is implemented by a C language function which has the
351    following prototype:
352
353    .. code-block:: c
354
355        int rtems_shell_rtems_main_perioduse(
356            int    argc,
357            char **argv
358        );
359
360    The configuration structure for the ``perioduse`` has the following prototype:
361
362    .. code-block:: c
363
364        extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
365
366.. raw:: latex
367
368   \clearpage
369
370.. _profreport:
371
372profreport - print a profiling report
373-------------------------------------
374.. index:: profreport
375
376SYNOPSYS:
377    .. code-block:: shell
378
379        profreport
380
381DESCRIPTION:
382    This command may be used to print a profiling report if profiling is built
383    into the RTEMS kernel.
384
385EXIT STATUS:
386    This command returns 0.
387
388NOTES:
389    Profiling must be enabled at build configuration time to get profiling
390    information.
391
392EXAMPLES:
393    The following is an example of how to use ``profreport``:
394
395    .. code-block:: shell
396
397        SHLL [/] $ profreport
398        <ProfilingReport name="Shell">
399        <PerCPUProfilingReport processorIndex="0">
400        <MaxThreadDispatchDisabledTime unit="ns">10447</MaxThreadDispatchDisabledTime>
401        <MeanThreadDispatchDisabledTime unit="ns">2</MeanThreadDispatchDisabledTime>
402        <TotalThreadDispatchDisabledTime unit="ns">195926627</TotalThreadDispatchDisabledTime>
403        <ThreadDispatchDisabledCount>77908688</ThreadDispatchDisabledCount>
404        <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
405        <MaxInterruptTime unit="ns">688</MaxInterruptTime>
406        <MeanInterruptTime unit="ns">127</MeanInterruptTime>
407        <TotalInterruptTime unit="ns">282651157</TotalInterruptTime>
408        <InterruptCount>2215855</InterruptCount>
409        </PerCPUProfilingReport>
410        <PerCPUProfilingReport processorIndex="1">
411        <MaxThreadDispatchDisabledTime unit="ns">9053</MaxThreadDispatchDisabledTime>
412        <MeanThreadDispatchDisabledTime unit="ns">41</MeanThreadDispatchDisabledTime>
413        <TotalThreadDispatchDisabledTime unit="ns">3053830335</TotalThreadDispatchDisabledTime>
414        <ThreadDispatchDisabledCount>73334202</ThreadDispatchDisabledCount>
415        <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
416        <MaxInterruptTime unit="ns">57</MaxInterruptTime>
417        <MeanInterruptTime unit="ns">35</MeanInterruptTime>
418        <TotalInterruptTime unit="ns">76980203</TotalInterruptTime>
419        <InterruptCount>2141179</InterruptCount>
420        </PerCPUProfilingReport>
421        <SMPLockProfilingReport name="SMP lock stats">
422        <MaxAcquireTime unit="ns">608</MaxAcquireTime>
423        <MaxSectionTime unit="ns">1387</MaxSectionTime>
424        <MeanAcquireTime unit="ns">112</MeanAcquireTime>
425        <MeanSectionTime unit="ns">338</MeanSectionTime>
426        <TotalAcquireTime unit="ns">119031</TotalAcquireTime>
427        <TotalSectionTime unit="ns">357222</TotalSectionTime>
428        <UsageCount>1055</UsageCount>
429        <ContentionCount initialQueueLength="0">1055</ContentionCount>
430        <ContentionCount initialQueueLength="1">0</ContentionCount>
431        <ContentionCount initialQueueLength="2">0</ContentionCount>
432        <ContentionCount initialQueueLength="3">0</ContentionCount>
433        </SMPLockProfilingReport>
434        <SMPLockProfilingReport name="Giant">
435        <MaxAcquireTime unit="ns">4186</MaxAcquireTime>
436        <MaxSectionTime unit="ns">7575</MaxSectionTime>
437        <MeanAcquireTime unit="ns">160</MeanAcquireTime>
438        <MeanSectionTime unit="ns">183</MeanSectionTime>
439        <TotalAcquireTime unit="ns">1772793111</TotalAcquireTime>
440        <TotalSectionTime unit="ns">2029733879</TotalSectionTime>
441        <UsageCount>11039140</UsageCount>
442        <ContentionCount initialQueueLength="0">11037655</ContentionCount>
443        <ContentionCount initialQueueLength="1">1485</ContentionCount>
444        <ContentionCount initialQueueLength="2">0</ContentionCount>
445        <ContentionCount initialQueueLength="3">0</ContentionCount>
446        </SMPLockProfilingReport>
447        </ProfilingReport>
448
449.. index:: CONFIGURE_SHELL_NO_COMMAND_PROFREPORT
450.. index:: CONFIGURE_SHELL_COMMAND_PROFREPORT
451
452CONFIGURATION:
453    When building a custom command set, define
454    ``CONFIGURE_SHELL_COMMAND_PROFREPORT`` to have this command included.
455
456    This command can be excluded from the shell command set by defining
457    ``CONFIGURE_SHELL_NO_COMMAND_PROFREPORT`` when all shell commands have been
458    configured.
459
460PROGRAMMING INFORMATION:
461    The configuration structure for the ``profreport`` has the following
462    prototype:
463
464    .. code-block:: c
465
466        extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command;
467
468.. raw:: latex
469
470   \clearpage
471
472.. _wkspace:
473
474wkspace - display information on executive workspace
475----------------------------------------------------
476.. index:: wkspace
477
478SYNOPSYS:
479    .. code-block:: shell
480
481        wkspace
482
483DESCRIPTION:
484    This command prints information on the current state of the RTEMS Executive
485    Workspace reported.  This includes the following information:
486
487    - Number of free blocks
488
489    - Largest free block
490
491    - Total bytes free
492
493    - Number of used blocks
494
495    - Largest used block
496
497    - Total bytes used
498
499EXIT STATUS:
500    This command always succeeds and returns 0.
501
502NOTES:
503    NONE
504
505EXAMPLES:
506    The following is an example of how to use ``wkspace``:
507
508    .. code-block:: shell
509
510        SHLL [/] $ wkspace
511        Number of free blocks: 1
512        Largest free block:    132336
513        Total bytes free:      132336
514        Number of used blocks: 36
515        Largest used block:    16408
516        Total bytes used:      55344
517
518.. index:: CONFIGURE_SHELL_NO_COMMAND_WKSPACE
519.. index:: CONFIGURE_SHELL_COMMAND_WKSPACE
520
521CONFIGURATION:
522    This command is included in the default shell command set.  When building a
523    custom command set, define ``CONFIGURE_SHELL_COMMAND_WKSPACE`` to have this
524    command included.
525
526    This command can be excluded from the shell command set by defining
527    ``CONFIGURE_SHELL_NO_COMMAND_WKSPACE`` when all shell commands have been
528    configured.
529
530.. index:: rtems_shell_rtems_main_wkspace
531
532PROGRAMMING INFORMATION:
533    The ``wkspace`` is implemented by a C language function which has the
534    following prototype:
535
536    .. code-block:: c
537
538        int rtems_shell_rtems_main_wkspace(
539            int    argc,
540            char **argv
541        );
542
543    The configuration structure for the ``wkspace`` has the following prototype:
544
545    .. code-block:: c
546
547        extern rtems_shell_cmd_t rtems_shell_WKSPACE_Command;
548
549.. raw:: latex
550
551   \clearpage
552
553.. _config:
554
555config - show the system configuration.
556---------------------------------------
557.. index:: config
558
559SYNOPSYS:
560    .. code-block:: shell
561
562        config
563
564DESCRIPTION:
565    This command display information about the RTEMS Configuration.
566
567EXIT STATUS:
568    This command always succeeds and returns 0.
569
570NOTES:
571    At this time, it does not report every configuration parameter.  This is an
572    area in which user submissions or sponsorship of a developer would be
573    appreciated.
574
575EXAMPLES:
576    The following is an example of how to use ``config``:
577
578    .. code-block:: shell
579
580        SHLL [/] $ config
581        INITIAL (startup) Configuration Info
582
583        WORKSPACE      start: 0x23d22e0;  size: 0x2dd20
584        TIME           usec/tick: 10000;  tick/timeslice: 50;  tick/sec: 100
585        MAXIMUMS       tasks: 20;  timers: 0;  sems: 50;  que's: 20;  ext's: 1
586        partitions: 0;  regions: 0;  ports: 0;  periods: 0
587
588.. index:: CONFIGURE_SHELL_NO_COMMAND_CONFIG
589.. index:: CONFIGURE_SHELL_COMMAND_CONFIG
590
591CONFIGURATION:
592    This command is included in the default shell command set.  When building a
593    custom command set, define ``CONFIGURE_SHELL_COMMAND_CONFIG`` to have this
594    command included.
595
596    This command can be excluded from the shell command set by defining
597    ``CONFIGURE_SHELL_NO_COMMAND_CONFIG`` when all shell commands have been
598    configured.
599
600.. index:: rtems_shell_rtems_main_config
601
602PROGRAMMING INFORMATION:
603    The ``config`` is implemented by a C language function which has the
604    following prototype:
605
606    .. code-block:: c
607
608        int rtems_shell_rtems_main_config(
609            int    argc,
610            char **argv
611        );
612
613    The configuration structure for the ``config`` has the following prototype:
614
615    .. code-block:: c
616
617        extern rtems_shell_cmd_t rtems_shell_CONFIG_Command;
618
619.. raw:: latex
620
621   \clearpage
622
623.. _itask:
624
625itask - list init tasks for the system
626--------------------------------------
627.. index:: itask
628
629SYNOPSYS:
630    .. code-block:: shell
631
632        itask
633
634DESCRIPTION:
635    This command prints a report on the set of initialization tasks and threads
636    in the system.
637
638EXIT STATUS:
639    This command always succeeds and returns 0.
640
641NOTES:
642    At this time, it includes only Classic API Initialization Tasks.  This is an
643    area in which user submissions or sponsorship of a developer would be
644    appreciated.
645
646EXAMPLES:
647    The following is an example of how to use ``itask``:
648
649    .. code-block:: shell
650
651        SHLL [/] $ itask
652        #    NAME   ENTRY        ARGUMENT    PRIO   MODES  ATTRIBUTES   STACK SIZE
653        ------------------------------------------------------------------------------
654        0   UI1    [0x2002258] 0 [0x0]        1    nP      DEFAULT     4096 [0x1000]
655
656.. index:: CONFIGURE_SHELL_NO_COMMAND_ITASK
657.. index:: CONFIGURE_SHELL_COMMAND_ITASK
658
659CONFIGURATION:
660    This command is included in the default shell command set.  When building a
661    custom command set, define ``CONFIGURE_SHELL_COMMAND_ITASK`` to have this
662    command included.
663
664    This command can be excluded from the shell command set by defining
665    ``CONFIGURE_SHELL_NO_COMMAND_ITASK`` when all shell commands have been
666    configured.
667
668.. index:: rtems_shell_rtems_main_itask
669
670PROGRAMMING INFORMATION:
671    The ``itask`` is implemented by a C language function which has the
672    following prototype:
673
674    .. code-block:: c
675
676        int rtems_shell_rtems_main_itask(
677            int    argc,
678            char **argv
679        );
680
681    The configuration structure for the ``itask`` has the following prototype:
682
683    .. code-block:: c
684
685        extern rtems_shell_cmd_t rtems_shell_ITASK_Command;
686
687.. raw:: latex
688
689   \clearpage
690
691.. _extension:
692
693extension - display information about extensions
694------------------------------------------------
695.. index:: extension
696
697SYNOPSYS:
698    .. code-block:: shell
699
700        extension [id [id ...]]
701
702DESCRIPTION:
703    When invoked with no arguments, this command prints information on the set
704    of User Extensions currently active in the system.
705
706    If invoked with a set of ids as arguments, then just those objects are
707    included in the information printed.
708
709EXIT STATUS:
710    This command returns 0 on success and non-zero if an error is encountered.
711
712NOTES:
713    NONE
714
715EXAMPLES:
716    The following is an example of using the ``extension`` command on a system
717    with no user extensions.
718
719    .. code-block:: shell
720
721        SHLL [/] $ extension
722        ID       NAME
723        ------------------------------------------------------------------------------
724
725.. index:: CONFIGURE_SHELL_NO_COMMAND_EXTENSION
726.. index:: CONFIGURE_SHELL_COMMAND_EXTENSION
727
728CONFIGURATION:
729    This command is included in the default shell command set.  When building a
730    custom command set, define ``CONFIGURE_SHELL_COMMAND_EXTENSION`` to have
731    this command included.
732
733    This command can be excluded from the shell command set by defining
734    ``CONFIGURE_SHELL_NO_COMMAND_EXTENSION`` when all shell commands have been
735    configured.
736
737.. index:: rtems_shell_rtems_main_extension
738
739PROGRAMMING INFORMATION:
740    The ``extension`` is implemented by a C language function which has the
741    following prototype:
742
743    .. code-block:: c
744
745        int rtems_shell_rtems_main_extension(
746            int    argc,
747            char **argv
748        );
749
750    The configuration structure for the ``extension`` has the following prototype:
751
752    .. code-block:: c
753
754        extern rtems_shell_cmd_t rtems_shell_EXTENSION_Command;
755
756.. raw:: latex
757
758   \clearpage
759
760.. _task:
761
762task - display information about tasks
763--------------------------------------
764.. index:: task
765
766SYNOPSYS:
767    .. code-block:: shell
768
769        task [id [id ...]]
770
771DESCRIPTION:
772    When invoked with no arguments, this command prints information on the set
773    of Classic API Tasks currently active in the system.
774
775    If invoked with a set of ids as arguments, then just those objects are
776    included in the information printed.
777
778EXIT STATUS:
779    This command returns 0 on success and non-zero if an error is encountered.
780
781NOTES:
782    NONE
783
784EXAMPLES:
785    The following is an example of how to use the ``task`` on an application
786    with just two Classic API tasks:
787
788    .. code-block:: shell
789
790        SHLL [/] $ task
791        ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
792        ------------------------------------------------------------------------------
793        0a010001   UI1      1   SUSP   P:T:nA  NONE
794        0a010002   SHLL   100   READY  P:T:nA  NONE
795
796.. index:: CONFIGURE_SHELL_NO_COMMAND_TASK
797.. index:: CONFIGURE_SHELL_COMMAND_TASK
798
799CONFIGURATION:
800    This command is included in the default shell command set.  When building a
801    custom command set, define ``CONFIGURE_SHELL_COMMAND_TASK`` to have this
802    command included.
803
804    This command can be excluded from the shell command set by defining
805    ``CONFIGURE_SHELL_NO_COMMAND_TASK`` when all shell commands have been
806    configured.
807
808.. index:: rtems_shell_rtems_main_task
809
810PROGRAMMING INFORMATION:
811    The ``task`` is implemented by a C language function which has the
812    following prototype:
813
814    .. code-block:: shell
815
816        int rtems_shell_rtems_main_task(
817            int    argc,
818            char **argv
819        );
820
821    The configuration structure for the ``task`` has the following prototype:
822
823    .. code-block:: c
824
825        extern rtems_shell_cmd_t rtems_shell_TASK_Command;
826
827.. raw:: latex
828
829   \clearpage
830
831.. _queue:
832
833queue - display information about message queues
834------------------------------------------------
835.. index:: queue
836
837SYNOPSYS:
838    .. code-block:: shell
839
840        queue [id [id ... ]]
841
842DESCRIPTION:
843    When invoked with no arguments, this command prints information on the set
844    of Classic API Message Queues currently active in the system.
845
846    If invoked with a set of ids as arguments, then just those objects are
847    included in the information printed.
848
849EXIT STATUS:
850    This command returns 0 on success and non-zero if an error is encountered.
851
852NOTES:
853    NONE
854
855EXAMPLES:
856    The following is an example of using the ``queue`` command on a system with
857    no Classic API Message Queues.
858
859    .. code-block:: shell
860
861        SHLL [/] $ queue
862        ID       NAME   ATTRIBUTES   PEND   MAXPEND  MAXSIZE
863        ------------------------------------------------------------------------------
864
865.. index:: CONFIGURE_SHELL_NO_COMMAND_QUEUE
866.. index:: CONFIGURE_SHELL_COMMAND_QUEUE
867
868CONFIGURATION:
869    This command is included in the default shell command set.  When building a
870    custom command set, define ``CONFIGURE_SHELL_COMMAND_QUEUE`` to have this
871    command included.
872
873    This command can be excluded from the shell command set by defining
874    ``CONFIGURE_SHELL_NO_COMMAND_QUEUE`` when all shell commands have been
875    configured.
876
877.. index:: rtems_shell_rtems_main_queue
878
879PROGRAMMING INFORMATION:
880    The ``queue`` is implemented by a C language function which has the
881    following prototype:
882
883    .. code-block:: c
884
885        int rtems_shell_rtems_main_queue(
886            int    argc,
887            char **argv
888        );
889
890    The configuration structure for the ``queue`` has the following prototype:
891
892    .. code-block:: c
893
894        extern rtems_shell_cmd_t rtems_shell_QUEUE_Command;
895
896.. raw:: latex
897
898   \clearpage
899
900.. _sema:
901
902sema - display information about semaphores
903-------------------------------------------
904.. index:: sema
905
906SYNOPSYS:
907    .. code-block:: shell
908
909        sema [id [id ... ]]
910
911DESCRIPTION:
912    When invoked with no arguments, this command prints information on the set
913    of Classic API Semaphores currently active in the system.
914
915    If invoked with a set of objects ids as arguments, then just those objects
916    are included in the information printed.
917
918EXIT STATUS:
919    This command returns 0 on success and non-zero if an error is encountered.
920
921NOTES:
922    NONE
923
924EXAMPLES:
925    The following is an example of how to use ``sema``:
926
927    .. code-block:: shell
928
929        SHLL [/] $ sema
930        ID       NAME   ATTR        PRICEIL CURR_CNT HOLDID
931        ------------------------------------------------------------------------------
932        1a010001   LBIO   PR:BI:IN      0        1     00000000
933        1a010002   TRmi   PR:BI:IN      0        1     00000000
934        1a010003   LBI00  PR:BI:IN      0        1     00000000
935        1a010004   TRia   PR:BI:IN      0        1     00000000
936        1a010005   TRoa   PR:BI:IN      0        1     00000000
937        1a010006   TRxa   <assoc.c: BAD NAME>   0    0 09010001
938        1a010007   LBI01  PR:BI:IN      0        1     00000000
939        1a010008   LBI02  PR:BI:IN      0        1     00000000
940
941.. index:: CONFIGURE_SHELL_NO_COMMAND_SEMA
942.. index:: CONFIGURE_SHELL_COMMAND_SEMA
943
944CONFIGURATION:
945    This command is included in the default shell command set.  When building a
946    custom command set, define ``CONFIGURE_SHELL_COMMAND_SEMA`` to have this
947    command included.
948
949    This command can be excluded from the shell command set by defining
950    ``CONFIGURE_SHELL_NO_COMMAND_SEMA`` when all shell commands have been
951    configured.
952
953.. index:: rtems_shell_rtems_main_sema
954
955PROGRAMMING INFORMATION:
956    The ``sema`` is implemented by a C language function which has the following
957    prototype:
958
959    .. code-block:: c
960
961        int rtems_shell_rtems_main_sema(
962            int    argc,
963            char **argv
964        );
965
966    The configuration structure for the ``sema`` has the following prototype:
967
968    .. code-block:: c
969
970        extern rtems_shell_cmd_t rtems_shell_SEMA_Command;
971
972.. raw:: latex
973
974   \clearpage
975
976.. _region:
977
978region - display information about regions
979------------------------------------------
980.. index:: region
981
982SYNOPSYS:
983    .. code-block:: shell
984
985        region [id [id ... ]]
986
987DESCRIPTION:
988    When invoked with no arguments, this command prints information on the set
989    of Classic API Regions currently active in the system.
990
991    If invoked with a set of object ids as arguments, then just those object
992    are included in the information printed.
993
994EXIT STATUS:
995    This command returns 0 on success and non-zero if an error is encountered.
996
997NOTES:
998    NONE
999
1000EXAMPLES:
1001    The following is an example of using the ``region`` command on a system
1002    with no user extensions.
1003
1004    .. code-block:: shell
1005
1006        SHLL [/] $ region
1007        ID       NAME   ATTR        STARTADDR LENGTH    PAGE_SIZE USED_BLOCKS
1008        ------------------------------------------------------------------------------
1009
1010.. index:: CONFIGURE_SHELL_NO_COMMAND_REGION
1011.. index:: CONFIGURE_SHELL_COMMAND_REGION
1012
1013CONFIGURATION:
1014    This command is included in the default shell command set.  When building a
1015    custom command set, define ``CONFIGURE_SHELL_COMMAND_REGION`` to have this
1016    command included.
1017
1018    This command can be excluded from the shell command set by defining
1019    ``CONFIGURE_SHELL_NO_COMMAND_REGION`` when all shell commands have been
1020    configured.
1021
1022.. index:: rtems_shell_rtems_main_region
1023
1024PROGRAMMING INFORMATION:
1025    The ``region`` is implemented by a C language function which has the
1026    following prototype:
1027
1028    .. code-block:: c
1029
1030        int rtems_shell_rtems_main_region(
1031            int    argc,
1032            char **argv
1033        );
1034
1035    The configuration structure for the ``region`` has the following prototype:
1036
1037    .. code-block:: c
1038
1039        extern rtems_shell_cmd_t rtems_shell_REGION_Command;
1040
1041.. raw:: latex
1042
1043   \clearpage
1044
1045.. _part:
1046
1047part - display information about partitions
1048-------------------------------------------
1049.. index:: part
1050
1051SYNOPSYS:
1052    .. code-block:: shell
1053
1054        part [id [id ... ]]
1055
1056DESCRIPTION:
1057    When invoked with no arguments, this command prints information on the set
1058    of Classic API Partitions currently active in the system.
1059
1060    If invoked with a set of object ids as arguments, then just those objects
1061    are included in the information printed.
1062
1063EXIT STATUS:
1064    This command returns 0 on success and non-zero if an error is encountered.
1065
1066NOTES:
1067    NONE
1068
1069EXAMPLES:
1070    The following is an example of using the ``part`` command on a system with
1071    no user extensions.
1072
1073    .. code-block:: shell
1074
1075        SHLL [/] $ part
1076        ID       NAME   ATTR        STARTADDR LENGTH    BUF_SIZE  USED_BLOCKS
1077        ------------------------------------------------------------------------------
1078
1079.. index:: CONFIGURE_SHELL_NO_COMMAND_PART
1080.. index:: CONFIGURE_SHELL_COMMAND_PART
1081
1082CONFIGURATION:
1083    This command is included in the default shell command set.  When building a
1084    custom command set, define ``CONFIGURE_SHELL_COMMAND_PART`` to have this
1085    command included.
1086
1087    This command can be excluded from the shell command set by defining
1088    ``CONFIGURE_SHELL_NO_COMMAND_PART`` when all shell commands have been
1089    configured.
1090
1091.. index:: rtems_shell_rtems_main_part
1092
1093PROGRAMMING INFORMATION:
1094    The ``part`` is implemented by a C language function which has the
1095    following prototype:
1096
1097    .. code-block:: c
1098
1099        int rtems_shell_rtems_main_part(
1100            int    argc,
1101            char **argv
1102        );
1103
1104    The configuration structure for the ``part`` has the following prototype:
1105
1106    .. code-block:: c
1107
1108        extern rtems_shell_cmd_t rtems_shell_PART_Command;
1109
1110.. raw:: latex
1111
1112   \clearpage
1113
1114.. _object:
1115
1116object - display information about RTEMS objects
1117------------------------------------------------
1118.. index:: object
1119
1120SYNOPSYS:
1121    .. code-block:: shell
1122
1123        object [id [id ...]]
1124
1125DESCRIPTION:
1126    When invoked with a set of object ids as arguments, then a report on those
1127    objects is printed.
1128
1129EXIT STATUS:
1130    This command returns 0 on success and non-zero if an error is encountered.
1131
1132NOTES:
1133    NONE
1134
1135EXAMPLES:
1136    The following is an example of how to use ``object``:
1137
1138    .. code-block:: shell
1139
1140        SHLL [/] $ object 0a010001 1a010002
1141        ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
1142        ------------------------------------------------------------------------------
1143        0a010001   UI1      1   SUSP   P:T:nA  NONE
1144        ID       NAME   ATTR        PRICEIL CURR_CNT HOLDID
1145        ------------------------------------------------------------------------------
1146        1a010002   TRmi   PR:BI:IN      0        1     00000000
1147
1148.. index:: CONFIGURE_SHELL_NO_COMMAND_OBJECT
1149.. index:: CONFIGURE_SHELL_COMMAND_OBJECT
1150
1151CONFIGURATION:
1152    This command is included in the default shell command set.  When building a
1153    custom command set, define ``CONFIGURE_SHELL_COMMAND_OBJECT`` to have this
1154    command included.
1155
1156    This command can be excluded from the shell command set by defining
1157    ``CONFIGURE_SHELL_NO_COMMAND_OBJECT`` when all shell commands have been
1158    configured.
1159
1160.. index:: rtems_shell_rtems_main_object
1161
1162PROGRAMMING INFORMATION:
1163    The ``object`` is implemented by a C language function which has the
1164    following prototype:
1165
1166    .. code-block:: c
1167
1168        int rtems_shell_rtems_main_object(
1169            int    argc,
1170            char **argv
1171        );
1172
1173    The configuration structure for the ``object`` has the
1174    following prototype:
1175
1176    .. code-block:: c
1177
1178        extern rtems_shell_cmd_t rtems_shell_OBJECT_Command;
1179
1180.. raw:: latex
1181
1182   \clearpage
1183
1184.. _driver:
1185
1186driver - display the RTEMS device driver table
1187----------------------------------------------
1188.. index:: driver
1189
1190SYNOPSYS:
1191    .. code-block:: shell
1192
1193        driver [major [major ...]]
1194
1195DESCRIPTION:
1196    When invoked with no arguments, this command prints information on the set
1197    of Device Drivers currently active in the system.
1198
1199    If invoked with a set of major numbers as arguments, then just those Device
1200    Drivers are included in the information printed.
1201
1202EXIT STATUS:
1203    This command returns 0 on success and non-zero if an error is encountered.
1204
1205NOTES:
1206    NONE
1207
1208EXAMPLES:
1209    The following is an example of how to use ``driver``:
1210
1211    .. code-block:: shell
1212
1213        SHLL [/] $ driver
1214        Major      Entry points
1215        ------------------------------------------------------------------------------
1216        0          init: [0x200256c];  control: [0x20024c8]
1217        open: [0x2002518];  close: [0x2002504]
1218        read: [0x20024f0];  write: [0x20024dc]
1219        1          init: [0x20023fc];  control: [0x2002448]
1220        open: [0x0];  close: [0x0]
1221        read: [0x0];  write: [0x0]
1222        SHLL [/] $
1223
1224.. index:: CONFIGURE_SHELL_NO_COMMAND_DRIVER
1225.. index:: CONFIGURE_SHELL_COMMAND_DRIVER
1226
1227CONFIGURATION:
1228    This command is included in the default shell command set.  When building a
1229    custom command set, define ``CONFIGURE_SHELL_COMMAND_DRIVER`` to have this
1230    command included.
1231
1232    This command can be excluded from the shell command set by defining
1233    ``CONFIGURE_SHELL_NO_COMMAND_DRIVER`` when all shell commands have been
1234    configured.
1235
1236.. index:: rtems_shell_rtems_main_driver
1237
1238PROGRAMMING INFORMATION:
1239    The ``driver`` is implemented by a C language function which has the
1240    following prototype:
1241
1242    .. code-block:: c
1243
1244        int rtems_shell_rtems_main_driver(
1245            int    argc,
1246            char **argv
1247        );
1248
1249    The configuration structure for the ``driver`` has the following prototype:
1250
1251    .. code-block:: c
1252
1253        extern rtems_shell_cmd_t rtems_shell_DRIVER_Command;
1254
1255.. raw:: latex
1256
1257   \clearpage
1258
1259.. _dname:
1260
1261dname - displays information about named drivers
1262------------------------------------------------
1263.. index:: dname
1264
1265SYNOPSYS:
1266    .. code-block:: shell
1267
1268        dname
1269
1270DESCRIPTION:
1271    WARNING! This command does not appear to work as of 27 February 2008.
1272
1273EXIT STATUS:
1274    This command returns 0 on success and non-zero if an error is encountered.
1275
1276NOTES:
1277    NONE
1278
1279EXAMPLES:
1280    The following is an example of how to use ``dname``:
1281
1282    .. code-block:: shell
1283
1284        EXAMPLE_TBD
1285
1286.. index:: CONFIGURE_SHELL_NO_COMMAND_DNAME
1287.. index:: CONFIGURE_SHELL_COMMAND_DNAME
1288
1289CONFIGURATION:
1290    This command is included in the default shell command set.  When building a
1291    custom command set, define ``CONFIGURE_SHELL_COMMAND_DNAME`` to have this
1292    command included.
1293
1294    This command can be excluded from the shell command set by defining
1295    ``CONFIGURE_SHELL_NO_COMMAND_DNAME`` when all shell commands have been
1296    configured.
1297
1298.. index:: rtems_shell_rtems_main_dname
1299
1300PROGRAMMING INFORMATION:
1301    The ``dname`` is implemented by a C language function which has the
1302    following prototype:
1303
1304    .. code-block:: c
1305
1306        int rtems_shell_rtems_main_dname(
1307            int    argc,
1308            char **argv
1309        );
1310
1311    The configuration structure for the ``dname`` has the following prototype:
1312
1313    .. code-block:: c
1314
1315        extern rtems_shell_cmd_t rtems_shell_DNAME_Command;
1316
1317.. raw:: latex
1318
1319   \clearpage
1320
1321.. _pthread:
1322
1323pthread - display information about POSIX threads
1324-------------------------------------------------
1325.. index:: pthread
1326
1327SYNOPSYS:
1328    .. code-block:: shell
1329
1330        pthread [id [id ...]]
1331
1332DESCRIPTION:
1333    When invoked with no arguments, this command prints information on the set
1334    of POSIX API threads currently active in the system.
1335
1336    If invoked with a set of ids as arguments, then just those objects are
1337    included in the information printed.
1338
1339EXIT STATUS:
1340    This command returns 0 on success and non-zero if an error is encountered.
1341
1342NOTES:
1343    This command is only available when the POSIX API is configured.
1344
1345EXAMPLES:
1346    The following is an example of how to use the ``task`` on an application
1347    with four POSIX threads:
1348
1349    .. code-block:: shell
1350
1351        SHLL [/] $ pthread
1352        ID       NAME           PRI  STATE MODES   EVENTS    WAITID  WAITARG  NOTES
1353        ------------------------------------------------------------------------------
1354        0b010002   Main           133 READY  P:T:nA    NONE   43010001 0x7b1148
1355        0b010003   ISR            133 Wcvar  P:T:nA    NONE   43010003 0x7b1148
1356        0b01000c                  133 READY  P:T:nA    NONE   33010002 0x7b1148
1357        0b01000d                  133 Wmutex P:T:nA    NONE   33010002 0x7b1148
1358
1359CONFIGURATION:
1360    This command is part of the monitor commands which are always available in
1361    the shell.
1362
1363PROGRAMMING INFORMATION:
1364    This command is not directly available for invocation.
Note: See TracBrowser for help on using the repository browser.