November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

websphere mq: basic administration commands

launch
runmqsc

display queue manager(s)
display qmmgr(*)

display queue(s)
display queue(*)

display channel(s)
display channel(*)

display listener(s)
display listener(*)

check queue status
display qstatus(*)

clear queue
clear qlocal(queue_name)

display connections
display conn(*)

dspmq
runmqsc
dis chs (channel)
start chl (channel)
stop chl (channel)
reset chl (channel)
start chl (channel)
end

Start Q Manager
—————
strmqm OFB.OCE.QMGR

Stop Q Manager
———————–
endmqm -w OFB.OCC.QMGR

endmqm -w OFB.OCC.QMGR
flags:
-w wait for clients
-i immediate
Display listener status
———————–
dis lsstatus(*)
DIS LSSTATUS(*)

Display queue names and number of messages in the queue
——————————————————-
dis queue curdepth(*)

Display the queue Depth
——————————————–
dis ql (*) where (curdepth gt 500)

dis ql(*) CURDEPTH WHERE(CURDEPTH GT 0 )

Display where channel is RETRYING
————————————-
dis chs (*) where (status EQ running)

dis chs (*) where (status EQ retrying)

Display Current Sequence Number
——————————-
dis chs (channel) CURSEQNO
( * )

dis chl(*) -> display all channels
dis chs(*) -> display all channels that are running
dis chs (channel) -> display channel status
start chl (channel)
stop chl (channel)
reset chl (channel)
start chl (channel)
end

echo “dis q(*)” | runmqsc

endmqm qmanager
strmqm qmanager

Command to start the queue manger

Start the Quemanager
strmqm -x QMGR2

strmqm QMGR2

Stop the Queue Manager

endmqm qmanager

endmqm TPCAS.AUD.QMGR2

Check the queue manager is working

$ dspmq -x
QMNAME(TPCAS.AUD.QMGR1) STATUS(Running)
INSTANCE(instancename) MODE(Active)

Connect to queue manager

runmqsc QMGR1

dis channel (*)

Logs /var/mqm/errors

runmqsc ROLBRKPRDV.QM
STOP CHANNEL(VROLBRK.VIPC)
RESET CHANNEL(VROLBRK.VIPC) SEQNUM(407918)
START CHANNEL(VROLBRK.VIPC)

DISPLAY CHSTATUS (VROLBRK.VIPC.*)

DISPLAY CHSTATUS (CDISI.CORE.AUDIT)

runmqsc ROLBRKPRDS.QM
dis chl(B*)
start CHANNEL(BRKPRDS.TO.VP04VRL)

Start MQSC
1 runmqsc

MQSC:show queue information
1 display q()

MQSC:remove all messages from queue
1 clear ql()

MQSC:enable trigger on queue
1 alter ql() trigger

MQSC:disable trigger on queue
1 alter ql() notrigger

MQSC:show process information
1 display process()

Using runmqsc in a script
1 echo “dis q(*)” | runmqsc

This vill display all queues (‘dis q(*)’) on the qmanager

Using the q (ma01) program to distribute messages from one queue to two queues
1 q -m QMGR -I TEST.DISTLIST.IN -o TEST.DISTLIST.OUT1 -o TEST.DISTLIST.OUT2

endmqm qmanager
strmqm qmanager

runmqsc ROLBRKPRDV.QM
STOP CHANNEL(VROLBRK.VIPC)
RESET CHANNEL(VROLBRK.VIPC) SEQNUM(407918)
START CHANNEL(VROLBRK.VIPC)

DISPLAY CHSTATUS (VROLBRK.VIPC.*)

runmqsc ROLBRKPRDS.QM
dis chl(B*)
start CHANNEL()

Useful Commands for MQ administration

dspmqver :- to display MQ series version
dspmq :- to view all queue managers of MQ series.
crtmqm :- to create a queue manager
strmqm :- to start queue manager
runmqsc :- to enter in to particular queue manager
endmqm :- to end a queue manager
dltmqm :- to delete a queue manager
dspmqcsv :- to display command server
endmqcsv :- to end command server
strmqcsv :- to start command server
runmqlsr :- to run listener service
endmqlsr :- to end listener service
runmqchl :- to run a channel out of queue manager
runmqdlq :- to execute dead letter handle with the help of rule table
setmqaut :- to set authorizations for particular objects like queuemanager,queue’s channels, listeners to user or group
dspmqaut :- to display authorization for particular user
dmpmqaut :- to dump authorization for particular user
runmqchi :- to run a channel initiator for particular queue manager
runmqtrm :- to run trigger monitor on initiation queue for particular queue manager
rcdmqimg :- to take objects (or) record image of a particular queue manager objects
rcrmqobj :- to recreate the mq objects which are already recorded

