Sunday, February 11, 2018

Websphere application server status report wsadmin

Objective:

This script will help you to print the “Running Server List” per everyNode registered under Cell. Server statistics made easy now with wsadmin. 

Compatibility:
WAS6.1 and above

Script

Running_Nodes=AdminControl.queryNames('*:type=Server,name=nodeagent,*').split(java.lang.System.getProperty("line.separator"))
print "-----------------------------------------------------------------------"
print "Websphere Status Report by Sarav@mwinventory.in"
print "------------------------------------------------------------------------"
print ""
print ""
for nod in Running_Nodes:
        NodeName=AdminControl.invoke(nod ,"getNodeName()")
        Running_JVMS=AdminControl.queryNames('*:type=Server,node='+NodeName+',*').split(java.lang.System.getProperty("line.separator"))
        print "----------------------------------"
        print "NODENAME:  ", NodeName
        print "----------------------------------"
        for Serv in Running_JVMS:
                print AdminControl.invoke(Serv,"getName()")
        print "----------------------------------"
print "--------------------------------------------------"


Result:

 bash-3.00# ./wsadmin.sh -lang jython -username wsadmin -password wsadmin -f status_v2.py
WASX7209I: Connected to process "dmgr" on node MWICellManager01 using SOAP connector;  The type of process is: DeploymentManager
--------------------------------------------------
Websphere Status Report by Sarav@mwinventory.in
--------------------------------------------------


----------------------------------
NODENAME:   MWINode01
----------------------------------
MWI_SERVER01
MWI_SERVER02
MWI_SERVER03
MWI_SERVER04
nodeagent
----------------------------------

----------------------------------
NODENAME:   MWINode02
----------------------------------
MWI_SERVER01
MWI_SERVER02
MWI_SERVER03
MWI_SERVER04
nodeagent
----------------------------------







Saturday, February 10, 2018

Reverse Proxy configuration in iPlanet Web server

A Reverse Proxy is a type of server that retrieves resources from other servers on behalf of the client. The resources are returned to the client as though they are originated from the server itself. Client feels that the resources are being provided by the server itself, and unaware of the servers that have provided the resources.Forward proxy acts as an intermediary for its clients and returns the resources accessible on the internet.Reverse proxy acts as an intermediary for the servers to return the resources provided by other servers.
Reverse proxy is most widely used when you want your application accessible in the internet, without exposing the Application Servers, in other words, it is used when you want your intranet application to be accessible through internet.The proxied server may be a webserver itself, or it may be an application server using a different protocol, or an application server.













How to Configure Reverse Proxy in iPlanet?

iPlanet 7 and above versions has inbuilt proxy plugins , so no need to load any plugins or libraries.
Add below configuration lines in obj.conf file.
          NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
             <Object name="reverse-proxy">
                  Route fn="set-origin-server" server="http://backendserver.com"
             </Object>

            <Object ppath="http:*">

                Service fn="proxy-retrieve" method="*"
            </Object>
Push/ Deploy the changes in iPlanet console. No need of restart.
Note: If you have custom Custom-obj.conf file (Virtual servers) and has client configuration your  Reverse proxy configuration is as below.

Custom-obj.conf

<Object name="default">
     <Client urlhost="Reverse-Proxy-server.com">
          NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
     </Client>
</Object>

<Object name="reverse-proxy">

          Route fn="set-origin-server" server="http://backendserver.com"
</Object>

<Object ppath="http:*">
          Service fn="proxy-retrieve" method="*"
</Object>

Note:  Only one ppath="http:*" is required for multiple Reverse Proxy configuration. No need to duplicate the ppath block every time.

How Reverse Proxy works?

When request comes to iplanet let ex http://Reverse-Proxy-server.com/Revese_Proxy
The default object NameTrans  directive  map  attribute function will be execute and  convert the logical URL of the request to a physical path name.
NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
If this physical path name (http:/Revese_Proxy) matches the Object ppath="http:*" , ppath object directive proxy-retrieve function will be execute.
             <Object ppath="http:*">
                   Service fn="proxy-retrieve" method="*"
             </Object>
