This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
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...)
Solved! Go to Solution.
Views
Replies
Total Likes
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.)
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
Views
Replies
Total Likes
You can try to use AEM System Overview Dashboard and parse JSON output for a "Repository Size":
Views
Replies
Total Likes
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.)
Views
Replies
Total Likes
Views
Likes
Replies