I am currently using jconsole to monitor performance metrics of my Java application and would like to script this data acquisition
jconsole
You might find jvm-mon useful for this. It is a JVM monitoring tool for the command line that disaplys:
The metrics and charts update while the tool is open.
Sample: