source: rtems/cpukit/libmisc/monitor/README

Last change on this file was d5154d0f, checked in by Aun-Ali Zaidi <admin@…>, on 12/23/15 at 20:44:02

api: Remove deprecated Notepads

Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

  • 16 32-bit integers were allocated.
  • A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1monitor task
2
3The monitor task is an optional task that knows about RTEMS
4data structures and can print out information about them.
5It is a work-in-progress and needs many more commands, but
6is useful now.
7
8The monitor works best when it is the highest priority task,
9so all your other tasks should ideally be at some priority
10greater than 1.
11
12To use the monitor:
13-------------------
14
15    #include <rtems/monitor.h>
16
17        ...
18
19    rtems_monitor_init(0);
20
21    The parameter to rtems_monitor_init() tells the monitor whether
22    to suspend itself on startup.  A value of 0 causes the monitor
23    to immediately enter command mode; a non-zero value causes the
24    monitor to suspend itself after creation and wait for explicit
25    wakeup.
26
27
28    rtems_monitor_wakeup();
29   
30    wakes up a suspended monitor and causes it to reenter command mode.
31
32Monitor commands
33----------------
34
35    The monitor prompt is 'rtems> '.
36    Can abbreviate commands to "uniquity"
37    There is a 'help' command.  Here is the output from various
38    help commands:
39
40        Commands (may be abbreviated)
41
42          help      -- get this message or command specific help
43          task      -- show task information
44          queue     -- show message queue information
45          symbol    -- show entries from symbol table
46          pause     -- pause monitor for a specified number of ticks
47          fatal     -- invoke a fatal RTEMS error
48
49        task [id [id ...] ]
50          display information about the specified tasks.
51          Default is to display information about all tasks on this node
52
53        queue [id [id ... ] ]
54          display information about the specified message queues
55          Default is to display information about all queues on this node
56
57        symbol [ symbolname [symbolname ... ] ]
58          display value associated with specified symbol.
59          Defaults to displaying all known symbols.
60
61        pause [ticks]
62          monitor goes to "sleep" for specified ticks (default is 1)
63          monitor will resume at end of period or if explicitly awakened
64
65        fatal [status]
66          Invoke 'rtems_fatal_error_occurred' with 'status'
67          (default is RTEMS_INTERNAL_ERROR)
68
69        continue
70          put the monitor to sleep waiting for an explicit wakeup from the
71          program running.
72
73
74Sample output from 'task' command
75---------------------------------
76
77    rtems> task
78      ID       NAME   PRIO   STAT   MODES  EVENTS   WAITID  WAITARG  NOTES
79    ------------------------------------------------------------------------
80    00010001   UI1     2    READY    P:T:nA    NONE15: 0x40606348
81    00010002   RMON    1    READY    nP    NONE15: 0x40604110
82
83    'RMON' is the monitor itself, so we have 1 "user" task.
84    Its modes are P:T:nA which translate to:
85
86        preemptable
87        timesliced
88        no ASRS
89
90    It has no events.
91    (this is the libc thread state)
92
Note: See TracBrowser for help on using the repository browser.