proxy-retrieve
The proxy-retrieve function retrieves a information from a remote server and returns it to the client. This function also enables you to configure the server to allow or block arbitrary methods. This function only works on the HTTP protocol.
After execution of the ppath Object proxy-retrieve  function ,process goes to the Object name="reverse-proxy" block.
               <Object name="reverse-proxy">
                    Route fn="set-origin-server" server="http://backendserver.com"
               </Object>
Route fn="set-origin-server
Set the back end  server information where to send the request .

 Alternative ways to configure the Reverse Proxy in iPlanet

Below configuration works same as above one but difference is removed the name attribute in NameTrans and added the Route function in ppath Object.
           <Object name="default">
                  <Client urlhost="Reverse-Proxy-server.com">
                        NameTrans fn="map" from="/Revese_Proxy” to="http:/Revese_Proxy"
                  </Client>
           </Object>

          <Object ppath="http:*">
                 Service fn="proxy-retrieve" method="*"
                 Route fn="set-origin-server" server="http://backendserver.com"
         </Object>

Site Down Maintenance page in iPlanet


Whenever your site is going to Schedule Maintenance or down due to some issues at back end servers. Is it good to show 404 or 500 Page errors to users? No, in this situation we need to build the custom Site Maintenance pages.
How to configure Site Maintenance Page in iPlanet?
Add below configuration lines in obj.conf file
<Client urlhost="examplesite.com">
NameTrans fn="redirect" from="/" url="/Site_Maintenance_Page.htm"
</Client>
Push or deploy the configuration changes. No need of the server restart.

How to display the site logs or Images in Maintenance Page?
If you are using the images or static files to display your site Maintenance page to looks good you may face the problems.
How to solve it?
Rewrite your static files as below

NameTrans fn="rewrite" from="/Site_Maintenance_Page/site_logo.png" root="/opt/iplanet" path="/Site_Maintenance_Page/site_logo.png"
NameTrans fn="rewrite" from="/Site_Maintenance_Page/Site_body.jpg" root="/opt/iplanet" path="/Site_Maintenance_Page/Site_body.jpg" 

Note: Make sure Rewrite directive configuration should be placed before the redirect directive, other static images or files wont access.

Overall Configuration looks like
<Client urlhost="examplesite.com">


NameTrans fn="rewrite" from="/Site_Maintenance_Page/site_logo.png" root="/opt/iplanet"            path="/Site_Maintenance_Page/site_logo.png"
NameTrans fn="rewrite" from="/Site_Maintenance_Page/Site_body.jpg" root="/opt/iplanet  path="/Site_Maintenance_Page/Site_body.jpg"
NameTrans fn="redirect" from="/" url="/Site_Maintenance_Page.htm"

</Client>


Monitoring CPU Load Averages with Shell Script

After little R & D on Google/Internet found few suitable solutions. I had chosen 'uptime' command running with remote SSH connection in a loop. Adding more value to this sending a mail on the event of crossing the threshold value. This threshold will be vary depending upon the application and CPU power. Trial and error make you to identify what could be the threshold. Once script started working he was amazed and appreciated as well.

This script can be run forever with a specified time interval. You can use 'at' command or 'crontab' also for this task. I prepared a 'bash' script that could work for Solaris and also on Linux.

Before to this script we need to establish the password less connection to all the remote machines with 'key-gen' command. Public key authentication, which is the good choice password less connecting remote UNIX machines. Here, you can use any choice for encryption algorithms such as RSA, DSA etc.,

Customization/Cosmotics to this script

When you run this script at your prompt you can see the high load average server details in red colour which makes sense to act up on that quicker. All server list I had kept in a plan text file and accessed it line by line as array for looping.


