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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content