Manage the command server for remote administration

Each queue manager has 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. You can 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.


Before starting

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. If the command server is started automatically, we cannot use the strmqcsv or endmqcsv commands to start and stop the command server. We can change the value of the SCMDSERV attribute by using the MQSC command ALTER QMGR. By default, the command server is started automatically.

Stopping a queue manager also ends the command server associated with it.


Procedure

  • Display the status of the command server:
    1. Start runmqsc for the appropriate queue manager by entering the following command:
      runmqsc target.queue.manager

      where target.queue.manager is the queue manager for which the command server is being displayed.

    2. Display the command server status by entering the following MQSC command:
      DISPLAY QMSTATUS CMDSERV
      
    3. Exit runmqsc by entering the following command:
      end

  • If the command server is not set to start automatically, start the command server by entering the following command:
    strmqcsv target.queue.manager
    

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

  • If the command server is not set to start automatically, stop the command server by entering the following command:
    endmqcsv target.queue.manager
    

    where target.queue.manager is the queue manager for which the command server is being stopped.

    By default, the command server stops in a controlled way. We can stop the command server immediately by adding the -i flag to the command.

Parent topic: Work with remote IBM MQ objects