#!/bin/bash
#======================================================
# This script will check CPU Load, network ping status
# and also checks diskspace on every machine
#======================================================
RECIPIENTS="xyz@gmail.com"
LOG=./load.log

check_load()
{
        loadnow=`echo $msg| cut -d, -f4 | cut -d: -f2 | cut -d. -f1`
        d=`echo $msg |awk '{print $((NF-1))}'`
        SD=`date "+%Y-%h-%d@%H:%M:%S"`
        echo $SD '****'
        if [ $loadnow -gt 14 ]; then
                echo -e ' \033[31m' $server ' ' $loadnow '\033[m'>>$LOG
                echo $SD $server ' ' $loadnow |mailx -s LOAD_WARN $RECPIENTS
        elif [ $loadnow -gt 19 ]; then
                echo -e ' \033[31m' $server ' ' $loadnow '\033[m'>>$LOG
                echo $SD $server ' ' $loadnow |mailx -s LOAD_CRITICAL $RECPIENTS
        else
                echo -e $server '\t' $loadnow '\t' $p '\t'$d >>$LOG
        fi
}

#==============================================================
#                 M A I N  S C R I P T
#==============================================================
if [ -f $LOG ]
then
        rm $LOG
fi
serlist=`cat prodServers.txt`
echo -e "========================================================">>$LOG
echo -e "  HOSTNAME  CPU Load     Network status       Disk Space">>$LOG
echo -e "========================================================">>$LOG

for server in $serlist
do
        echo 'connecitng to ' $server
        msg=`ssh $server "uptime; df -k |grep /WASLogs |awk '{print \$5}'"`
        p=`ping $server 56 2 |grep loss | awk -F',' '{ print $3 }'`
        check_load
done
cat load.log

Please make sure that you must have prodServers.txt file in the same script path. Sample prodServers.txt file as follows:

myprod.server1.com
myprod.server2.com
...
myprod.server20.com




Step by Step guide to enable SSL on a MQ Channel

Below are the steps to enable SSL on two Queue managers QM1 and QM2 using point 2 point connection (1 pair of sender receiver channel).

Create QM1 key repository :
gsk7cmd  -keydb -create -db "/opt/IBM/Qmgrs/QM1/ssl/qm1.kdb" -pw MyPassword -type cms -expire 30 -stash

Create QM2 key repository :
gsk7cmd  -keydb -create -db "/opt/IBM/Qmgrs/QM2/ssl/qm2.kdb" -pw MyPassword -type cms -expire 30 -stash

Create CA repository :
gsk7cmd  -keydb -create -db "/opt/mq/ssl/wmqca.kdb" -pw MyPassword -type cms -expire 30 -stash

Create CA certificate:
gsk7cmd  -cert -create -db "/opt/mq/ssl/wmqca.kdb" -pw MyPassword -labelwmqca -dn " CN=WMQ CA, OU=WMQ, O=Abhijeet, L=Chelmsford, ST=Essex, C=UK," -expire 30

Extract the public CA certificate
gsk7cmd -cert -extract -db "/opt/mq/ssl/wmqca.kdb"-pw MyPassword -label wmqca -target wmqca.crt -format ascii

Add the public CA certificate to QM1's key repository :

gsk7cmd -cert -add -db "/opt/IBM/Qmgrs/QM1/ssl/qm1.kdb" -pw MyPassword -label wmqca -file wmqca.crt -format ascii

Add the public CA certificate to QM2's key repository :
gsk7cmd -cert -add -db "/opt/IBM/Qmgrs/QM2/ssl/qm2.kdb" -pw MyPassword -label wmqca -file wmqca.crt -format ascii

Create QM1's certificate request :
gsk7cmd -certreq -create -db "/opt/IBM/Qmgrs/QM1/ssl/qm1.kdb" -pw MyPassword -label ibmwebspheremqqm1 -dn " CN=QM1, OU=WMQ, O=Abhijeet, L=Chelmsford, ST=Essex, C=UK" -file qm1req.arm

