source: rtems-docs/shell/rtems_specific_commands.rst @ 9b5801a

4.115
Last change on this file since 9b5801a was 8ca13ed, checked in by Amar Takhar <verm@…>, on 01/16/16 at 20:32:09

Split document.

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