MQ

 View Only

Using MQ Feature - IBM MQ V9.3.2 DISPLAY QMSTATUS

By Morag Hughson posted Thu May 18, 2023 03:31 AM

  
This is part of a series of blog posts which will cover features of IBM MQ that I happen to be using this week. I spend a lot of time using MQ, and not everything counts as an MQ Little Gem, or a Quirk, but is still interesting to hear about. Read other posts in this series.

I have held off writing this post in case someone from Hursley was going to cover it. Usually posts about the new release contents come from Hursley authors. However, I was somewhat immersed in the detailed minutia of the updates to DISPLAY QMSTATUS when IBM MQ V9.3.2 was released in order to make the appropriate updates to my What’s in Command Levels 93x blog post, and the updates required to MQGem Software MO71 and MQSCX tools which understand all the details of each command level of IBM MQ.

I hope this provides enough pedigree as to why I am writing a post about stuff in a new release.

So in IBM MQ V9.3.2, there are quite a lot of new fields added to the DISPLAY QMSTATUS command on the Distributed platform queue manager. While some of these fields have been added as a result of specific new features in the IBM MQ product, such as Native HA and Uniform Clustering, a great many of these are helpful to you, the MQ System administrator without changing anything to adopt these new features. This is why I wanted to write a post detailing the changes because it is these little, very useful changes that are sometimes lost in the hype that surrounds the big new features.

On what machine is my queue manager currently running?

There are a number of different High Availability solutions where your queue manager will be failed over, by one mechanism or another, to another machine. Features like Virtual IP addresses, floating IP addresses or comma-separated connection name lists mean that you don't have to worry about where the queue manager is, your application will use what is in its CONNAME field and hey presto it will connect to the queue manager. However, what if you actually WANT to know where it is?

In an earlier release, the machine the queue manager was running on (referred to as the HOSTNAME by IBM MQ) was initially added to the Queue Manager Active event message, which was pretty handy. If you collect those events you can watch the failover/failback pattern of your queue managers. Now, in IBM MQ V9.3.2 you can also discover where it running RIGHT NOW, by issuing the following command:

DISPLAY QMSTATUS HOSTNAME

You will see output like the following:

AMQ8705I: Display Queue Manager Status Details.
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         HOSTNAME(GEMWIN10)

What kind of logging is this queue manager using?

This one might be a bigger win for consultants that your day-to-day MQ operator. How many times have you started working with a queue manager and not known whether you are working with a circular or linear logging queue manager? Sure you can look in the qm.ini file if you have access to the local machine, or you can infer it from some of the other logging related fields.

Now in IBM MQ V9.3.2, you can simply issue the following command:

DISPLAY QMSTATUS LOGTYPE

and you will be immediately enlightened with output like the following:-

AMQ8705I: Display Queue Manager Status Details.
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         LOGTYPE(LINEAR)

This field has three possible values, CIRCULAR | LINEAR | REPLICATED. The last of which hints at the feature that caused this to be added. Native HA has a new type of log, a replicated log. This is equivalent to a linear log with automatic log management and automatic media images enabled. However, even if you are not using the Native HA feature, this field is a very helpful addition to DISPLAY QMSTATUS.

Other logging information

The DISPLAY QMSTATUS has always had a logging sub-section which you could view by issuing the following command:

DISPLAY QMSTATUS LOG

In IBM MQ V9.3.2 quite a number of extra fields have been added to it. The display below shows the new fields highlighted:

AMQ8705I: Display Queue Manager Status Details.
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         ARCHLOG( )
   ARCHSZ(0)                               CURRLOG(S0000011.LOG)
   LOGEXTSZ(66)                            LOGFSSZ(SHARED)
   LOGFSUSE(SHARED)                        LOGINUSE(45)
   LOGPATH(E:\mqmdata\log\MQ932\active\)
   LOGPRIM(3)                              LOGSEC(2)
   LOGSTRDA(2023-05-18)                    LOGSTRL(<0:0:11:20700>)
   LOGSTRTI(17:03:54)                      LOGTYPE(LINEAR)
   LOGUTIL(45)                             MEDIALOG(S0000000.LOG)
   MEDIASZ(3)                              RECLOG(S0000010.LOG)
   RECSZ(1)                                REUSESZ(0) 

