Practical mastering IBM MQ basics
Performance evaluation (1) Topology
*This series may be revised based on the latest mqpgf/mqpcf. Please always download and use the latest version.
Over the next few times, I'll show you how to perform IBM MQ performance measurements.
At several stages of system review / design / development, performance evaluations may be required according to the requirements of each stage.
As a result, the system configuration and application design will be reviewed.
IBM has published a performance report, "IBM MQ Family - Performance Reports" with several platforms and workload topologies (test configurations).
Making predictions by referring to these is also a useful task, but if possible, there will often be requests to verify on the actual machine.
Here are some examples of using mqpgf / mqpgfc to evaluate performance with some of the workload topologies introduced by IBM and the MQ cluster configuration(IBM performance report does not have MQ cluster configuration) added by us.
The performance test sends and receives a specified number of messages in the form of requests and replies between two MQ applications, and measures the Round Trips / sec. The MQI program mqpgf (c) is used on both the requester side and the reply side. If you want to test with a program other than mqpgf(c), you will need to customize the sample script provided by yourself. The test cases cover local connections, server-to-server connections, client connections, and cluster configurations. For each test, you can specify the sent data file, sent message length, sent/received count, parallel application launch count-process count/thread count, persistent/non-persistent message, and so on.
Precautions for conducting performance tests
Download Module
The test scripts used in this test have been validated on Windows (PowerShell), Linux (bash), HPE NonStop (ksh) and are included in the download module. However, please note that the HPE NonStop version of mqpgf(c)/mqpcf(c) themselves are not included in the download module.
Linux and HPE NonStop scripts are common and '#!/bin/sh' is specified.
Normally '/bin/sh' is often linked to bash on Linux and ksh on Unix, and it has been confirmed to work with both bash and ksh.
If the /bin/sh' of the environment you want to validate is linked to a shell other than bash or ksh, change the beginning of the script to point to bash or ksh. (Example: #!/bin/bash and #!/bin/ksh)
Data for testing
(Important) In addition, the function to read the data to be sent and received from the file can be implemented only in the fully supported version of mqpgf(c), and cannot be used in the normal version. If it is not read from a file, the "Workload name" specified in the argument is used as the message, and it is added after the dummy data (0x00) until it reaches the "message length" specified separately. Using such data when converting, compressing, using SSL/TLS, etc. may result in completely different test results than when using real data. Please be aware of this when conducting the test.
Using Thread
Threads are not available in some tests for parallel running applications. Also, up to 5 queues and channels are predefined in the provided configuration file for parallel launch of the application in a particular test. If you need to specify a larger number of applications for this, you need to add channel and queue definitions to the configuration file.
Performance test configuration
To run all of the sample scripts, you need to configure two queue managers connected by multiple SDR/RCVR and CLUSSDR/CLUSRCVR channels, and one MQ client machine. A script that automatically configures these is also provided. The test scripts and queue manager creation scripts provided are so simple that you can easily customize and use them to suit your requirements. Each machine can be used with any combination of Windows / Linux / HPE NonStop.
Each channel can also be configured as an SSL/TLS channel.
Workload topology
The workloads (test cases) targeted here are as shown in the table below. There are four types: local connection, client connection, server-to-server connection, and an additional cluster configuration.
In all these cases, the message will be sent and received according to the following flow.
- ・Send a request message from the source side
- ・Receive a request message on the response side
- ・Send a response message from the response side
- ・Receive a response message on the source side
In all cases, the method of associating the request message and the response message by MsgId and CorrelId is used. The requester only waits for messages that have the same CorrelId as the request message's MsgId. The responder copies the MsgId of the request message to the CorrelId of the response message.
The number of transmissions / receptions per second (Round Trips / sec) on the source side is displayed at the end as the measurement result.
RR-1 MQI Local Bindings
On the RR-1, both the requester and the responder connect to the local queue manager in bind mode. There are two types of scripts: a script that threads the connection from Requester / Resonder to each queue manager (mqpgf -ni option) and a script that starts in a separate process (starts mqpgf for each connection).
RR-2 MQI Client Bindings
In RR-2, the requester connects to the queue manager in client mode and the responder connects to the queue manager in bind mode. For both Requester / Resonder, there are two types of scripts: a script that threads the connection to each queue manager (mqpgf(c) -ni option) and a script that starts in a separate process (starts mqpgf(c) for each connection). Any combination is available.
RR-5 MQI Distributed Queuing
In the RR-5, the requester and responder connect to different local queue managers connected by the SNDR / RCVR channel. No script is provided to thread the connection. For both requesters and responders, the connection to each queue manager is started by a separate process for each connection, and different channels and queues are used.
PL-1 MQ Cluster Configuration
In PL-1, requesters and responders connect to different queue managers in the cluster, respectively. No script is provided to thread the connection. For both requesters and responders, the connection to each queue manager is started by a separate process for each connection, and different queues are used.
Files and placement for performance testing
The following is a list of directories that contain files provided for performance testing. Separate configuration files are provided to facilitate performance comparisons with and without the TLS channel. You may change the directory name.
Directory | Type | Default QMGR Name |
script_s | Source side QMGR | PLQMS |
script_s_TLS | Source side QMGR(with TLS channels) | PLQMST |
script_r | Response side QMGR | PLQMR |
script_r_TLS | Response side QMGR(with TLS channels) | PLQMST |
script_c | Client side | (Connect to PLQMS) |
script_c_TLS | Client side(with TLS channels) | (Connect to PLQMST) |
The following is a list of provided files. Files with the same name are identical except for those with ".ini" or ".bat" extensions. All scripts placed on the client machine will be executed over the client connection. The required sub-directories are also shown. The sub-directories can be renamed.
Machine | Windows | Linux/NonStop | Description |
Source QM | cpfqmgr.ps1 | cpfqmgr.sh | QMGR creation script |
dir:script_s(_TLS) | PLQMS(T).mqsc.src | PLQMS(T).mqsc.src | QMGR configuration file |
PLQMS(T).ini | PLQMS(T).ini | QMGR configuration parameters | |
runpfmts.bat | runpfmts.ini | Test execution parameters | |
runpfmts.ps1 | runpfmts.sh | Test list execution script | |
RR_1_s.ps1 | RR_1_s.sh | RR-1(process) implementation | |
RR_1_s_t.ps1 | RR_1_s_t.sh | RR-1(thread) implementation | |
RR_2_s.ps1 | RR_2_s.sh | RR-2(process) implementation | |
RR_2_s_t.ps1 | RR_2_s_t.sh | RR-2(thread) implementation | |
RR_5_s.ps1 | RR_5_s.sh | RR-5 implementation | |
PL_1_s.ps1 | PL_1_s.sh | PL-1 implementation | |
ckchl.ps1 | ckchl.sh | Check channel status | |
stachl.ps1 | stachl.sh | Channel start | |
ckque.ps1 | ckque.sh | Check queue status | |
clrque.ps1 | clrque.sh | Queue clear | |
dltmsg.ps1 | dltmsg.sh | Delete messages on queue | |
lib/libpfmts.ps1 | lib/libpfmts.sh | Common function library | |
data/ | data/ | For transmission data file | |
list/ | list/ | For test execution list | |
logs/ | logs/ | For execution log | |
out/ | out/ | For test list output files | |
Responder QM | cpfqmgr.ps1 | cpfqmgr.sh | QMGR creation script |
dir:script_r(_TLS) | PLQMR(T).mqsc.src | PLQMR(T).mqsc.src | QMGR configuration file |
PLQMR(T).ini | PLQMR(T).ini | QMGR configuration parameters | |
runpfmts.bat | runpfmts.ini | Test execution parameters | |
runpfmts.ps1 | runpfmts.sh | Test list execution script | |
RR_5_r.ps1 | RR_5_r.sh | RR-5 implementation | |
PL_1_r.ps1 | PL_1_r.sh | PL-1 implementation | |
ckchl.ps1 | ckchl.sh | Check channel status | |
stachl.ps1 | stachl.sh | Channel start | |
ckque.ps1 | ckque.sh | Check queue status | |
clrque.ps1 | clrque.sh | Queue clear | |
dltmsg.ps1 | dltmsg.sh | Delete messages on queue | |
lib/libpfmts.ps1 | lib/libpfmts.sh | Common function library | |
data/ | data/ | For transmission data file | |
list/ | list/ | For test execution list | |
logs/ | logs/ | For execution log | |
out/ | out/ | For test list output files | |
MQ Client | runpfmts.bat | runpfmts.ini | Test execution parameters |
dir:script_c(_TLS) | runpfmts.ps1 | runpfmts.sh | Test list execution script |
RR_2_c.ps1 | RR_2_c.sh | RR-2(process) implementation | |
RR_2_c_t.ps1 | RR_2_c_t.sh | RR-2(thread) implementation | |
ckchl_c.ps1 | ckchl_c.sh | Check channel status | |
ckque_c.ps1 | ckque_c.sh | Check queue status | |
clrque_c.ps1 | clrque_c.sh | Queue clear | |
dltmsg_c.ps1 | dltmsg_c.sh | Delete messages on queue | |
lib/libpfmts.ps1 | lib/libpfmts.sh | Common function library | |
data/ | data/ | For transmission data file | |
list/ | list/ | For test execution list | |
logs/ | logs/ | For execution log | |
out/ | out/ | For test list output files |
* mqpgf(c)/mqpcf(c) must be made available for reference via PATH.
Creating a source and a response queue manager
The files used for creation are cpfqmgr.ps1/cpfqmgr.sh, PLQMS(T).mqsc.src, PLQMS(T).ini on the source side, and cpfqmgr.ps1/cpfqmgr.sh, PLQMR(T).mqsc.src, PLQMR(T).ini on the response side, respectively. cpfqmgr.ps1 and cpfqmgr.sh are the same on the source and response side. The file names "PLQMS(T)" and "PLQMR(T)" must match the queue manager name to be created and can be changed. If you use a queue manager with another name, also rename the PLQMS(T).mqsc.src and PLQMS(T).ini files.(<QMGR>.mqsc.src, <QMGR>.ini)
Editing the parameter file
Edit the parameters in the <QMGR>.ini file (default: PLQMS(R).ini).
This parameter is used to change the value in the place folder of the same name in the <QMGR>.mqsc.src file (default: PLQM(S/R).mqsc.src).
In most cases, the content will be the same on both the source side and the response side, but depending on the network configuration, it may be necessary to set different values for CONNAME_(S/R), etc.
Set it to appropriate values according to your environment.
When evaluating over the SSL/TLS channels, also specify appropriate values for CERTLABL, SSLCIPH, and SSLKEYR.
MCAUSER and SSLKEYR enclose the value to be specified in single quotes.
Since SSLKEYR is under the queue manager directory by default, deleting the queue manager will also delete the SSL key repository.
Therefore, we recommend using other directories.
Please note that the specification method is different between GSkit(Windows/Linux/Unix) and Openssl (HPE NonStop).
Please refer to the product manual for details.
Below is an example <QMGR>.ini file when using a TLS channel.
#--------------------------------------------------------- # # MQSC parameter file # # History # # Date Create/Update Description # 2022.02.21 Pulsar Integration Inc. Initial Version # #--------------------------------------------------------- #place holder, value LISTENER_PORT_S,1414 LISTENER_PORT_R,1415 CLUSTER_NAME1,PLCT01 CONNAME_S,localhost CONNAME_R,localhost QMNAME_S,PLQMST QMNAME_R,PLQMRT MCAUSER,'mqm' CERTLABL,PLQMSA SSLCIPH,TLS_RSA_WITH_AES_256_CBC_SHA256 *For Gskit, specify SSLKEYR up to the part of the key repository file name excluding the extension. SSLKEYR,'C:\Users\pulsar\serverssl\PLQMST\key' *for Windows SSLKEYR,'/home/pulsar/serverssl/PLQMST/key' *for Linux *For Openssl, specify up to the directory portion of the key repository in SSLKEYR. SSLKEYR,'/home/pulsar/serverssl/PLQMST' *for HPE NonStop
Parameters | Default Values | Description |
LISTENER_PORT_S | 1414 | Source side listener port |
LISTENER_PORT_R | 1415 | Response side listener port |
CLUSTER_NAME1 | PLC01/PLCT01 | Cluster name(Non-TLS/TLS Channel) |
CONNAME_S | localhost | IP address or host name to the source QMGR (set to CLUSRCVR) |
CONNAME_R | localhost | IP address or host name to the response side QMGR |
QMNAME_S | PLQMS(T) | Source side QMGR name |
QMNAME_R | PLQMR(T) | Response side QMGR name |
MCAUSER | ' ' | MCA User |
CERTLABL | PLQMSA | Certificate label(TLS Channel) |
SSLCIPH | TLS_RSA_WITH_AES_ | CipherSpec(TLS Channel) |
256_CBC_SHA256 | ||
SSLKEYR | ' ' | SSL/TLS Key Repository(TLS Channel) |
Each of these parameters rewrites the place folder in the <QMGR>.mqsc.src file.
Note that the value set for CONNAME_S/R is only the ip-addr or Host name, not include the port.
LISTENER_PORT_S/R is used for the port set in the CONNAME parameter of the channel.
* Any combination of parameters and values in the parameter file can be added. In <QMGR>.mqsc.src, add a place folder with the added parameters enclosed in "<" and ">".
Below is an example of <QMGR>.mqsc.src file when using TLS channel.
<QMGR>.mqsc.src:
***********************************************************
*
* MQSC command scripts for TLS for source QMGR
*
* History
*
* Date Create/Update Description
* 2022.02.22 Pulsar Integration Inc. Initial Version
*
***********************************************************
*********************
* Listener
*********************
def listener(listener) trptype(tcp) port(<LISTENER_PORT_S>) control(qmgr) replace
sta listener(listener)
*********************
* Queue manager
*********************
*=============================
* DESABLE SEQURITY
*=============================
alter qmgr chlauth(disabled) connauth(' ') certlabl(<CERTLABL>) sslkeyr(<SSLKEYR>)
*********************
* Channels
*********************
*=============================
* SERVER CONNECTION CHANNELS
*=============================
def chl(PLQMS.MQICHL) chltype(svrconn) mcauser(<MCAUSER') certlabl(<CERTLABL>) +
sslciph(<SSLCIPH>) replace
*========================
* SDR and RCVR channels
*========================
def ql(PLQMR) usage(xmitq) replace
def chl(PLQMS.PLQMR) chltype(sdr) conname('<CONNAME_R>(<LLISTENER_PORT_R>') +
xmitq(PLQMR) discint(0) certlabl(<CERTLABL>) sslciph(
Run queue manager creation script
The script must be run by the MQ admin user. And load the MQ environment before execution.
The operation is the same on both the source side and the response side.
For Windows, run it from the command prompt.
You may need to run the command prompt as an administrator.
The command execution method is as follows.
In this example, the <QMGR>.mqsc.src file is automatically loaded.
For Windows: Cmd> PowerShell -File ./cpfqmgr.ps1 -m <QMGR> For Linux/HPE NonStop: $ ./cpfqmgr.sh <QMGR>
*Option descriptions
-m or 1st argument: Queue manager name
If you want to specify a script file with a name other than the default, do the following
Example of specifying <QMGR>.mqsc.src.test as the script file: For Windows: Cmd> PowerShell -File ./cpfqmgr.ps1 -m <QMGR> -f <QMGR>.mqsc.src.test For Linux/HPE NonStop: $ ./cpfqmgr.sh <QMGR> <QMGR>.mqsc.src.test
*Option descriptions
-f: Script file name for queue manager creation
Below is an example of running the script when using the TLS channel on the Linux response side, but all are the same for the source side and Windows/HPE NonStop.
$ ./cpfqmgr.sh PLQMRT remove PLQMRT.mqsc FOLDER: <LISTENER_PORT_S> VALUE: 1414 FOLDER: <LISTENER_PORT_R> VALUE: 1415 FOLDER: <CLUSTER_NAME1> VALUE: PLCT01 FOLDER: <CONNAME_S> VALUE: 111.111.111.111 FOLDER: <CONNAME_R> VALUE: 999.999.999.999 FOLDER: <QMNAME_S> VALUE: PLQMST FOLDER: <QMNAME_R> VALUE: PLQMRT FOLDER: <MCAUSER> VALUE: 'mqm' FOLDER: <CERTLABL> VALUE: PLQMRA FOLDER: <SSLCIPH> VALUE: TLS_RSA_WITH_AES_256_CBC_SHA256 FOLDER: <SSLKEYR> VALUE: '/home/mqm/serverssl/PLQMR/key' Command: crtmqm PLQMRT Are you sure you want to run above command? [y/n]:
The contents of reading <QMGR>.ini first are output. Enter "y" to accept.
IBM MQ queue manager 'PLQMRT' created. Directory '/var/mqm/qmgrs/PLQMRT' created. The queue manager is associated with installation 'Installation2'. Creating or replacing default objects for queue manager 'PLQMRT'. Default objects statistics : 83 created. 0 replaced. 0 failed. Completing setup. Setup completed.
Once the queue manager is created, the queue manager is subsequently started.
Starting Qmgr: PLQMRT Command: strmqm PLQMRT IBM MQ queue manager 'PLQMRT' starting. The queue manager is associated with installation 'Installation2'. 6 log records accessed on queue manager 'PLQMRT' during the log replay phase. Log replay for queue manager 'PLQMRT' complete. Transaction manager state recovered for queue manager 'PLQMRT'. Plain text communication is enabled. IBM MQ queue manager 'PLQMRT' started using V9.2.4.0. Waiting queue manager startup 5 sec ... Waiting command server startup 3 sec ...
After the queue manager starts, the PLQMST.mqsc configuration definition file is loaded with PLQMRT.mqsc.src modified with PLQMRT.ini.
Command: mqpcf mqsc -qm PLQMRT -wi 60 -f ./PLQMRT.mqsc MQSC Command [1] : def listener(listener) trptype(tcp) port(1415) control(qmgr) replace 1: AMQ8626I: IBM MQ listener created. MQSC Command [2] : sta listener(listener) 1: AMQ8021I: Request to start IBM MQ listener accepted. MQSC Command [3] : alter qmgr chlauth(disabled) connauth(' ') certlabl(PLQMRA) sslkeyr('/home/mqm/serverssl/PLQMR/key') 1: AMQ8005I: IBM MQ queue manager changed. MQSC Command [4] : def chl(PLQMR.MQICHL) chltype(svrconn) mcauser('mqm') certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [5] : def ql(PLQMS) usage(xmitq) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [6] : def chl(PLQMR.PLQMS) chltype(sdr) conname('111.111.111.111(1414)') xmitq(PLQMS) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [7] : def chl(PLQMS.PLQMR) chltype(rcvr) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [8] : def ql(PLQMS2) usage(xmitq) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [9] : def chl(PLQMR.PLQMS.2) chltype(sdr) conname('111.111.111.111(1414)') xmitq(PLQMS2) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [10] : def chl(PLQMS.PLQMR.2) chltype(rcvr) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [11] : def ql(PLQMS3) usage(xmitq) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [12] : def chl(PLQMR.PLQMS.3) chltype(sdr) conname('111.111.111.111(1414)') xmitq(PLQMS3) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [13] : def chl(PLQMS.PLQMR.3) chltype(rcvr) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [14] : def ql(PLQMS4) usage(xmitq) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [15] : def chl(PLQMR.PLQMS.4) chltype(sdr) conname('111.111.111.111(1414)') xmitq(PLQMS4) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [16] : def chl(PLQMS.PLQMR.4) chltype(rcvr) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [17] : def ql(PLQMS5) usage(xmitq) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [18] : def chl(PLQMR.PLQMS.5) chltype(sdr) conname('111.111.111.111(1414)') xmitq(PLQMS5) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [19] : def chl(PLQMS.PLQMR.5) chltype(rcvr) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [20] : alter qmgr repos(PCLT01) 1: AMQ8005I: IBM MQ queue manager changed. MQSC Command [21] : def chl(TO.PLQMR) chltype(clusrcvr) conname('999.999.999.999(1415)') cluster(PCLT01) discint(0) certlabl(PLQMRA) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [22] : def chl(TO.PLQMS) chltype(clussdr) conname('111.111.111.111(1414)') cluster(PCLT01) discint(0) sslciph(TLS_RSA_WITH_AES_256_CBC_SHA256) replace 1: AMQ8014I: IBM MQ channel created. MQSC Command [23] : def ql(REQ1) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [24] : def ql(REQ2) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [25] : def ql(REQ3) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [26] : def ql(REQ4) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [27] : def ql(REQ5) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [28] : def ql(CQR1) cluster(PCLT01) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [29] : def ql(CQR2) cluster(PCLT01) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [30] : def ql(CQR3) cluster(PCLT01) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [31] : def ql(CQR4) cluster(PCLT01) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [32] : def ql(CQR5) cluster(PCLT01) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [33] : def qr(REPS1) rname(REP1) rqmname(PLQMST) XMITQ(PLQMS) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [34] : def qr(REPS2) rname(REP2) rqmname(PLQMST) XMITQ(PLQMS2) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [35] : def qr(REPS3) rname(REP3) rqmname(PLQMST) XMITQ(PLQMS3) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [36] : def qr(REPS4) rname(REP4) rqmname(PLQMST) XMITQ(PLQMS4) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [37] : def qr(REPS5) rname(REP5) rqmname(PLQMST) XMITQ(PLQMS5) replace 1: AMQ8006I: IBM MQ queue created. MQSC Command [38] : refresh security type(ssl) 1: AMQ8560I: IBM MQ security cache refreshed. $
Start Channels
After creating the queue manager on both the source side and the response side, start the sending channels.
For Windows: Cmd> PowerShell -File ./stachl.ps1 -m <QMGR> or PS> ./stachl -m <QMGR> For Linux/HPE NonStop: $ ./stachl.sh <QMGR>
*Option descriptions
-m or 1st argument: Queue manager name
The following is an example executed on the response side of Linux, but the same applies to the source side and Windows / HPE NonStop.
$ ./stachl.sh PLQMRT mqpcf sta -qm PLQMRT -c PLQMR.PLQMS Channel Start Success. Channel Name : PLQMR.PLQMS mqpcf sta -qm PLQMRT -c PLQMR.PLQMS.2 Channel Start Success. Channel Name : PLQMR.PLQMS.2 mqpcf sta -qm PLQMRT -c PLQMR.PLQMS.3 Channel Start Success. Channel Name : PLQMR.PLQMS.3 mqpcf sta -qm PLQMRT -c PLQMR.PLQMS.4 Channel Start Success. Channel Name : PLQMR.PLQMS.4 mqpcf sta -qm PLQMRT -c PLQMR.PLQMS.5 Channel Start Success. Channel Name : PLQMR.PLQMS.5 mqpcf sta -qm PLQMRT -c TO.PLQMS MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[4031] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] $ mqrc 4031 4031 0x00000fbf MQRCCF_CHANNEL_IN_USE $ *Reason code 4031 MQRCCF_CHANNEL_IN_USE is displayed because the CLUSSDR channel has already started automatically.
Check the status to see if the channel started successfully.
For Windows: Cmd> PowerShell -File ./ckchl.ps1 -m <QMGR> or PS> ./ckchl -m <QMGR> For Linux/HPE NonStop: $ ./ckchl.sh <QMGR>
*Option descriptions
-m or 1st argument: Queue manager name
$ ./ckchl.sh PLQMRT mqpcf chs -qm PLQMRT -c PLQMR.MQICHL STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c PLQMR.PLQMS STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS) CHLTYPE(SDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMS) mqpcf chs -qm PLQMRT -c PLQMS.PLQMR STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c PLQMR.PLQMS.2 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS.2) CHLTYPE(SDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMS2) mqpcf chs -qm PLQMRT -c PLQMS.PLQMR.2 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c PLQMR.PLQMS.3 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS.3) CHLTYPE(SDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMS3) mqpcf chs -qm PLQMRT -c PLQMS.PLQMR.3 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c PLQMR.PLQMS.4 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS.4) CHLTYPE(SDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMS4) mqpcf chs -qm PLQMRT -c PLQMS.PLQMR.4 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c PLQMR.PLQMS.5 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS.5) CHLTYPE(SDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMS5) mqpcf chs -qm PLQMRT -c PLQMS.PLQMR.5 STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMRT -c TO.PLQMR STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(TO.PLQMR) CHLTYPE(CLUSRCVR) CONNAME(172.21.10.50) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(RECEIVE) mqpcf chs -qm PLQMRT -c TO.PLQMS STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(TO.PLQMS) CHLTYPE(CLUSSDR) CONNAME(111.111.111.111(1414)) CHLINSTYPE(CURRENT) RQMNAME(PLQMST) SECPROT(TLSV12) SSLCERTI(E=support@sd.pulsarintegration.com, CN=www.sd.pulsarintegration.com,O=Pulsar Integration SD Inc.,ST=Sydney,C=AU) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=03, CN=www.sd.pulsarintegration.PLQMSA.com,O=Pulsar Integration PLQMSA Inc.,ST=Sydney,C=AU) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(SYSTEM.CLUSTER.TRANSMIT.QUEUE) $ mqrc 3065 3065 0x00000bf9 MQRCCF_CHL_STATUS_NOT_FOUND $ *Reason code 3065 MQRCCF_CHL_STATUS_NOT_FOUND indicates that the RCVR channel is INACTIVE.
Similarly, start the channel from the opposite side and confirm that all channels have been started.
$ ./stachl.sh PLQMST mqpcf sta -qm PLQMST -c PLQMS.PLQMR Channel Start Success. Channel Name : PLQMS.PLQMR mqpcf sta -qm PLQMST -c PLQMS.PLQMR.2 Channel Start Success. Channel Name : PLQMS.PLQMR.2 mqpcf sta -qm PLQMST -c PLQMS.PLQMR.3 Channel Start Success. Channel Name : PLQMS.PLQMR.3 mqpcf sta -qm PLQMST -c PLQMS.PLQMR.4 Channel Start Success. Channel Name : PLQMS.PLQMR.4 mqpcf sta -qm PLQMST -c PLQMS.PLQMR.5 Channel Start Success. Channel Name : PLQMS.PLQMR.5 mqpcf sta -qm PLQMST -c TO.PLQMR MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[4031] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] $ $ mqrc 4031 4031 0x00000fbf MQRCCF_CHANNEL_IN_USE $ $ ./ckchl.sh PLQMST mqpcf chs -qm PLQMST -c PLQMS.MQICHL STATUS SECPROT SSLCERTI SSLCIPH SSLPEER MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3065] MQExecute : Command Server Error. mqExecuteCC=[2], mqExecuteRC=[3008], mqCommandCC=[2], mqCommandRC=[3008] mqpcf chs -qm PLQMST -c PLQMS.PLQMR STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMS.PLQMR) CHLTYPE(SDR) CONNAME(172.21.10.147(1425)) CHLINSTYPE(CURRENT) RQMNAME(PLQMRT) SECPROT(TLSV12) SSLCERTI(E=support@ny.pulsarintegration.com, CN=www.ny.pulsarintegration.com,O=Pulsar Integration NY Inc.,ST=New York,C=US) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=02, CN=www.pulsarintegration.PLQMR.com,O=Pulsar Integration PLQR Inc.,ST=New York,C=US) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(MQGET) XMITQ(PLQMR) mqpcf chs -qm PLQMST -c PLQMR.PLQMS STATUS SECPROT SSLCERTI SSLCIPH SSLPEER 1: CHANNEL(PLQMR.PLQMS) CHLTYPE(RCVR) CONNAME(172.21.10.147) CHLINSTYPE(CURRENT) RQMNAME(PLQMRT) SECPROT(TLSV12) SSLCERTI(E=support@ny.pulsarintegration.com, CN=www.ny.pulsarintegration.com,O=Pulsar Integration NY Inc.,ST=New York,C=US) SSLCIPH(TLS_RSA_WITH_AES_256_CBC_SHA256) SSLPEER(SERIALNUMBER=02, CN=www.pulsarintegration.PLQMR.com,O=Pulsar Integration PLQMR Inc.,ST=New York,C=US) STATUS(RUNNING) STOPREQ(NO) SUBSTATE(RECEIVE) ... (omitted below) $ mqrc 3065 3065 0x00000bf9 MQRCCF_CHL_STATUS_NOT_FOUND $ *This reason code is displayed because the client connection channel (SVRCONN) has no client connections at this time.
*ckchl.ps1(.sh), stachl.ps1(.sh), ckque.ps1(.sh), clrque.ps1(.sh) and dltmsg.ps1(.sh) refers to <QMGR>.mqsc for processing. Similarly, ckchl_c.ps1(.sh), ckque_c.ps1(.sh), clrque_c.ps1(.sh), and dltmsg_c.ps1(.sh) for client connection testing refer to the <QMGR>.mqsc of the connection destination. Therefore, it is necessary to copy <QMGR>.mqsc of the source QMGR to the client directory. The reason for referencing <QMGR>.mqsc is to limit the processing to objects for performance testing.