Subsystem Class

This class provides configuration and control operations for the RTX64 monitoring framework. It is important to understand the distinction between the Persistent Event Set and the Transitent Event Set. This class allows clients to configure two sets of enabled/disabled monitoring events:
-- The Persistent Event Set
-- The Transient Event Set
The Persistent Event Set is the set of enabled/disabled monitoring events persisted in the Registry. This set is configured using the RTX64 Control Panel. Each time the RTX64 Subsystem starts, the Persistent Event Set becomes the set of enabled monitoring events. The Transient Event Set only exists when monitoring is enabled. When the Transient Event Set exists, it controls which monitoring events are enabled/disabled. At the time monitoring is enabled, the Transient Event Set is initialized from the Persistent Event Set. The Transient Event Set is modified using the RTX64 Monitor utility. Changes to the Transient Event Set do not affect the Persistent Event Set. When monitoring is disabled, the Transient Event Set is destroyed. The following APIs in this class provide a bool parameter to control whether the API operates on the Transient Event Set or the Persistent Event Set:
MF_EVENT_KIND[] GetMonitorEvents(bool persistant)
MF_EVENT_KIND[] DisableMonitorEvents(MF_EVENT_KIND monitorEvent, bool persistent)
MF_EVENT_KIND[] DisableMonitorEvents(bool persistent)
MF_EVENT_KIND[] DisableMonitorEvents(MF_EVENT_KIND[] monitorEventList, bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(MF_EVENT_KIND monitorEvent, bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(bool persistent)
MF_EVENT_KIND[] EnableMonitorEvents(MF_EVENT_KIND[] monitorEventList, bool persistent)
If the bool parameter in each of the above APIs is set to true, the API operates on the Persistent Event Set, otherwise the API operates on the Transient Event Set. If monitoring is not enabled (i.e., the Transient Event Set does not exist) and these APIs are commanded to operate on the Transient Event Set, these APIs throw an exception.
Inheritance Hierarchy
System.Object
  IntervalZero.RTX64.RTX64Object
    IntervalZero.RTX64.Monitor.Subsystem

Namespace:  IntervalZero.RTX64.Monitor
Assembly:  IntervalZero.RTX64 (in IntervalZero.RTX64.dll) Version: 4.0.0.0 (File version: 4.5.0)

Syntax
public class Subsystem : RTX64Object, IMonitorSubsystem

The Subsystem type exposes the following members.

Constructors
NameDescription
Public methodSubsystem
Initializes a new instance of the Subsystem class
Top
Properties
NameDescription
Public propertyAutoEnable
If this property is true, the monitoring framework will automatically be enabled when the subysstem starts. Monitoring must be enabled before it can be started.
Public propertyAutoRotateLogFiles
If this property is set to false, when the size of the current session folder reaches the size limit specified by property LogSizeMax, the monitoring framework will stop writing monitoring event data to the current monitoring session. If this is set to true, when the size of the current session folder reaches the size limit specified by property LogSizeMax, the monitoring framework will rotate log files within the session folder, deleting the oldest file.
Public propertyAutoStart
If this property is true and property AutoEnable is also set to true, the monitoring framework will automatically be started when the Subsystem starts. Monitoring must be enabled before it can be started.
Public propertyCreationTime
Date and time the object was created.
(Inherited from RTX64Object.)
Protected propertyIsDisposed
True if the object has been disposed, false otherwise.
(Inherited from RTX64Object.)
Public propertyLogFolder
This property specifies the folder under which monitoring session folders are created. If this property is set, it must specify an existing folder. If the RTX64 Runtime is not installed, this property returns %PUBLIC%\Documents, where %PUBLIC% is expanded to the value of environment variable PUBLIC.
Public propertyLogSizeMax
This is the size limit (in MB) for how much disk space a single monitoring session folder can occupy. If this property is set to 0, monitoring events are not written to disk. If this property is changed, the Subsystem must be restarted for the change to take effect.
Public propertyMaximumFolderSizeThis is the size limit, in megabytes, for all session folders under folder %SYSTEMDRIVE%\Users\Public\Documents\IntervalZero\Monitor. If this property is changed, the Subsystem must be restarted for the change to take effect.
Public propertyMTBSize
This property specifies the the size (in megabytes) of the internal buffer used to transport monitoring events from real-time cores to Windows cores. If this property is changed, the Subsystem must be restarted for the change to take effect. If you encounter Data Lost events, you may want to increase the size of this buffer. This property cannnot be set to a value that is greater than three-quarters of the amount of RAM.
Public propertyName
Name of the object.
(Inherited from RTX64Object.)
Public propertyState
Returns the current state of the monitoring framework.
Top
Methods
NameDescription
Public methodDeleteAllSessions
This method deletes all monitoring sessions. This should only be used when the monitoring framework is not enabled.
Public methodDeleteSession
Deletes the specified monitoring session folder and all the files and folders it contains.
Public methodDisable
Disables the monitoring framework.
Public methodDisableMonitorEvents(Boolean)
Disables all events, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). If set to true, the events will be disabled in the Persistent Event Set, and the change will not take affect until monitoring is next enabled, otherwise the events will be disabled in the Transient Event Set.

Return Value

Type: 
An array specifying the current set of disabled events (either persistent or transient, depending on the value of parameter persistent).
Public methodDisableMonitorEvents(MF_EVENT_KIND, Boolean)
This method disables the event specified by parameter monitorEvent, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent).
Public methodDisableMonitorEvents(MF_EVENT_KIND, Boolean)
Disables the specified monitoring events, either in the Persistent Event Set or the Transient Event Set, depending on the value of parameter persistent.
Public methodDispose
Dispose method.
(Inherited from RTX64Object.)
Public methodEnable
Enables the monitoring framework. Monitoring must be enabled before it can be started.
Public methodEnable ComponentsThis method transiently or persistently enables monitor event generation for one or more product components.
Public methodEnableMonitorEvents(Boolean)
Enables all events, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent). If set to true, the events will be enabled in the Persistent Event Set, and the change will not take affect until monitoring is next enabled, otherwise the events will be enabled in the Transient Event Set.

