How to get multiple attribute values of an MBean using twiddle.sh in one command

Solution Verified - Updated -

Issue

  • We want to get the values of multiple MBeans of a single MBean using twiddle by running the command only once.
  • We do not want to run the twiddle.sh separately in order to get the different attributes one by one.

Example:
We use the following commands in order to monitor DataSource stats:
1). The total number of connections which JBoss Can create for this connection Pool

./twiddle.sh -u admin -p admin get "jboss.jca:name=TestDS,service=ManagedConnectionPool" MaxSize

2). Number Of Connections available in the Pool.

./twiddle.sh -u admin -p admin get "jboss.jca:name=TestDS,service=ManagedConnectionPool" AvailableConnectionCount

3). The Number of connections which are currently being used by the applications.

./twiddle.sh -u admin -p admin get "jboss.jca:name=TestDS,service=ManagedConnectionPool" InUseConnectionCount
  • But we need an option so that we can achieve the same goal by running a single command.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content