The examples in this section illustrate how to use the imqcmd command.
The following example lists the properties of the broker running on host localhost at port 7676, so the -b option is unnecessary:
imqcmd query bkr -u admin
The command uses the default administrative user name (admin) and omits the password, so that the command will prompt for it.
The following example lists the properties of the broker running on the host myserver at port 1564. The user name is aladdin:
imqcmd query bkr -b myserver:1564 -u aladdin
(For this command to work, the user repository would need to be updated to add the user name aladdin to the admin group.)
The following example lists the properties of the broker running on localhost at port 7676. The initial timeout for the command is set to 20 seconds and the number of retries after timeout is set to 7. The user’s password is in a password file called myPassfile, located in the current directory at the time the command is invoked.
imqcmd query bkr -u admin -passfile myPassfile -rtm 20 -rtr 7
For a secure connection to the broker, these examples could include the -secure option. This option causes the Command utility to use the ssladmin service if that service has been configured and started.