So now you can see various extra details, the number of pre-allocated primary log files and the maximum number of secondary log files, and the size of each log file. Also the date, time and log sequence number (LSN) for the last log record recovered when the queue manager started.

There are also two fields that show the size of and the percentage used of the log file system. More on that in a moment.

File system information

This set of fields helps you to see the size of your queue manager file system (or systems). The display will show you the size of the queue manager file system, or two separate sets of numbers, one for the logging file system and one for the data file system if they are separate. If they are not separate, those numbers will show the special value "SHARED" which tells you to look in the single queue manager file system size.

Each of the file system metrics shows two numbers, the size of the file system in megabytes, and the percentage of the file system in use.

An additional handy field in this set is the queue manager data path. The log path has been part of the DISPLAY QMSTATUS output for many releases (see above), so it's good to see the data path added to the output as well.

AMQ8705I: Display Queue Manager Status Details.
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         DATFSSZ(SHARED)
   DATFSUSE(SHARED)                        DATPATH(E:\mqmdata\qmgrs\MQ932)
   LOGFSSZ(SHARED)                         LOGFSUSE(SHARED)
   QMFSSZ(954477)                          QMFSUSE(30)

Remaining new fields

For completeness, I'll just mention the remaining new fields that are output from DISPLAY QMSTATUS. There are a couple of fields specifically for those using a Uniform Cluster. They show whether you are using a Uniform cluster or not, and the name of said cluster.

AMQ8705I: Display Queue Manager Status Details. 
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         AUTOCLUS(UNIFORM)
   UNICLUS(MQGEM)

There are a set of new fields that are specific for when you are using a Native HA queue manager. On the main output of DISPLAY QMSTATUS there are two fields, showing the Native HA instance name, and the counts of instances, in sync and the total.

AMQ8705I: Display Queue Manager Status Details.
   QMNAME(MQ932)                           TYPE(QMGR)
   STATUS(RUNNING)                         INSTANCE(inst-0)
   QUORUM(3,3)

In addition to these the DISPLAY QMSTATUS command gains a TYPE field and when you request TYPE(NATIVEHA) output you see output like the following.

AMQ8705I: Display Queue Manager Status Details.
   INSTANCE(inst-0)                        TYPE(NATIVEHA)
   ROLE(ACTIVE)                            HAINITDA(2023-02-17)
   HAINITL(<0:0:9:16064>)                  HAINITTI(11.40.33)
   REPLADDR(inst-0(4444))
AMQ8705I: Display Queue Manager Status Details.
   INSTANCE(inst-2)                        TYPE(NATIVEHA)
   ROLE(REPLICA)                           BACKLOG(0)
   CONNACTV(YES)                           INSYNC(YES)
   REPLADDR(inst-2(4446))
AMQ8705I: Display Queue Manager Status Details.
   INSTANCE(inst-1)                        TYPE(NATIVEHA)
   ROLE(REPLICA)                           BACKLOG(0)
   CONNACTV(YES)                           INSYNC(YES)
   REPLADDR(inst-1(4445))

And that's a wrap - all the new fields on the DISPLAY QMSTATUS command on a Distributed V9.3.2 queue manager. I hope there are some here that you will find helpful when managing your own queue managers.


Morag Hughson is an MQ expert. She spent 18 years in the MQ Devt organisation before taking on her current job writing MQ Technical education courses with MQGem. She also blogs for MQGem. You can connect with her here on the IBM Community or on Twitter and LinkedIn.


#Using-MQ-feature#IBMMQ
#IBMChampion#ibmchampions-highlights-home#ibmchampions-highlights#ibmchampions-highlights-home

0 comments
53 views

Permalink