vCenter

 View Only
  • 1.  Measuring Java heap space

    Posted Apr 09, 2009 06:51 PM
    The JMX capability show the amount of heap space free for the VM. Is there a way to get the amount of heap spaced used? This would be valuable information for an alert that would show when the VM is approaching the upper bound using the value set in the -Xmx flag when the VM is started.


  • 2.  RE: Measuring Java heap space

    Posted Apr 13, 2009 06:38 AM
    Hi,

    according to
    http://support.hyperic.com/display/hypcomm/Sun+JVM+1.5+server

    Heap Memory Used is a supported metric, even though it is not enabled by default

    To enable this metric for all your JVMs please refer to:
    http://support.hyperic.com/display/DOC/ui-Admin.Monitor.MetricTemplate

    Cheers,
    Mirko


  • 3.  RE: Measuring Java heap space

    Posted Apr 13, 2009 10:30 AM
    Mirko, I think original poster was asking whether HQ could define alert condition as correlation from one metric to other. Like if metricA is lower that metricB. Have you heard whether hyperic is planning to do features like this?

    As Mirko said, 'Heap Memory Used' could be used to track if memory is getting full. Of course you need to manually set the max value to alert condition.

    I guess it could be technically possible to create new custom metric to track 'Total Free Heap Size'. This metric would subtract used mem from max mem. This needs some java coding, thought.

    Default 'Heap Memory Free' will only give free mem from the already allocated heap size. And if Xmx and Xms differs, free heap metric doesn't tell the whole truth. Jvm could be started by defining same values to Xmx/Xms parameters, then default free heap mem should give much reliable results.


  • 4.  RE: Measuring Java heap space

    Posted Apr 14, 2009 04:13 AM
    Hi jvalkeal,

    Yes, you are are correct. The method used with the heap space free does not allow us to bound the limit and create an appropriate alert as the value will change.

    This would be most helpful for monitoring.

    Thanks,
    Brian