source: rtems/doc/shell/preface.texi @ abdeac2a

4.115
Last change on this file since abdeac2a was abdeac2a, checked in by Joel Sherrill <joel.sherrill@…>, on 12/06/11 at 15:12:48

2011-12-06 Joel Sherrill <joel.sherrill@…>

PR 1793/doc

  • .cvsignore, Makefile.am, README, configure.ac, index.html.in, main.am, project.am, ada_user/.cvsignore, ada_user/ada_user.texi, ada_user/example.texi, bsp_howto/.cvsignore, bsp_howto/bsp_howto.texi, cpu_supplement/.cvsignore, cpu_supplement/cpu_supplement.texi, cpu_supplement/preface.texi, develenv/.cvsignore, develenv/develenv.texi, develenv/intro.texi, filesystem/.cvsignore, filesystem/filesystem.texi, filesystem/preface.texi, networking/.cvsignore, networking/networking.texi, networking/preface.texi, porting/.cvsignore, porting/porting.texi, porting/preface.texi, posix1003.1/.cvsignore, posix1003.1/posix1003_1.texi, posix_users/.cvsignore, posix_users/posix_users.texi, posix_users/preface.texi, shell/.cvsignore, shell/preface.texi, shell/shell.texi, started/.cvsignore, started/started.texi, user/.cvsignore, user/c_user.texi, user/dirstat.texi, user/example.texi, user/glossary.texi, user/preface.texi: Convert from texi2www to texi2html.
  • texi2html_init.in: New file.
  • rtems_footer.html.in, rtems_header.html.in: Removed.
  • Property mode set to 100644
File size: 4.5 KB
Line 
1@c
2@c  COPYRIGHT (c) 1989-2011.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@node Preface, Configuration and Initialization, Top, Top
10@unnumbered Preface
11
12Real-time embedded systems vary widely based upon their
13operational and maintenance requirements. Some of these
14systems provide ways for the user or developer to interact
15with them.  This interaction could be used for operational,
16diagnostic, or configuration purposes.  The capabilities
17described in this manual are those provided with RTEMS to
18provide a command line interface for user access.  Some
19of these commands will be familiar as standard POSIX utilities
20while others are RTEMS specific or helpful in debugging
21and analyzing an embedded system. As a simple example of
22the powerful and very familiar capabilities that the RTEMS
23Shell provides to an application, consider the following
24example which hints at some of the capabilities available:
25
26@smallexample
27Welcome to rtems-4.10.99.0(SPARC/w/FPU/sis)
28COPYRIGHT (c) 1989-2011.
29On-Line Applications Research Corporation (OAR).
30
31Login into RTEMS
32
33login: rtems
34Password:
35
36RTEMS SHELL (Ver.1.0-FRC):/dev/console. Feb 28 2008. 'help' to list commands.
37SHLL [/] $ cat /etc/passwd
38root:*:0:0:root::/:/bin/sh
39rtems:*:1:1:RTEMS Application::/:/bin/sh
40tty:!:2:2:tty owner::/:/bin/false
41SHLL [/] $ ls /dev
42-rwxr-xr-x   1  rtems   root           0 Jan 01 00:00 console
43-rwxr-xr-x   1   root   root           0 Jan 01 00:00 console_b
442 files 0 bytes occupied
45SHLL [/] $ stackuse
46Stack usage by thread
47    ID      NAME    LOW          HIGH     CURRENT     AVAILABLE     USED
480x09010001  IDLE 0x023d89a0 - 0x023d99af 0x023d9760      4096        608
490x0a010001  UI1  0x023d9f30 - 0x023daf3f 0x023dad18      4096       1804
500x0a010002  SHLL 0x023db4c0 - 0x023df4cf 0x023de9d0     16384       6204
510xffffffff  INTR 0x023d2760 - 0x023d375f 0x00000000      4080        316
52SHLL [/] $ mount -L
53File systems: msdos
54SHLL [/] $
55@end smallexample
56
57In the above example, the user @i{rtems} logs into a
58SPARC based RTEMS system.  The first command is
59@code{cat /etc/passwd}.  This simple command lets us
60know that this application is running the In Memory
61File System (IMFS) and that the infrastructure has
62provided dummy entries for @i{/etc/passwd} and a few
63other files.  The contents of @i{/etc/passwd} let
64us know that the user could have logged in as @code{root}.
65In fact, the @code{root} user has more permissions
66than @code{rtems} who is not allowed to write into the
67filesystem. 
68
69The second command is @code{ls /dev} which lets us
70know that RTEMS has POSIX-style device nodes which
71can be accesses through standard I/O function calls.
72
73The third command executed is the RTEMS specific
74@code{stackuse} which gives a report on the stack
75usage of each thread in the system.  Since stack
76overflows are a common error in deeply embedded systems,
77this is a surprising simple, yet powerful debugging aid.
78
79Finally, the last command, @code{mount -L} hints that
80RTEMS supports a variety of mountable filesystems. With
81support for MS-DOS FAT on IDE/ATA and Flash devices as
82well as network-based filesystens such as NFS and TFTP,
83the standard free RTEMS provides a robuse infrastructure
84for embedded applications.
85
86This manual describes the RTEMS Shell and its command set.
87In our terminology, the Shell is just a loop reading user
88input and turning that input into commands with argument.
89The Shell provided with RTEMS is a simple command reading
90loop with limited scripting capabilities.  It can be connected
91to via a standard serial port or connected to the RTEMS
92@code{telnetd} server for use across a network.
93
94Each command in the command set is implemented as a single
95subroutine which has a @i{main-style} prototype.  The commands
96interpret their arguments and operate upon stdin, stdout, and
97stderr by default.  This allows each command to be invoked
98independent of the shell.
99
100The described separation of shell from commands from communications
101mechanism was an important design goal.  At one level, the RTEMS
102Shell is a complete shell environment providing access to multiple
103POSIX compliant filesystems and TCP/IP stack.  The subset of
104capabilities available is easy to configure and the standard
105Shell can be logged into from either a serial port or via telnet.
106But at another level, the Shell is a large set of components which
107can be integrated into the user's developed command interpreter.
108In either case, it is trivial to add custom commands to the command
109set available.
110 
111@unnumberedsec Acknowledgements
112
113@include common/opengroup_preface_acknowledgement.texi
114
Note: See TracBrowser for help on using the repository browser.