Monitoring Settings

The monitoring functionality in wRTOS allows you to trace the behavior of your real-time applications by recording significant events that occur during execution of those applications. The events are written to disk, where they are grouped into sessions. Each session corresponds to a single folder that contains one or more files containing events generated during that session. A new session begins each time monitoring is started, and the current session ends each time monitoring is stopped.

You can configure the global, persistent default monitoring behaviors on the Monitoring page in wRTOS Settings. On the Memory page, you can configure the overall amount of non-paged memory the Subsystem will dedicate to collecting monitored events.

Note: Some changes to wRTOS Settings require a restart of the Subsystem. When the Subsystem must be restarted, a prompt will appear in the wRTOS Settings footer.

Note: Monitoring causes as much as one microsecond of latency depending on the real time operation. It is recommended that you only enable and start monitoring during development and that you disable monitoring in production. The amount of latency depends on how many kinds of events are being monitored and how frequently those events occur in real-time applications. Monitoring fewer kinds of events reduces the impact of monitoring on latency.

Note: wRTOS collects additional monitoring session data to support collection of pre-start-trigger events. See Customizing Session Collection Behavior below.

In this section:

Click to expandAccessing Monitor Settings

To open the Monitoring page in wRTOS Settings:

  1. Open wRTOS Settings.
  2. Do one of the following:
  • From the Home page, click Subsystem. On the Subsystem page, click Monitoring.

  • From any other wRTOS Settings page, click Contents / Subsystem / Monitoring in the sidebar menu.

 


Control Monitoring

Monitoring can be in one of four states: disabled, enabled, started, or paused. Monitoring is disabled by default. You can enable monitoring and choose to start monitoring when the Subsystem starts using the settings under Control Monitoring.

Monitor applications

Use this setting to turn monitoring on and off. When set to ON, monitoring is enabled from when the wRTOS Subsystem starts until it is stopped again. You can use wRTOS Monitor to dynamically start, stop, and pause monitoring, adjust the events you want to monitor, and convert the binary files in session folders into text files.

Note: Enabling monitoring does not start a monitoring session. It performs the required system setup and preparation, which includes allocating non-paged pool memory dedicated to monitoring. It also introduces additional Subsystem activity to support pre-trigger events.

When Monitor applications is set to OFF, you will see a warning when you start monitoring through wRTOS Monitor that a momentary loss of determinism will occur as monitoring passes from a disabled to enabled state before starting.

To change this setting:

Do one of the following:

Start monitoring when the Subsystem starts

When this setting is set to ON, a new monitoring session will start automatically whenever the Subsystem starts. When this setting is OFF, you must manually start a monitoring session using wRTOS Monitor, either of the real-time APIs RtMonitorControl or RtMonitorChangeState, or by setting an event to act as a start trigger.

Note: This option is not available when Monitor applications is set to OFF.

To change this setting:

Do one of the following:

Configure the Default Set of Events to Collect

wRTOS Settings allows you to define the persistent, default events to collect during a monitor session. You can manually choose events to collect or select one of the predefined sets of events, such as Memory events, to only collect events specific to that area of focus.

To configure events to collect:

Choose one of the options in the list on the left:

Option Description

Performance related

Collects a predefined set of performance-related events from these event groups:

  • Exceptions
  • Fast Semaphores
  • General Object Events
  • General System Events
  • Real-time Processes
  • Real-time Threads
  • Timers

Memory

Collects a predefined set of memory-related events from these event groups:

  • Heaps
  • Memory

Deadlock and synchronization

Collects a predefined set of deadlock and synchronization-related events from these event groups:

  • Critical Sections
  • Events
  • Fast Semaphores
  • Mutexes
  • Real-time Threads
  • Semaphores

Custom

Collects all custom events generated by the API RtGenerateEvent.

Allow me to choose

Manually select the events you want to collect:

  • Select an event to include it in a monitoring session. Select an event group to select all events within that group.
  • Clear selection of an event to exclude it from a monitoring session. Clear selection of an event group to clear all events within that group.

Note: Once monitoring is enabled, changes to the events selected in wRTOS Settings will not take effect until you restart the Subsystem.

See Event Classes for an alphabetical listing of all monitor events.

Customize Session Collection Behavior

Under Customize session collection behavior, you can set the maximum number of events to collect and determine whether you would like to collect pre-start trigger events.

Maximum number of events to collect

This setting defines the maximum number of events to collect in a monitor session.

To change this setting:

Choose an option:

Number of pre-start trigger events

Pre-start trigger events occur before the event that triggers the start of a monitoring session. This setting defines the number of pre-start trigger events, if any, to collect. When set to a nonzero value, at least one start trigger must be selected in wRTOS Monitor for pre-start trigger events to be saved. All monitoring events more than the nonzero value that occur before the trigger happens will not be saved.

The default value is 0 events (no pre-start trigger events collected).

Note: When Maximum number of events to collect is set to Collect this many events, the number of pre-start-trigger events to collect must not exceed the number of events to collect.

Note: Some pre-start trigger events may be lost if the start trigger event is set and subsequently triggered within several milliseconds after the end of a previous monitoring session.

Note: wRTOS collects additional monitoring session data to support collection of pre-start trigger events.

To change this setting:

Enter a value in the Number of pre-start trigger events text box.

Customize Session Logging

You can configure where monitor session logs are saved, set a maximum value for the log size and disk space allowed, and configure monitoring stop behavior.

Location of session logs

Choose a location where monitoring session logs are saved. The default location is C:\Users\Public\Documents\MaxRT\wRTOS\Monitor

Note: This path cannot be on a mapped drive or a UNC path name.

Note: This file path cannot exceed 200 characters.

To change this setting:

Enter a file path in the text box or Browse for a location.

Maximum session log size on disk (megabytes)

Set the maximum value, in megabytes, of a single monitoring session folder.

To change this setting:

Drag the slider or enter a new value in the text entry field. The default value is 200 MB.

Maximum disk space allowed (megabytes)

Set the maximum amount, in megabytes, of disk space allowed for all monitoring session folders.

To change this setting:

Drag the slider or enter a new value in the text entry field. The default is 10% free disk space.

Configure Stop Behavior

You can configure the stop behavior of a monitoring session when any of the below scenarios is reached:

  • The maximum number of events to collect is reached
  • The maximum session folder size is reached
  • The maximum disk space allowed is reached

To change this setting:

Choose an option:

  • Stop collecting (default) causes monitoring to stop automatically in any of the above scenarios.
  • Continue collecting, discarding oldest events, until stopped causes monitoring to continue collecting events until manually stopped. In this configuration, the oldest events in the session are discarded to make room for the most recent events collected until monitoring is stopped.

RELATED Topics: