-
1. Re: Monitoring used Java memory
xarous Jun 20, 2016 8:36 AM (in response to xarous)I've got a workaround using powershell to pull the value from the structure.
powershell.exe -command "$output = $(C:\Progra~2\twiddle\bin\twiddle.bat -s service:jmx:http-remoting-jmx://localhost:9990 get --noprefix jboss.as:core-service=platform-mbean`,type=memory heap-memory-usage | select-string 'used') ; $output -replace '.*used=' -replace '\}.*'"
-
2. Re: Monitoring used Java memory
ctomc Jun 20, 2016 9:35 AM (in response to xarous)why don't you collect memory info directly from jdk via jmx? It looks quite bit of roundtrip if you could access jdk's memory info directly.
see more on that at:
Monitoring and Management Using JMX Technology - Java SEMonitoring and Management Guide
on cli topic you are mentioning, starting with version 9, you could use enhanced syntax for reading complex attributes like this.
where command would then look like
/core-service=platform-mbean/type=memory/:read-attribute(name=heap-memory-usage.used)