Monitoring application balancing
You can use the DISPLAY APSTATUS command to monitor the state of application balancing across a uniform cluster, and to investigate why the application is not balanced if that is unexpected.
Monitoring the current state of applications across queue managers in a cluster
From any queue manager in a uniform cluster you can get an overview of the current state of applications across all the queue managers of a cluster by running the DIS APSTATUS command.
From IBM® MQ 9.2.0 the TYPE field is also displayed in the output.
1 : DIS APSTATUS(*) type(APPL)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) CLUSTER(UNIDEMO)
COUNT(8) MOVCOUNT(8)
BALANCED(UNKNOWN)
TYPE (APPL)
This shows that there is an application called MYAPP
in the uniform cluster, and
currently there are eight instances, all eight of which are considered movable around the uniform
cluster. The balanced value of UNKNOWN
is a temporary value, which indicates that
the queue manager has not yet been though an attempt to rebalance the application if necessary.
1 : DIS APSTATUS(*) type(APPL)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) CLUSTER(UNIDEMO)
COUNT(8) MOVCOUNT(8)
BALANCED(NO)
TYPE (APPL)
This output shows that the application has eight instances, but that they are not balanced across the uniform cluster. At this point, it is worth looking at the distribution of applications in the cluster.
1 : DIS APSTATUS(*) type(QMGR)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(6) MOVCOUNT(6)
BALSTATE(HIGH) LMSGDATE(2019-05-24)
LMSGTIME(13:11:10) QMNAME(UNID001)
QMID(UNID001_2019-05-24_13.09.35)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(1) MOVCOUNT(1)
BALSTATE(LOW) LMSGDATE(2019-05-24)
LMSGTIME(13:11:03) QMNAME(UNID002)
QMID(UNID002_2019-05-24_13.09.39)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(1) MOVCOUNT(1)
BALSTATE(LOW) LMSGDATE(2019-05-24)
LMSGTIME(13:11:07) QMNAME(UNID003)
QMID(UNID003_2019-05-24_13.09.43)
TYPE (QMGR)
From this, you can see at this point in time that queue manager UNID001 has six instances, but queue managers UNID0002 and UNID0003 only have one each. The BALSTATE output gives an indication of the balance state the last time the queue manager reported it. However, be aware that the instance count might be more recent than the BALSTATE field.
This output also gives a good indication that the uniform cluster is distributing information about this application. The application is known to all queue manager instances in the uniform cluster, and the last message date and time is very recent.
Also, the ACTIVE field indicates that all queue managers in the cluster are considered to be communicating with one another; if ACTIVE is set to NO on any queue manager, it indicates that regular communication with it has been interrupted.
1 : DIS APSTATUS(*) type(QMGR)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(3) MOVCOUNT(3)
BALSTATE(OK) LMSGDATE(2019-05-24)
LMSGTIME(13:14:22) QMNAME(UNID001)
QMID(UNID001_2019-05-24_13.09.35)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(3) MOVCOUNT(3)
BALSTATE(OK) LMSGDATE(2019-05-24)
LMSGTIME(13:13:53) QMNAME(UNID002)
QMID(UNID002_2019-05-24_13.09.39)
AMQ8932I: Display application status details.
APPLNAME(MYAPP) ACTIVE(YES)
COUNT(2) MOVCOUNT(2)
BALSTATE(OK) LMSGDATE(2019-05-24)
LMSGTIME(13:13:47) QMNAME(UNID003)
QMID(UNID003_2019-05-24_13.09.43)
TYPE (QMGR)
The BALSTATE of the queue managers is now OK indicating that a steady state has been achieved.
Monitoring individual application instances
1 : DIS APSTATUS(*) type(LOCAL)
AMQ8932I: Display application status details.
APPLNAME(MYAPP)
CONNTAG(MQCT02DFE75C02EA0A20UNID001_2019-05-24_13.09.35MYAPP)
CONNS(1) IMMREASN(NONE)
IMMCOUNT(0) IMMDATE( )
IMMTIME( ) MOVABLE(YES)
AMQ8932I: Display application status details.
APPLNAME(MYAPP)
CONNTAG(MQCT02DFE75C02E50A20UNID001_2019-05-24_13.09.35MYAPP)
CONNS(1) IMMREASN(NONE)
IMMCOUNT(0) IMMDATE( )
IMMTIME( ) MOVABLE(YES)
AMQ8932I: Display application status details.
APPLNAME(MYAPP)
CONNTAG(MQCT02DFE75C02E60A20UNID001_2019-05-24_13.09.35MYAPP)
CONNS(1) IMMREASN(NONE)
IMMCOUNT(0) IMMDATE( )
IMMTIME( ) MOVABLE(YES)
TYPE (LOCAL)
One MQSC command read.
3 : DISPLAY APSTATUS('ServerApp') TYPE(LOCAL)
AMQ8932I: Display application status details.
APPLNAME(ServerApp)
CONNTAG(MQCT02DFE75C01800B20UNID001_2019-05-24_13.09.35ServerApp)
CONNS(1) IMMREASN(NOTCLIENT)
IMMCOUNT(0) IMMDATE( )
IMMTIME( ) MOVABLE(NO)
TYPE (LOCAL)
1 : DISPLAY APSTATUS('ClientApp') TYPE(LOCAL)
AMQ8932I: Display application status details.
APPLNAME(ClientApp)
CONNTAG(MQCT02DFE75C01CB0B20UNID001_2019-05-24_13.09.35ClientApp)
CONNS(1) IMMREASN(NOTRECONN)
IMMCOUNT(0) IMMDATE( )
IMMTIME( ) MOVABLE(NO)
TYPE (LOCAL)
2 : DISPLAY CONN(*) TYPE(CONN) WHERE(CONNTAG eq 'MQCT02DFE75C01CB0B20UNID001_2019-05-24_13.09.35ClientApp') ALL
AMQ8276I: Display Connection details.
CONN(02DFE75C01CB0B20)
EXTCONN(414D5143554E49443030312020202020)
TYPE(CONN)
PID(14656) TID(20)
APPLDESC(IBM MQ Channel) APPLTAG(ClientApp)
APPLTYPE(USER) ASTATE(NONE)
CHANNEL(SYSTEM.DEF.SVRCONN) CLIENTID( )
CONNAME(127.0.0.1)
CONNOPTS(MQCNO_HANDLE_SHARE_BLOCK,MQCNO_SHARED_BINDING)
USERID(MyUserid) UOWLOG( )
UOWSTDA( ) UOWSTTI( )
UOWLOGDA( ) UOWLOGTI( )
URTYPE(QMGR)
EXTURID(XA_FORMATID[] XA_GTRID[] XA_BQUAL[])
QMURID(0.0) UOWSTATE(NONE)
CONNTAG(MQCT02DFE75C01CB0B20UNID001_2019-05-24_13.09.35ClientApp)
TYPE (CONN)