Netprobe Memory Debugging


The Netprobe has memory protection variables that prevent it from consuming too much memory.

For example, the following Netprobe log entry is an indication that memory protection features have been triggered:

 ERROR: NetProbe Restart Message: IMPORTANT - Contact your support provider; if supported directly by ITRS then (0) otherwise your usual support contact

This error exists as a way of preventing memory leaks. However, it can sometimes be triggered by a valid growth in the Netprobe memory usage.

A memory leak occurs when a component, such as the Netprobe, mismanages its memory allocations. For example:

  • Memory that is no longer needed is not released.
  • An object is stored in memory and cannot be accessed by running code.

This topic walks you through a method of debugging the Netprobe memory usage to identify possible occurrences of memory leak.

Caution: Signs of memory leak may look similar to other problems within the software, and can generally be deduced by a programmer by looking at the source code. When debugging, check for other factors that can account for memory usage.

Set up memory debugging

  1. In the Gateway Setup Editor, select the probe that you want to check for memory leak.
  2. In that probe, select the Debug tab.
  3. Under the Debug field, click Add new to add the following two modules:
  4. Under each module, add "*" to the sampler field value.
  5. Click Save current document to apply your changes.
  6. Success: The SAMPLING and SAMPLINGMEM modules begin to appear on the Netprobe log file.

Indication of success

To know if memory debugging is running as set, check the Netprobe logs for the following:

<Thu Nov 07 00:25:15> DEBUG: SAMPLING:* IN : MQ-QINFO[M Queue Info]
<Thu Nov 07 00:25:15> DEBUG: SAMPLINGMEM:* IN : workingSet = 12066816 bytes, pagefileUse =16617472 bytes
<Thu Nov 07 00:25:15> DEBUG: SAMPLINGMEM:* OUT : workingSet = 12189696 bytes, pagefileUse = 16650240 bytes, memoryDifference = 122880 bytes, memoryDifferenceTotal =1200128 bytes
<Thu Nov 07 00:25:15> DEBUG: SAMPLING:* OUT : MQ-QINFO[MQ Queue Info] [0.000000 sec]

SAMPLING and SAMPLINGMEM logs come as a set of IN and OUT logs.

To check for memory leaks, see the memoryDifference in the SAMPLINGMEM:* OUT line.

Interpret memoryDifference

If the memoryDifference is greater than 0 bytes, then a sampler has either allocated memory for persistent data (for example, a new trigger in the FKM plug-in) or it has a memory leak. On the other hand, a negative memoryDifference means that the sampler has returned memory to the system as it frees up resources.

In the sample log above, the MQ-QINFO plug-in shows signs of memory leak.

Caution: Some samplers, or the sub-systems that these are monitoring, come much later than the probe itself as a result of Active Times or trading times. For those cases, memory usage is valid. You may need to exercise some judgment in determining whether the memoryDifference is due to a memory leak or valid usage.

Further reading

For more information on Netprobe memory protection, see Netprobe Memory Protection Settings.