nAttrMon Limit memory
As with any other OpenAF script it’s possible to limit also the memory used by nAttrMon.
Setting the limits
Following the generic instructions for limiting memory in OpenAF scripts you should be a startup script to launch nAttrMon with the corresponding memory limits:
Unix/Mac:
nattrmon.sh:
export OAF_JARGS="-Xms256m -Xmx512m"
cd /path/to/nAttrMon/folder
/the/openAF/folder/oaf -f nattrmon.js
Windows:
nattrmon.bat:
set OAF_JARGS="-Xms256m -Xmx512m"
cd path\to\nAttrMon\folder
the\OpenAF\folder\oaf -f nattrmon.js
Note: For OpenAF versions <= 20220822 you need to add the OAF_JARGS variable to the OpenAF startups scripts (see how)
Which values to use
To limit memory you need to decide the base (Xms) and the maximum (Xmx) memory settings to use. These values will different depending on the inputs, validations and outputs configured in nAttrMon. So the best way is to actually measure it first and then trying to limit (Xmx) with different values giving some “slack”.
You can measure the internal nAttrMon Java heap by temporarially adding the input nAttrMon.