Managing the command server for remote administration

How to start, stop, and display the status of the command server. A command server is mandatory for all administration involving PCF commands, the MQAI, and also for remote administration.

Each queue manager can have a command server associated with it. A command server processes any incoming commands from remote queue managers, or PCF commands from applications. It presents the commands to the queue manager for processing and returns a completion code or operator message depending on the origin of the command.

Note: For remote administration, ensure that the target queue manager is running. Otherwise, the messages containing commands cannot leave the queue manager from which they are issued. Instead, these messages are queued in the local transmission queue that serves the remote queue manager. Avoid this situation.

There are separate control commands for starting and stopping the command server. Providing the command server is running, users of IBM MQ for Windows or IBM MQ for Linux (x86 and x86-64 platforms) can perform the operations described in the following sections using the IBM MQ Explorer. For more information, see Administration using the IBM MQ Explorer.


Starting the command server

Depending on the value of the queue manager attribute, SCMDSERV, the command server is either started automatically when the queue manager starts, or must be started manually. The value of the queue manager attribute can be altered using the MQSC command ALTER QMGR specifying the parameter SCMDSERV. By default, the command server is started automatically.

If SCMDSERV is set to MANUAL, start the command server using the command:
strmqcsv saturn.queue.manager

where saturn.queue.manager is the queue manager for which the command server is being started.


Displaying the status of the command server

For remote administration, ensure that the command server on the target queue manager is running. If it is not running, remote commands cannot be processed. Any messages containing commands are queued in the target queue manager's command queue.

To display the status of the command server for a queue manager, issue the following MQSC command:
DISPLAY QMSTATUS CMDSERV


Stop a command server

To end the command server started by the previous example use the following command:
endmqcsv saturn.queue.manager
We can stop the command server in two ways:

  • For a controlled stop, use the endmqcsv command with the -c flag, which is the default.
  • For an immediate stop, use the endmqcsv command with the -i flag.
Note: Stopping a queue manager also ends the command server associated with it.