Show Table of Contents
3.4. Changing the Agent JVM Health Check Settings
One of the more common issues to have with the agent is out of memory errors. Sizing the agent JVM heap is difficult. The agent cannot over-consume system resources or it can affect overall system performance, yet it must have enough memory available to perform intensive tasks like metrics collection and drift monitoring.
The JVM health check periodically scans the JVM and checks its memory thresholds. If the available memory falls below a specified point, then the JVM process is restarted. This can help prevent the agent from running out of memory and shutting down in an unknown state.
Note
The JVM health check is beneficial, but it is not infallible. It is possible in some situations for the memory to be exhausted faster than the scan interval.
There are three parameters for the agent health check:
- The scan interval,
rhq.agent.vm-health-check.interval-msecs - The heap threshold,
rhq.agent.vm-health-check.low-heap-mem-threshold - The non-heap memory threshold,
rhq.agent.vm-health-check.low-nonheap-mem-threshold
To change the health check settings:
- Open the agent prompt. Use the
-noption to open the prompt without[root@server ~]# agentRoot/rhq-agent/bin/rhq-agent.sh -n
- Send the
setconfigwith the name of the preference to edit and its new value.> setconfig rhq.agent.vm-health-check.interval-msecs=3000 Set preference: rhq.agent.vm-health-check.interval-msecs=3000 > setconfig rhq.agent.vm-health-check.low-heap-mem-threshold=1.1 Set preference: rhq.agent.vm-health-check.low-heap-mem-threshold=1.1 > setconfig rhq.agent.vm-health-check.low-nonheap-mem-threshold=1.1 Set preference: rhq.agent.vm-health-check.low-nonheap-mem-threshold=1.1
- Restart the agent process to load the new configuration.
[root@server ~]# serverRoot/jon-server-3.2.GA/bin/rhqctl start --agent

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.