How to find Segment store size?

Avatar

Avatar

Junnu_ravali

Avatar

Junnu_ravali

Junnu_ravali

16-01-2020

How to fetch the SEGMENT_REPO_SIZE from JMX console through programmatically.

(JMX console link: http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3DSEGMENT_REPO_SIZE%2Ctype...)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

(val/1000)?string[".0"]}K

Likes

891

Correct Answer

(val/1000)?string[".0"]}K

Avatar

Jörg_Hoh

Employee

Total Posts

(val/1000)?string[".0"]}K

Likes

891

Correct Answer

(val/1000)?string[".0"]}K
Jörg_Hoh
Employee

16-01-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.)

Answers (2)

Answers (2)

Avatar

Avatar

berliant

Employee

Avatar

berliant

Employee

berliant
Employee

16-01-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-sy...

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

16-01-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