Previously i wrote a blog post about how to detect if a JBoss instance is started.
Here comes the Twiddle solution.
1. Enable the JMXConsole user by editing the <JBoss>/server/[instance]/conf/props/jmx-console-users.properties.
# A sample users.properties file for use with the UsersRolesLoginModule admin=admin
2. Go to <JBoss>/bin and run the following command.
- ./twiddle.sh -s localhost:1099 –user=admin –password=admin get jboss.system:type=Server Started
3. The above command assume your JBoss instance is using JBOSS_BINDING_SET=ports-default. If you have multiple JBoss instances running with different ports, you will need to alter the port number in the command. Say for ports-01.
- ./twiddle.sh -s localhost:1199 –user=admin –password=admin get jboss.system:type=Server Started
4. Just keep adding 100 to the port number with respect to your JBOSS_BINDING_SET setting.
5. If the JBoss instance has started, you will get the following output.
- Started=true
Done =)
Reference: twiddle reference guide