You can control some aspects of Monitoring Library’s behavior by setting the PropertyQosPolicy of the DomainParticipant, either via an XML QoS profile or in your application’s code prior to creating the DomainParticipant.
Two example QoS profiles are provided in
<path to examples1See Paths Mentioned in Documentation>/connext_dds/qos/MONITORING_LIBRARY_QOS_PROFILES.xml:
This is an example of how to enable Monitoring Library for your applications. It can be used as a guide to enabling Monitoring Library quickly in your applications.
This profile documents the QoS used by Monitoring Library. It can also be used as a starting point if you want to tune QoS for Monitoring Library (normally not necessary). Use cases for this include customizing DomainParticipant QoS (often the transports) to accommodate preferences or environment. This same profile can also be used to subscribe to the Monitoring Library Topics. This is useful in situations where the Monitoring Library information can be used directly by system components or it is not possible to use the RTI Monitor tool.
<NDDSHOME2See Paths Mentioned in Documentation>/resource/xml/RTI_MONITOR_QOS_PROFILES.xml is used by the RTI Monitor tool. See the
See the qos_library and qos_profile properties in Table 41.1 Configuration Properties for Monitoring Library for further information on when to use the example profiles in MONITORING_LIBRARY_QOS_PROFILES.xml.
Table 41.1 Configuration Properties for Monitoring Library lists the configuration properties that you can set for Monitoring Library. These properties are immutable; they cannot be changed after the DomainParticipant is created.
Property Name (all must be prepended with “rti.monitor.config.”) |
Property Value |
get_process_statistics |
This boolean value specifies whether or not Monitoring Library should collect CPU and memory usage statistics for the process in the topic rti/dds/monitoring/domainParticipantDescription. This property is only applicable for platforms that support obtaining CPU and memory usage from monitoring data. CPU and memory usage is not available on these platforms: AIX, VxWorks, INTEGRITY, and LynxOS. On Solaris platforms, CPU usage is available, but memory usage is not. CPU usage is reported in terms of time spent since the process has been started. It can be longer than the actual running time of the process on a multi-core machine. Default: true if unspecified |
To create a separate participant that will be used to publish monitoring information in the application, set this to the domain ID that you want to use for the newly created participant. The new participant is created with the default Qos (for example, that defined in USER_QOS_PROFILES.xml), unless the qos_library and qos_profile properties are set. Default: Not set (means you want to reuse the participant in your application that has monitoring turned on to publish statistics information for that participant) |
|
publish_period |
Period of time to sample and publish all monitoring topics, in units of seconds. Default: 5 if unspecified |
publish_thread_priority |
Priority of the thread used to sample and publish monitoring data. This value is architecture dependent. Default if unspecified: same as the default used in Connext DDS for the event thread: Windows systems: -2 Linux systems: -999999 (meaning use OS-default priority) |
publish_thread_stacksize |
Stack size used for the thread that samples and publishes monitoring data. This value is architecture dependent. Default if unspecified: same as the default used in Connext DDS for the event thread: Windows systems: 0 (meaning use the default size for the executable). Linux systems: -1 (meaning use OS’s default value). |
publish_thread_options |
Describes the type of thread. Supported values (may be combined with by OR’ing with ‘|’ as seen in the default below):
Default: FLOATING_POINT|STDIO (same as the default used in Connext DDS for the event thread) |
Specifies the name of the QoS library that will be used to create the monitoring library DomainParticipant, Publisher, and DataWriters. Default: Not set. If you don't set this property, the entities are created with the following QoS values:
|
|
Specifies the name of the QoS profile that will be used to create the monitoring library DomainParticipant, Publisher, and DataWriters. Default: Not set. If you don't set this property, the entities are created with the following QoS values:
|
|
reset_status_change_counts |
Monitoring Library obtains all statuses of all entities in the Connext DDS application. This boolean value controls whether or not the change counts in those statuses are reset by Monitoring Library. If set to true, the change counts are reset each time Monitoring Library is done accessing them. If set to false, the change counts truly reflect what users will see in their application and are unaffected by the access of the monitoring library. Default: false |
skip_monitor_entities |
This boolean value controls whether or not the entities created internally by Monitoring Library should be included in the entity counts published by the participant entity statistics topic. If set to true, the internal monitoring entities will not be included in the count. (Thirteen internal writers are created by the monitoring library by default.) Default: true |
skip_participant_ |
If set to true, DomainParticipant PropertyQosPolicy name and value pairs will not be sent out through the domainParticipantDescriptionTopic. This is necessary if you are linking with Monitoring Library and any of these conditions occur:
Default: false if unspecified |
skip_reader_ |
If set to true, DataReader PropertyQosPolicy name and value pairs will not be sent out through the dataReaderDescriptionTopic. This is necessary if you are linking with Monitoring Library and any of these conditions occur:
Default: false if unspecified |
skip_writer_properties |
If set to true, DataWriter PropertyQosPolicy name and value pairs will not be sent out through the dataWriterDescriptionTopic. This is necessary if you are linking with Monitoring Library and any of these conditions occur:
Default: false if unspecified |
topics |
Filter for monitoring topics, with regular expression matching syntax as specified in the Connext DDS documentation (similar to the POSIX fnmatch syntax). For example, if you only want to send description topics and the entity statistics topics, but NOT the matching statistics topics, you can specify “*Description,*EntityStatistics”. Default: * if unspecified |
usertopics |
Filter for user topics, with regular expression matching syntax as specified in the Connext DDS documentation (similar to the POSIX fnmatch syntax). For example, if you only want to send monitoring information for reader/writer/topic entities for topics that start with Foo or Bar, you can specify “Foo*,Bar*”. Default: * if unspecified |
verbosity |
Sets the verbosity on the monitoring library for debugging purposes (does not affect the topic/data that is sent out).
Default: 1 if unspecified |
writer_pool_buffer_max_size |
Controls the threshold at which dynamic memory allocation is used, expressed as a number of bytes. If the serialized size of the data to be sent is smaller than this size, a pre-allocated writer buffer pool is used to obtain the memory. If the serialized size of the data is larger than this value, the memory is allocated dynamically. This setting can be used to control memory consumption of the monitoring library, at the cost of performance, when the maximum serialized size of the data type is large (which is the case for some description topics’ data types) or if you have several participants on the same machine. The default setting is -1, meaning memory is always obtained from the writer buffer pool, whose size is determined by the maximum serialized size. |
© 2020 RTI