Return Value

Type: 
An array specifying the current set of enbled events (either persistent or transient, depending on the value of parameter persistent).
Public methodEnableMonitorEvents(MF_EVENT_KIND, Boolean)
This method enbles the event specified by parameter monitorEvent, either in the Persistent Event Set or the Transitent Event Set (depending on the value of parameter persistent).
Public methodEnableMonitorEvents(MF_EVENT_KIND, Boolean)
Enables the specified monitoring events, either in the Persistent Event Set or the Transient Event Set, depending on the value of parameter persistent.
Protected methodFinalize
Finalizer.
(Inherited from RTX64Object.)
Public methodGetEnabledComponentsThis method returns the transient or persistent configuration specifying which product components currently have monitor event generation enabled
Public methodGetMaxEventsInSession Retrieves the persistent or transient value of the number of events to save in a monitor session.
Public methodGetMonitorEvents
Returns an array specifying which monitoring events are currently enabled. This array contains zero elements if no events are enabled.
Public methodGetPreTriggerEventsToSaveRetrieves the persistent or transient value of the number of pre-start-trigger events to save in a monitor session. Pre-start-trigger events are events that occur before the event that triggers the start of a monitoring session.
Public methodGetTriggers
This method returns the currently configured triggers for all kinds of events. Each element of the returned array corresponds to one enumerator in enumeration MF_EVENT_KIND. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Public methodGetTriggersForCustomEvents
This method returns an array containing the triggers for the first 100 custom event kind values (0 to 99) for event kind MF_EVENT_KIND_CUSTOM. The returned array is exactly 100 elements long. If the Subsystem is not started, this method throws an exception of type RTX64Exception. This method can be called when monitoring is stopped or started. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Protected methodOnNotifyPropertyChanged
Called when a property is changed
(Inherited from RTX64Object.)
Public methodPauseThis method pauses the current monitoring session. When in a Paused state, events are not collected. Use Resume to resume a monitoring session that has been paused.
Public methodResetAllMonitorProperties
Resets all monitoring-related configuration properties to their default values.
Public methodResetAllTriggers
This method resets all triggers for all kinds of events. If the Subsystem is not started, this method throws an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Public methodResetAutoEnable
Resets property [!:AutoEnabled] to its default value (false).
Public methodResetAutoRotateLogFiles
Resets property AutoRotateLogFiles to its default value (true).
Public methodResetAutoStart
Resets property AutoStart to it's default value (false).
Public methodResetEnabledComponentsThis method resets the monitor event generation enabled status for all product components to the default setting. By default, all product components have monitor event generation enabled. This affects the persistent configuration only, not the transient configuration.
Public methodResetEvents
Resets the Persistent Event Set to the default combination of enabled/disabled events (see Subsystem for details about the Persistent and Transient Event Sets). This change will take effect the next time monitoring is enabled.
Public methodResetLogFolder
Resets property LogFolder to its default value (%PROGRAMDATA%\IntervalZero\Monitor).
Public methodResetLogSizeMax
Resets property LogSizeMax to it default value (200 MB).
Public methodResetMaxEventsInSessionResets the persistent value of the number of events to save in a monitor session.
Public methodResetMaximumFolderSizeResets property MaximumFolderSize to its default value.
Public methodResetMTBSize
Resets property MTBSize to its default value (200 MB).
Public methodResetPreTriggerEventsToSaveResets the persistent value of the number of pre-start-trigger events to save in a monitor session.
Public methodResetTrigger(Subsystem.TriggerKinds)
This method resets the specified triggers so that they do not happen for certain kinds of events. Each element of array triggers specifies the triggers to reset for the kind of event specified by the enumerator in enumeration Monitor.MF_EVENT_KIND that corresponds to the index in the array. Array triggers must contain exacly MF_EVENT_KIND.MF_EVENT_KIND_MAX elements, otherwise an exception of type RTX64Excpetion is thrown. The triggers that are reset correspond to the bits that are set in each element of this array. If the Subsystem is not started, this method throws an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Public methodResetTriggers(MF_EVENT_KIND, Subsystem.TriggerKinds)
This method resets the specified triggers so that they do not happen for the specified kind of event (eventKind). Parameter triggers contains one or more of the flag enumerators from enumeration TriggerKinds specifying the triggers to be reset for this kind of event. If the Subsystem is not started, this method throws an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Public methodResetTriggersForCustomEvents
This method resets triggers for custom event kinds for event kind MF_EVENT_KIND_CUSTOM. Parameter customEventKindTriggers specifies the triggers to reset for the first 100 custom event kind values (0 to 99). This array must be exactly 100 elements long, otherwise an exception of type RTX64Exception is thrown. If the Subsystem is not started, this method throws an exception of type RTX64Exception. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already reset, they remain reset. Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
Public methodResumeThis method resumes the monitoring framework from a Paused state. When a monitoring session is resumed, it continues recording events in the current session. It does not create a new session in which to record events.
Public methodSetMaxEventsInSessionSets the transient value of the number of events to save in a monitor session.
Public methodSetPreTriggerEventsToSaveSets the transient value of the number of pre-start-trigger events to save in a monitor session. Pre-start-trigger events are events that occur before the event that triggers the start of a monitoring session.
Public methodSetTriggers(Subsystem.TriggerKinds)
This method sets the specified triggers to happen when certain kinds of events are generated. Each element of array triggers specifies the triggers to set for the kind of event specified by the enumerator in enumeration Monitor.MF_EVENT_KIND that corresponds to the index in the array. Array triggers must contain exacly MF_EVENT_KIND.MF_EVENT_KIND_MAX elements, otherwise an exception of type RTX64Exception is thrown. The triggers to be set correspond to the bits that are set in each element of this array. If the Subsystem is not started, this throws method an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. These flag enumerators can be mixed with each other using bitwise operators. The following kinds of monitoring events cannot have triggers set on them. Attempting to do so will cause an exception of type RTX64Exception to be thrown:
  • MF_EVENT_KIND_RESERVED (Reserved)
  • MF_EVENT_KIND_BUGCHECK_RTSS_RESERVED (Bugcheck RTSS)
  • MF_EVENT_KIND_MARKER (Marker)
  • MF_EVENT_KIND_SUBSYSTEM_STOP (Subsystem Stop)
  • MF_EVENT_KIND_FAST_SEMAPHORE_ACQUIRE (Fast Semaphore Acquire)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE (Fast Semaphore Release)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE_ALL (Fast Semaphore Release All)
  • MF_EVENT_KIND_WFSOEX_WAIT (WaitForSingleObjectEx Wait)
  • MF_EVENT_KIND_WFMOEX_WAIT (WaitForMultipleObjectEx Wait)
  • MF_EVENT_KIND_THREAD_SLEEP (Thread Sleep)
Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given kind of event has trigger X set, and this method is called to set only trigger Y for that kind of event, then that kind of event ends up with both trigger X and Y set.
Public methodSetTriggers(MF_EVENT_KIND, Subsystem.TriggerKinds)
This method sets the specified triggers to happen when the specified kind of event (parameter eventKind) is generated. Parameter triggers contains one or more of the flag enumerators from enumeration TriggerKinds specifying the triggers to be set for this kind of event. If the Subsystem is not started, this method throws an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. These flag enumerators can be mixed with each other using bitwise operators. The following kinds of monitoring events cannot have triggers set on them. Attempting to do so will cause an exception of type RTX64Exception to be thrown:
  • MF_EVENT_KIND_RESERVED (Reserved)
  • MF_EVENT_KIND_BUGCHECK_RTSS_RESERVED (Bugcheck RTSS)
  • MF_EVENT_KIND_MARKER (Marker)
  • MF_EVENT_KIND_SUBSYSTEM_STOP (Subsystem Stop)
  • MF_EVENT_KIND_FAST_SEMAPHORE_ACQUIRE (Fast Semaphore Acquire)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE (Fast Semaphore Release)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE_ALL (Fast Semaphore Release All)
  • MF_EVENT_KIND_WFSOEX_WAIT (WaitForSingleObjectEx Wait)
  • MF_EVENT_KIND_WFMOEX_WAIT (WaitForMultipleObjectEx Wait)
  • MF_EVENT_KIND_THREAD_SLEEP (Thread Sleep)
Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given kind of event has trigger X set, and this method is called to set only trigger Y for that kind of event, then that kind of event ends up with both trigger X and Y set.
Public methodSetTriggersForCustomEvents
This method sets triggers for custom event kinds for event kind MF_EVENT_KIND_CUSTOM. Parameter customEventKindTriggers specifies the triggers to be set for the first 100 custom event kind values (0 to 99). This array must be exactly 1000 elements long, otherwise an exception of type RTX64Exception is thrown. If the Subsystem is not started, this method throws an exception of type RTX64Exception. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods. IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given custom event kind has trigger X set, and this method is called to set only trigger Y for that custom event kind, then that custom event kind ends up with both trigger X and Y set.
Public methodStart
Starts the monitoring framework. Monitoring must be enabled (see method Enable) before it can be started.
Public methodStop
Stops the monitoring framework.
Public methodEnableComponentsThis method transiently or persistently toggles the enabled state of monitor event generation for one or more product components.
Top
Events
NameDescription
Public eventPropertyChanged
Event Fired when a property value is changed
(Inherited from RTX64Object.)
Top
See Also