OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [libmisc/] [monitor/] [README] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.