I want to call JBoss 5x JMX's mbeans with linux shell script. Is there anyway to call JBoss 5x JMX's mbeans with Linux shell script?
Jboss shipped with twiddle script, you can get the list of Mbeans from jmx-console and query/invoke it through twiddle, such as
$JBOSS_HOME/twiddle.sh -s 127.0.0.1 invoke "jboss.system:type=ServerInfo" listMemoryPools "True"
$JBOSS_HOME/twiddle.sh -s 127.0.0.1 get "jboss.system:type=ServerInfo"
and you can also use nagios-jmx-plugin
java -jar check_jmx.jar -U service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector --username admin --password admin -O "jboss.system:type=ServerInfo" -A FreeMemory