Search

3.4. Changing the Agent JVM Health Check Settings

download PDF
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:
  1. Open the agent prompt. Use the -n option to open the prompt without
    [root@server ~]# agentRoot/rhq-agent/bin/rhq-agent.sh -n
  2. Send the setconfig with 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
  3. Restart the agent process to load the new configuration.
    [root@server ~]# serverRoot/jon-server-3.3.0.GA/bin/rhqctl start --agent
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.