Create QM2's certificate request :
gsk7cmd -certreq -create -db "/opt/IBM/Qmgrs/QM2/ssl/qm2.kdb" -pw MyPassword -label ibmwebspheremqqm2 -dn " CN=QM2, OU=WMQ, O=Abhijeet, L=Chelmsford, ST=Essex, C=UK" -file qm1req.arm

Sign QM1's certificate:
gsk7cmd -cert -sign -file qm1req.arm -db "/opt/mq/ssl/wmqca.kdb" -pw password -label wmqca -target qm1cert.arm -format ascii -expire 29

Sign QM2's certificate:
gsk7cmd  -cert -sign -file qm2req.arm -db "/opt/mq/ssl/wmqca.kdb" -pw password -label wmqca -target qm2cert.arm -format ascii -expire 29

Add QM1's certificate to QM1's key repository:
gsk7cmd -cert -receive -db "/opt/IBM/Qmgrs/QM1/ssl/qm1.kdb" -pw password -file qm1cert.arm -format ascii

Add QM2's certificate to QM2's key repository:
gsk7cmd -cert -receive -db "/opt/IBM/Qmgrs/QM2/ssl/qm2.kdb" -pw password -file qm2cert.arm -format ascii

Set QM1's queue manager key repository :

ALTER QMGR SSLKEYR('/opt/IBM/Qmgrs/QM1/ssl/qm1')

Set QM2's queue manager key repository:

ALTER QMGR SSLKEYR('/opt/IBM/Qmgrs/QM2/ssl/qm2')


Define Sender channel on QM1:
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(SDR) TRPTYPE(TCP) DESCR('Sender channel to QM2') XMITQ(QM2) CONNAME('Myhost(1415)') SSLCIPH(TRIPLE_DES_SHA_US)

Define Receiver Channel on Qm2:
DEFINE CHANNEL(QM2.TO.QM1) CHLTYPE(RCVR) TRPTYPE(TCP) DESCR('Receiver channel from QM2') SSLCIPH(TRIPLE_DES_SHA_US)


End of story you now have SSL  P2P connection. Well in real world your CA will be an external provider and you may have to liaise with external team to get it signed.


SSL configuring between QM and MQ Explorer

Given below are the steps to enable SSL between QM and MQ Explorer.

MQ Qmgr:

Create a QM Key database file:
gsk7cmd -keydb -create -db "/var/mqm/qmgrs/key.kdb" -pw password -type cms -expire 365 -stash

Create a CA database file:
gsk7cmd -keydb -create -db "/var/mqm/qmgrs/mqcm.kdb" -pw password -type cms -expire 365 -stash

Create CA cert:
gsk7cmd -cert -create -db "/var/mqm/qmgrs/mqcm.kdb" -pw password -label webspheremqseries -dn "CN=WMQ CA,OU=WMQ,O=MQ,L=BLR,ST=KA,C=IN" -expire 365

Extract CA cert:
gsk7cmd -cert -extract -db "/var/mqm/qmgrs/mqcm.kdb" -pw password -label webspheremqseries -target /var/mqm/cert.crt -format ascii

Add CA cert to QM repository:
gsk7cmd -cert -add -db "/var/mqm/qmgrs/key.kdb" -pw password -label wmqca -file /var/mqm/ca.crt -format ascii

Create Certificate Request:
gsk7cmd -certreq -create -db "/var/mqm/qmgrs/key.kdb" -pw password -label ibmwebspheremqCLOUD2 -dn "CN=mqseries,OU=WMQ,O=MQ,L=BLR,ST=KA,C=IN" -file "/var/mqm/CLOUD2.arm"

Sign Certificate: 
gsk7cmd -cert -sign -file "/var/mqm/CLOUD2.arm" -db "/var/mqm/qmgrs/mqcm.kdb" -pw password -label webspheremqseries -target "/var/mqm/cloud2cert1.arm" -format ascii -expire 340

