How to find Segment store size? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

 

That's not really specific to AEM, but standard Java code.

 

MBeanServer mbs = java.lang.management.ManagementFactory.getPlatformMBeanServer;

ObjectName name = new ObjectName("org.apache.jackrabbit.oak:Metrics");

Object value = mbs.getAttribute(name,"Count");

System.out.println("Count = " + value.toString());

 

(please don't try to access this value via HTTP ... that's a guarantee to break.)

3 replies

joerghoh
joerghohAccepted solution
Employee
January 16, 2020

 

That's not really specific to AEM, but standard Java code.

 

MBeanServer mbs = java.lang.management.ManagementFactory.getPlatformMBeanServer;

ObjectName name = new ObjectName("org.apache.jackrabbit.oak:Metrics");

Object value = mbs.getAttribute(name,"Count");

System.out.println("Count = " + value.toString());

 

(please don't try to access this value via HTTP ... that's a guarantee to break.)

New Participant
January 20, 2020
Thank you!! That worked.
Employee
January 16, 2020

You can try to use AEM System Overview Dashboard and parse JSON output for a "Repository Size":

https://docs.adobe.com/content/help/en/experience-manager-learn/foundation/administration/use-the-system-overview-dashboard.html

Employee
January 16, 2020

I believe you can just trigger a CURL command, similar to below:

 

curl -u admin:admin http://<host>:<port>/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3DSEGMENT_REPO_SIZE%2Ctype%3DMetrics | grep "Attribute exposed for management" | cut -c 81-90