Useful syntax of RUNMQSC utility for hadling QueueManager

DEFINE :- To define/create MQ manager objects like queue, Channels, process, and listener.
ALTER :- to update or modify the existing objects
DISPLAY :- to view all the properties of a particular object or to Display all objects
DELETE :- to delete created objects
CLEAR :- to clear the message from the queue
END :- to come out of the queue manager
PING :- to check whether other side channel / queue manager is ready to accept our request.
START :- to start the particular channel or listener
STOP :- to stop particular channel or listener
REFRESH :- used to refresh the security every time after giving or executing, set mgr or command for queue manager or object
RESET :- used to reset channel,cluster,queue manager
RESOLVE :- to resolve the channel which is in indoubt state
SUSPEND :- to suspend a queue manager from a cluster environment
RESUME :- to remove a queue manager from a cluster environment

IBM MQ Commands
July 27, 2007 at 2:09 am | Posted in MQ, Programming, Technology | 5 Comments

Some simple and useful IBM MQ Commands I found useful for debugging or testing the channels and queues.

Some MQ Commands

Use ‘mqm’ user

At : /usr/mqm/bin

Connect to Queue Manager
runmqsc

Display Channel info
dis channel(*)

Display Channel full info
dis chs(*) all

Check channel is alive
ping channel()

start channel()

Display Queue Alias Info
dis qa(*)

dis qa() all

Display Remote Queue Info
dis qr() all

Display Local Queue Info
dis ql(*) curdepth

Display Channel messages info including last message date and time
dis chs(*) msgs lstmsgda lstmsgti

Zerolize Counter (curdepth) in queue
runmqsc

stop CHANNEL()

start CHANNEL()

It should then show zero messages :
dis chs(*) msgs lstmsgda lstmsgti

Perform a test put message
cd /usr/mqm/samp/bin./amqsput

Test message

Backup the message

1. Logon to “sl73cdisapp001” using “mqm”
2. cd /home/mqm/admin/$QMGRNAME/qload
3. ./BackupAuditMsgs.sh $QMGRNAME – Take backup of messages in the “audit” Q to the “backup” Q
4. ./RestoreAuditMsgs.sh $QMGRNAME – Restore messages back to “Audit” Q
5. Check the Current depth of the Q.
6. runmqsc $QMGRNAME
7. dis ql (QNAME) curdepth

Backup messages from a Queue to a file:
Command: qload –m QM1 –i LQ1 –f c:\bkpmsg

import messages from a file to the queue:
Command: qload –m QM1 –o LQ1 –f c:\bkpmsg

Copying messages from a queue to another queue:
Command: qload –m QM1 –i LQ1 –o LQ2

======================================

MQ WORKS ON point to point

Assure delivery

Persittance

Fast connection is also open always

A —> B
Sender channel Reciever channel
reciever channel sender channel
LOCAL QUEUE LOCAL QUEUE
REMOTE QUEUE
RECIEVER QUEUE Local QUEUE
PORT 1414 1415
IP = 192.168.1.1 192.168.1.10

MQM

username mqm mqm

AIX – ROOT U+G created .bff

sol – root u+g before install manually .pkg

Lin – root u+g befor installl .rpm

win – !!! .exe

/opt/mqm = is binary placed

/var/mqm = we have logs

LIN SOL AIX WIN

BINARY /opt/mqm /opt/mqm /usr/mqm D/ E:/Program files

runtime /var/mqm /var/mqm /var/mqm

(Qmgr)

dspmqmver

check the arch
dspmqmver -a

crtmqm

crtmqm TESTQM1

to display
dspmqm

dspmqm

strmqm TESTQMQ1

endmqm -i TESTQMQ1

dspmqm

cd /var/mqm

qm.ini

ps -ef | grep mqlsr