Receive Signed cert:
gsk7cmd -cert -receive -db "/var/mqm/qmgrs/key.kdb" -pw password -file "/var/mqm/cloud2cert1.arm" -format ascii

ALTER QMGR SSLKEYR('/var/mqm/key')

Alter channel you use for MQ explorer.

ALTER CHANNEL(SVRCONN) CHLTYPE(SVRCONN) SSLCIPH(TRIPLE_DES_SHA_US)

On MQ EXPLORER:

Need to copy key.kdb and mqcm.crt file to Windows box in C:\Program Files\IBM

Create a key Database file:
gsk7cmd -keydb -create -db "C:\Program Files\IBM\exp.jks" -pw password -type jks

Add CA cert to database:
gsk7cmd -cert -add -db "C:\Program Files\IBM\exp.jks" -pw password -label webspheremqseries -file "C:\Program Files\IBM\mqcm.crt" -format ascii

Create a certificate request:
gsk7cmd -certreq -create -db "C:\Program Files\IBM\exp.jks" -pw password  -label explorer -dn "CN=MQ,OU=WMQ,O=MQ,L=BLR,ST=KA,C=IN" -file "C:\Program Files\IBM\expreq1.arm"

Sign the cert:

gsk7cmd -cert -sign -file "C:\Program Files\IBM\expreq1.arm" -db "C:\Program Files\IBM\mqcm.kdb" -pw password -label webspheremqseries -target "C:\Program Files\IBM\expcert1.arm" -format ascii -expire 340

Receive the cert:
gsk7cmd -cert -receive -db "C:\Program Files\IBM\exp.jks" -pw password -file "C:\Program Files\IBM\expcert1.arm" -format ascii

When you are connecting a remote queue manager using MQ explorer select SSLCIPH TRIPLE_DES_SHA_US and the key data base file you have created in above step .


MQ Basic Commands


 Command to lists the MQ series version

[mqm@middlewaretech mqm]$ dspmqver
Name:        WebSphere MQ
Version:     7.5.0.2
Level:       p750-002-130704.TRIAL
BuildType:   IKAP - (Production)
Platform:    WebSphere MQ for Linux (x86 platform)
Mode:        32-bit
O/S:         Linux 2.6.18-194.el5
InstName:    Installation1
InstDesc:   
Primary:     Yes
InstPath:    /opt/mqm
DataPath:    /var/mqm
MaxCmdLevel: 750

 Command to lists the queue manager name and status

[mqm@middlewaretech mqm]$ dspmq
QMNAME(QMA)                                               STATUS(Running)
QMNAME(QMA1)                                              STATUS(Running)

Command to create Queue Manager

Syntax : crtmqm <Queue Manager name>

[mqm@middlewaretech mqm]$ crtmqm Excercise1QM

There are 88 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager created.
Directory '/var/mqm/qmgrs/Excercise1QM' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'Excercise1QM'.
Default objects statistics : 74 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.

[mqm@middlewaretech mqm]$ dspmq
QMNAME(QMA)                                               STATUS(Running)
QMNAME(QMA1)                                              STATUS(Running)
QMNAME(Excercise1QM)                                      STATUS(Ended immediately)
[mqm@middlewaretech mqm]$

 command to stop, start & delete queue manager

To start :
syntax : strmqm < Queue Manager name>


[mqm@middlewaretech mqm]$ strmqm Excercise1QM

There are 88 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager 'Excercise1QM' starting.
The queue manager is associated with installation 'Installation1'.
5 log records accessed on queue manager 'Excercise1QM' during the log replay phase.
Log replay for queue manager 'Excercise1QM' complete.
Transaction manager state recovered for queue manager 'Excercise1QM'.
WebSphere MQ queue manager 'Excercise1QM' started using V7.5.0.2.

check queue manager status:

