Viewing memory statistics by using an external application

External monitoring applications can access memory data that is published by Eclipse Amlen by subscribing to the Eclipse Amlen topic $SYS/ResourceStatistics/Memory.

To publish monitoring data on a topic, the Eclipse Amlen server must be running.

The published data is in JSON format. The published data always includes Version, NodeName, Timestamp, and ObjectType. NodeName is the name of the server and ObjectType is the name of the object that you are monitoring.

For more information about monitoring by using an external application, see Monitoring and reporting.

Monitoring data is automatically published every 2 seconds to the topic string $SYS/ResourceStatistics/Memory.

In MQTT, you cannot subscribe to a $SYS topic if you specify cleanSession=0. In JMS, you cannot subscribe to a $SYS topic if you use a durable subscription.

  1. Create an endpoint. You can use this endpoint to connect your external monitoring application to Eclipse Amlen and create a monitoring subscription. For more information about configuring an endpoint, see Configuring message hubs.
  2. Strengthen your security by configuring this endpoint specifically for monitoring, with connection and messaging policies to restrict access to monitoring data that is published on the topic root $SYS.
    For more information about configuring connection and messaging policies, see Configuring message hubs.
  3. Connect your external application to the endpoint that you created in step 1, and subscribe to the topic string $SYS/ResourceStatistics/Memory.

The following information is made available to the monitoring application:

  • Version
    String
    Specifies the version of server.
  • NodeName
    String
    Specifies the name of the server.
  • Timestamp
    Date/Time
    Specifies the date and time in ISO8601 format.
  • Object type
    String
    Specifies the type of object that you are monitoring.
  • MemoryTotalBytes
    Numeric
    This statistic shows the total amount of physical memory on Eclipse Amlen.
  • MemoryFreeBytes
    Numeric
    This statistic shows the amount of physical memory that is available.
  • MemoryFreePercent
    Numeric
    This statistic shows the amount of free memory as a percentage of total physical memory.
  • ServerVirtualMemoryBytes
    Numeric
    This statistic shows the amount of virtual memory that is being used by Eclipse Amlen.
  • ServerResidentSetBytes
    Numeric
    This statistic shows the amount of physical memory that is being used by Eclipse Amlen.
  • MessagePayloads
    Numeric
    This statistic shows the amount of memory that is being consumed by Eclipse Amlen for message payloads.
  • PublishSubscribe
    Numeric
    This statistic shows the amount of memory that is being consumed by Eclipse Amlen for publish/subscribe data structures. For example, topics and subscriptions.
  • Destinations
    Numeric
    This statistic shows the amount of memory that is being consumed by Eclipse Amlen for destinations on which messages can be buffered. For example, queues.
  • CurrentActivity
    Numeric
    This statistic shows the amount of memory that is being consumed by Eclipse Amlen for current activity. For example, transactions and message acknowledgements.
  • ClientStates
    Numeric
    This statistic shows the amount of memory that is being consumed by Eclipse Amlen for connected and disconnected clients.

The following example shows statistical information about the Eclipse Amlen volatile memory.

{ 
"Version":"1.2",
"NodeName":"mar#678",
"TimeStamp":"2014-06-26T12:52:41.226Z",
"ObjectType":"Memory",  
"MemoryTotalBytes":21042922112, 
"MemoryFreeBytes":713310208, 
"MemoryFreePercent":34
"ServerVirtualMemoryBytes":2202386432, 
"ServerResidentSetBytes":636817408, 
"MessagePayload": 1048576,
"PublishSubscribe":13107200, 
"CurrentActivity":7344112,
"ClientStates": 1048576,
}