runmqsc TESTQMQ1

display QMGR

dis channel

dis chl (*)

dis chl(*) where (TYPE EQ SDR)

dis q(*)

DEFINE LISTENER(TESTQM1.LS1) TRPTYPE (TCP) PORT (21414)

crtmqm TESTQMQ1

DEFINE QLOCAL (TESTQM1.LOCAL)

Alter QLOCAL (TESTQM1.LOCAL) MAXDEPTH(1000)

dis q (TESTQM1.LOCAL) MAXDEPTH

A —> B

Sender channel (testqm1.to.testqm2) Reciever channel (testqm1.to.testqm2)
reciever channel (testqm1.to.testqm1) sender channel (testqm2.to.testqm1)
LOCAL QUEUE LOCAL QUEUE
REMOTE QUEUE Transmission queue
RECIEVER QUEUE Local QUEUE
PORT 1414 1415
IP = 192.168.1.1 192.168.1.10

CREATE QM

crtmqm TESTC

define qlocal(TESTCQM2.TQ1) USAGE(XMITQ)

CREATE LISTENER

DEFINE LISTENER(TESTC.LS1) TRPTYPE(TCP) PORT(21418) control (qmgr)

LQ

define qlocal(TESTC.LQ1)

delete qlocal(TESTCQM1.LQ1) delete the queue manager

TQ

DEFINE qlocal(TESTC.TQ1) USAGE(XMITQ)

SENDER CHANNEL
DEFINE channel(TESTC.TO.TESTD) CHLTYPE(SDR) CONNAME(‘10.211.48.247(21419)’) XMITQ(‘TESTC.TQ1’)

DEFINE channel(TESTC.TO.TESTD) CHLTYPE(SDR) CONNAME(‘10.211.48.247(21419)’) XMITQ(‘TESTC.TQ1’)

RECEVER CHANNEL

DEFINE channel(TESTD.TO.TESTD) CHLTYPE(RCVR)

DEFINE channel(TESTD.TO.TESTC) CHLTYPE(RCVR)

RQ

define QREMOTE(TESTC.RQ1) RNAME(‘TESTD.LQ1’) RQMNAME(‘TESTD’) XMITQ(‘TESTC.TQ1’)

Test Functinality

dis listener(TESTC.LS1)
ping chl(TESTC.TO.TESTD)
dis channel(TESTC.TO.TESTD)
dis channel(TESTA.TO.TESTB)
start listener(TESTB.LS1)

crtmqm TESTB
DEFINE QLOCAL(TESTB.LQ1)
DEFINE LISTENER(TESTB.LS1) TRPTYPE(TCP) PORT(21415) control (qmgr)
DEFINE qlocal(TESTB.TQ1) USAGE(XMITQ)
define QREMOTE(TESTB.RQ1) RNAME(‘TESTA.LQ1’) RQMNAME(‘TESTA’) XMITQ(‘TESTB.TQ1’)
DEFINE channel(TESTA.TO.TESTB) CHLTYPE(RCVR)
DEFINE channel(TESTB.TO.TESTA) CHLTYPE(SDR) CONNAME(‘10.211.48.247(21416)’) XMITQ(‘TESTB.TQ1’)
dis listener(TESTB.LS1)
ping chl(TESTB.TO.TESTA)
dis channel(TESTB.TO.TESTA)
dis channel(TESTA.TO.TESTB)
start listener(TESTB.LS1)

Delte QUEUE MANAGER

dltmqm TESTC
dltmqm TESTD

IN CLUSTER

ALLWAYS CREATE RECIEVER

MQ CLUSETERING

software clustering (Active – Active)

Active – Passive

clussdr clusrcvr

we dont have TQ,RQ,SDR CHL RCR CHL

Full repository and partially Repository

crtmqm clusqm1
crtmqm clusqm2

strmqm clusqm1
strmqm clusqm2

define listener(CLUSQM1.LS1) TRPTYPE(TCP) PORT(21414)

Start listener(CLUSQM1.LS1)

How to clear the messages

clear command

amqsget

dis q(qm4.lq1) curdepth

/opt/mqm/samp/bin/amqsget

/opt/mqm/samp/bin/amqsgbr

/opt/mqm/samp/bin/amqsgbrc

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>