[mqm@middlewaretech mqm]$ dspmq
QMNAME(QMA)                                               STATUS(Running)
QMNAME(QMA1)                                              STATUS(Running)
QMNAME(Excercise1QM)                                      STATUS(Running)
[mqm@middlewaretech mqm]$

To Stop:

syntax : endmqm  < Queue Manager name>


[mqm@middlewaretech mqm]$ endmqm QMA1
Quiesce request accepted. The queue manager will stop when all outstanding work
is complete.

[mqm@middlewaretech mqm]$ dspmq
QMNAME(QMA)                                               STATUS(Running)
QMNAME(QMA1)                                              STATUS(Ended normally)
QMNAME(Excercise1QM)                                      STATUS(Running)
[mqm@middlewaretech mqm]$


To Delete :

syntax : dltmqm  < Queue Manager name>

[mqm@middlewaretech mqm]$ dltmqm Excercise1QM
WebSphere MQ queue manager running.

[mqm@middlewaretech mqm]$ dltmqm QMA1
WebSphere MQ queue manager 'QMA1' deleted.

[mqm@middlewaretech mqm]$ dspmq
QMNAME(QMA)                                               STATUS(Running)
QMNAME(Excercise1QM)                                      STATUS(Running)
[mqm@middlewaretech mqm]$

Command to create  local queue (MQSC command)

Syntax : define qlocal or ql <queuename>

[mqm@middlewaretech mqm]$ runmqsc QMA

5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QMA.


define qlocal(QMAQL1)
     1 : define qlocal(QMAQL1)
AMQ8006: WebSphere MQ queue created.


end
     2 : end
No MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.

Command to delete  local queue (MQSC command)

[mqm@middlewaretech mqm]$ runmqsc QMA
5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QMA.

delete ql(QMAQL1)
1 : delete ql(QMAQL1)
AMQ8007: WebSphere MQ queue deleted.

end
     2 : end
No  MQSC commands read.
No commands have a syntax error.
One valid MQSC command could not be processed.
[mqm@middlewaretech bin]$

Command to Put messages onto a queue

syntax : amqsput <queuename> <queuemanager name>

[mqm@middlewaretech bin]$ pwd
/opt/mqm/samp/bin

[mqm@middlewaretech bin]$ ./amqsput   QMAQL1 QMA
Sample AMQSPUT0 start
target queue is QMAQL1
Test1 test2

Sample AMQSPUT0 end

[mqm@middlewaretech bin]$ ./amqsput QMAQL1 QMA
Sample AMQSPUT0 start
target queue is QMAQL1
hello world

Sample AMQSPUT0 end

Command to browse  messages  onto a queue

syntax : amqsbcg or amqsgbr <queuename> <queuemanager name>


[mqm@middlewaretech bin]$ ./amqsgbr QMAQL1 QMA
Sample AMQSGBR0 (browse) start
QMA
Messages for QMAQL1                                         
1 <Test1 test2>
2 <hello world>
no more messages
Sample AMQSGBR0 (browse) end
  
Command to delete messages from a queue

The amqsget or amqsgetc commands can be used to clear all the messages in a queue: each
messages deleted after it is read. There is another way to delete all the messages in the queue.
Actually, it is faster because the messages are not read. However, only an MQ Administrator can use
this method because it is done under the runmqsc command.


 [mqm@middlewaretech bin]$ runmqsc QMA
5724-H72 (C) Copyright IBM Corp. 1994, 2011.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QMA.


CLEAR QLOCAL(QMAQL1)
     1 : CLEAR QLOCAL(QMAQL1)
AMQ8022: WebSphere MQ queue cleared.
end
     2 : end
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.

[mqm@middlewaretech bin]$ ./amqsgbr QMAQL1 QMA
Sample AMQSGBR0 (browse) start
QMA
no more messages
Sample AMQSGBR0 (browse) end

