Calculation of used heap size in EAP 6

Solution Verified - Updated -

Issue

  • We are using below cli command to get the used heap size only but we are are not getting any output from this command.
jboss-cli.sh -c command="/core-service=platform-mbean/type=memory:read-resource(include-runtime=true, recursive=true, recursive-depth=10)" | head -9 | grep -i used | grep -o '[0-9]*"

While below command is working

jboss-cli.sh -c command="/core-service=platform-mbean/type=memory:read-resource(include-runtime=true, recursive=true, recursive-depth=10)" | head -9 | grep -i used

o/p -

"used" => 1108962808L

  • We want only used heap size in mb , what L denotes after the size of memory?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.