Server self-monitoring

SAYMON can schedule a self-monitoring memory check. After this check, the results will be sent to an object specified in the server configuration.

You can configure self-monitoring with the following server configuration parameters:

  • server.self_object_id — ID of an object used for self-monitoring,

  • server.self_monitoring_period — Period between self-monitoring processes.

Self-monitoring checks return the following data:

  • Memory leak information,

  • General memory stats.

Results of a self-monitoring process are stored in the entity, the ID of which is set in the server.self_object_id parameter. Server also saves the memory dump in the following file:

If an object with the ID specified in the server.self_object_id doesn’t exist, server doesn’t perform the self-monitoring check.

Self-monitoring result has the following fields:

Field Description


Numerical type of the entity used for the self-monitoring processes.


ID of the entity used for the self-monitoring processes.


Period between self-monitoring processes.


Timestamp of the launch of a self-monitoring process.


Self-monitoring data.


Server’s main loop delay in milliseconds.


Server memory information.


true if there are memory leaks on the server.


Memory leak information.


Server memory usage.


Memory stats.

Server memory usage

Example of the server memory usage information
  rss: 23851008,
  heapTotal: 4907008,
  heapUsed: 2905912,
  external: 951886,
  arrayBuffers: 17574

Memory stats

Memory stats example
  gcScavengeCount: 1,
  gcScavengeTime: 1100880, // ns
  gcMarkSweepCompactCount: 2,
  gcMarkSweepCompactTime: 21157231, // ns
  gcIncrementalMarkingCount: 0,
  gcIncrementalMarkingTime: 0, //ns
  gcProcessWeakCallbacksCount: 0,
  gcProcessWeakCallbacksTime: 0, // ns
  total_heap_size: 16097280, // bytes
  total_heap_size_executable: 3670016, // bytes
  total_physical_size: 10741880, // bytes
  total_available_size: 1487689928, // bytes
  used_heap_size: 5691584, // bytes
  heap_size_limit: 1501560832, // bytes
  malloced_memory: 8192,
  peak_malloced_memory: 1185464,
  gc_time: 4587251 // ns