How To Display Cluster Queue  Managers
DISPLAY CLUSQMGR(*)
How To Display Cluster Queues In Cluster Queue Manager
DISPLAY QCLUSTER(*)
How To Display Cluster Channels Status
DISPLAY CHSTATUS(*)
How To Know A Queue Manager Is Full Repository or Not  
DISPLAY CLUSQMGR(QMGR-NAME) QMTYPE

How To Suspend Queue Manager From Cluster
SUSPEND QMGR CLUSTER(CLUSTER-NAME)  
How To Know A Queue Manager Suspended or Active QMGR 
DISPLAY CLUSQMGR(QMGR-NAME) SUSPEND
How To Resume A Queue Manager To Cluster 
RESUME QMGR CLUSTER(CLUSTER-NAME) 
How To Refresh Cluster  
REFRESH CLUSTER(CLUSTER-NAME) REPOS(YES/NO)

How To Reset Cluster
RESET CLUSTER(CLUSTER-NAME) QMID(QMGR-QMID) ACTION(FORCEREMOVE) QUEUES(YES/NO) 

Channel Commands
 How To Define channel Object
Sender Channel:
Define Channel(Channel-Name) Chltype(sdr) Conname('ip(port)') xmitq(Transmission queue name)

Receiver Channel:
Define Channel(channel name) Chltype(RCVR) Trptype(TCP)
 How To Display Channel Object
Display Channel(Channel-Name) 
 How To Display Channel Status
Display ChStatus(Channel-Name) 
 How To Alter Channel Object
Alter Channel(Channel-Name) 
Chltype(SDR/RCVR..) 
Maxmsgl(1024(Bytes))
 How To Start Channel
Start Channel(Channel-Name) 
 How To Stop Channel
Stop Channel(Channel-Name) status(Inactive/Stopped)
 How Ping Channel
Ping Channel(Channel-Name) 
 How To Reset Channel
Reset Channel(Channel-Name) Seqnum(1)
How To Delete Channel Object 
Delete Channel(Channel-Name)

Note: Channel Must Be In Down State to Delete.

Listener Commands:
How To Define Listener Object
Define Listener(Lstr-Name) Trptype(TCP/SPX/NETBIOS/LU 62) Port(1515) Control(qmgr/manual) 
How To Display Listener Object
Display LSTR(Lstr_Name) 
How To Alter Listener Object
Alter LSTR(Lstr-Name) Trptype(TCP/SPX/...) Control(qmgr/manual) 
How To Start Listener service
Start LSTR(Lstr-Name)
How To Display Listener Service Status
Display LSStatus(Lstr-Name)
How To Stop Listener Service 
Stop LSTR(Lstr-Name)
How To Delete Listener Object
Delete LSTR(Lstr-Name)

Queue Commands 
Define QLocal(Queue-name)..
Define QLocal(Queue-Name) Usage(Xmitq)
Define QAlias(Queue-Name) Target(Target-Queue-Name)..
Define QRemote(Queue-Nmae) RName(Target-Queue_Name) RQMName(Target-QMGR-Name) Xmitq(Xmitq-Name)
Define QModel(Queue_name) Deftype(Tempdyn/PermDyn) ..
Display QLocal(Queue-Name)
Display Qstatus(Queue-Name)
Display QLocal(Queue-Name) Usage
Display QAlias(Queue-Name)
Display QRemote(Queue-Name) All
Display QModel(Queue-Name)
Alter QLocal(Queue-name) Maxdepth(10000) Maxmsgl(1024(bytes)) ..
Alter QRemote(Queue-Name) Rname(...) RQMName(....) Xmitq(...) ...
Alter QModel(Queue-Name) Deftype(TempDyn/PermDyn) ....
Alter QAlias(Queue_Name) Target(....) ...
Delete QLocal(Queue-Name)
Delete QAlias(Queue-Nmae)
Delete QRemote(Queue-Name)
Delete QModel(Queue-Name)
Clear QLocal(Queue-Name)