Sun Java System Message Queue 3 2005Q1 Administration Guide |
Chapter 13
Command ReferenceThis chapter contains a section that describes common command line syntax, and then provides reference information for each of the Message Queue commands. The chapter contains the following sections:
Command Line SyntaxMessage Queue command-line utilities are shell commands. The name of the utility is a command and its subcommands or options are arguments passed to that command. For this reason, there are no commands to start or quit the utility, and no need for such commands.
All the command line utilities share the following command syntax:
Utility_Name [subcommand] [argument] [[-option_name [-option_argument]]…]
Utility_Name specifies the name of a Message Queue utility, such as imqcmd, imqobjmgr, imqusermgr, and so on.
Rules for Entering Commands
These are some general rules for entering commands:
- Specify options after subcommands (and arguments, if the utility accepts both types of operands).
- If the value for an option contains a space, enclose the entire value in quotation marks. It is generally safest to enclose an attribute-value pair in quotes.
- If you specify the -v (version) or the -h/-H (help) options on a command line, nothing else on that command line is executed.
- Separate the subcommand, arguments, options, and option arguments with spaces.
Command Line Examples
The following is an example of a command line that has no subcommand clause. The command starts the default broker.
imqbrokerd
The following command is more complicated. The command destroys a destination of type queue named myQueue. Authentication is performed based on the user admin; the command will prompt for the user’s password. The -f option specifies that there will be no confirmation and the -s option specifies that the command is executed in silent mode.
imqcmd destroy dst -t q -n myQueue -u admin -f -s
Common Command Options
Table 13-1 describes options that are common to all Message Queue administration utilities. You must specify these options after the subcommand on the command line. The options can be entered in any order.
imqbrokerdThe imqbrokerd command starts a broker. Command-line options override values in the broker configuration files, but only for the current broker session.
Syntax
Command Options
Table 13-2 describes the options to the imqbrokerd command and describes the configuration properties, if any, affected by each option.
Table 13-2 imqbrokerd Options
Option
Properties Affected
Description
-backup fileName
None affected.
Applies only to broker clusters. Backs up a master broker’s configuration change record to the specified file. See Managing the Configuration Change Record.
-cluster“[broker1]
[[,broker2]…]”
where broker is eitherOverrides imq.cluster.brokerlist with a list of brokers to which to connect.
Applies only to broker clusters. Connects to all the brokers on the specified hosts and ports. This list is merged with the list in the imq.cluster.brokerlist property. If you don’t specify a value for host, localhost is used. If you don’t specify a value for port, the value 7676 is used. See Working With Broker Clusters for more information on how to use this option to connect multiple brokers.
-dbpassword password
Overrides imq.persist.jdbc.
password with the specified passwordSpecifies the password for a plugged-in JDBC-compliant data store. This option is being deprecated and will be removed in a future version. Use one of the following alternatives:
-dbuser userName
Overrides imq.persist.jdbc.user
with the specified user nameSpecifies the user name for a plugged-in JDBC-compliant database. See Setting Up a Persistent Store
-Dproperty=value
Sets system properties. Overrides corresponding property value in instance configuration file.
Sets the specified property to the specified value. See Chapter 14, "Broker Properties Reference" for information about broker configuration properties.
Caution: Be careful to check the spelling and formatting of properties set with the -D option. If you pass incorrect values, the system will not warn you, and Message Queue will not be able to set them.
-force
None affected.
Performs action without user confirmation. This option applies only to the
-remove instance and the -upgrade-store-nobackup options, which normally require confirmation.-h|-help
None affected.
Displays help. Nothing else on the command line is executed.
-javahome path
None affected.
Specifies the path to an alternative Java 2- compatible JDK. The default is to use the bundled runtime.
-ldappassword
passwordOverrides imq.user_repository.
ldap.password with the specified passwordSpecifies the password for accessing a LDAP user repository. This option is being deprecated and will be removed in a future version. Use one of the following alternatives:
-license [licenseName]
None affected.
Specifies the license to load, if different from the default for your Message Queue product edition. If you don’t specify a license name, this lists all licenses installed on the system. Depending on the installed Message Queue edition, the values for licenseName are pe (Platform Edition—basic features), try (Platform Edition—90-day trial enterprise features), and unl (Enterprise Edition).
-loglevel level
Overrides imq.broker.log.level with the specified level.
Specifies the logging level as being one of NONE, ERROR, WARNING, or INFO. The default value is INFO.
-metrics interval
Overrides imq.metrics.interval with the specified number of seconds.
Specifies that broker metrics are written to the logger at an interval specified in seconds.
-name instanceName
Sets imq.instancename to the specified name.
Specifies the instance name of this broker and uses the corresponding instance configuration file. If you do not specify a broker name, the name of the instance is set to imqbroker.
Note: If you run more than one instance of a broker on the same host, each must have a unique name.-passfile fileName
Overrides imq.passfile.enabled and sets it to true. Overrides imq.passfile.dirpath with the path containing the file. Overrides imq.passfile.name with the name of the file.
Specifies the name of the file from which to read the password for the imqcmd command utility, SSL keystore, LDAP user repository, or JDBC-compliant database, or for any combination of them. For more information, see Using a Passfile.
-password keypassword
Overrides imq.keystore.password with the specified password.
Specifies the password for the SSL certificate keystore.This option is being deprecated and will be removed in a future version. Use one of the following alternatives:
-port number
Overrides imq.portmapper.port with the specified number.
Specifies the broker’s Port Mapper port number. By default, this is set to 7676. To run two instances of a broker on the same server, each broker’s Port Mapper must have a different port number. Message Queue clients connect to the broker instance using this port number.
-remove instance
None affected.
Causes the broker instance to be removed: deletes the instance configuration file, log files, persistent store, and other files and directories associated with the instance. Requires user confirmation unless -force option is also specified.
-reset store| messages|
durables|
propsNone affected.
Resets the data store (or a subset of the data store) or the configuration properties of a broker instance, depending on the argument given.
Resetting the data store clears out all persistent data, including persistent messages, durable subscriptions, and transaction information. This allows you to start the broker instance with a clean slate. You can also clear only all persistent messages or only all durable subscriptions. (If you do not want the persistent store to be reset on subsequent restarts, restart the broker instance without using the -reset option.)
Resetting the broker’s properties, replaces the existing instance configuration file (config.properties) with an empty file: all properties assume default values.
-restore fileName
None affected.
Applies only to broker clusters. Replaces the master broker’s configuration change record with the specified backup file. This file must have been previously created using the -backup option. See Managing the Configuration Change Record.
-shared
Overrides imq.jms.
threadpool_model and sets it to shared.Specifies that the jms connection service be implemented using the shared thread pool model, in which threads are shared among connections to increase the number of connections supported by a broker instance.
-silent|-s
Overrides imq.log.console.
output and sets it to NONE.Turns off logging to the console.
-tty
Overrides imq.log.console.
output and sets it to ALLSpecifies that all messages be displayed to the console. By default only WARNING and ERROR level messages are displayed.
-upgrade-store-
nobackupNone affected
Specifies that an upgrade to Message Queue 3.5 or Message Queue 3.5 SPx from an incompatible version automatically removes the old data store. For additional details, see the Message Queue Installation Guide.
-version
None affected.
Displays the version number of the installed product.
-vmargs arg1 [[arg2]…]
None affected
Specifies arguments to pass to the Java VM. Separate arguments with spaces. If you want to pass more than one argument or if an argument contains a space, use enclosing quotation marks. For example:
imqbrokerd -tty -vmargs "-Xmx128m -Xincgc"These arguments can be passed only on the command line. There is no associated configuration property in the config.props file.
See Also
For more information about using imqbrokerd and for command examples, see Starting Brokers Interactively.
imqcmdThe imqcmd command utility enables you to manage the broker and its services.
Syntax
imqcmd subcommand argument [options]
imqcmd -h|H
imqcmd -vSubcommands
You always use a subcommand with imqcmd, unless you want to display help or display the product version. Table 13-3 lists the imqcmd subcommands and specifies where reference information for that subcommand is located.
Table 13-3 imqcmd Subcommands
Subcommand and Argument
Description
Reference
commit txn
Commits a transaction.
destroy dur
Destroys a durable subscription.
list cxn
Lists connections for a broker.
list dur
Lists durable subscriptions to a topic.
list svc
Lists services on a broker.
list txn
Lists transactions on a broker.
metrics bkr
Displays broker metrics.
metrics svc
Displays service metrics.
pause bkr
Pauses all services on a broker.
pause svc
Pauses a single service on a broker.
purge dur
Purges all messages on a durable subscription without destroying the durable subscription.
query bkr
Queries and displays information on a broker.
query cxn
Queries and displays information on a connection.
query svc
Queries and displays information on a service.
query txn
Queries and displays information on a transaction.
reload cls
Reloads broker cluster configuration.
restart bkr
Restarts the current running broker instance.
resume bkr
Resumes all services on a broker.
resume svc
Resumes one service.
rollback txn
Rolls back a transaction.
shutdown bkr
Shuts down the broker instance.
update bkr
Updates attributes of a broker.
update svc
Updates attributes of a service.
The imqcmd command utility also has subcommands for use with physical destinations on a broker. Destination subcommands are described in Chapter 6, "Managing Physical Destinations."
The following sections list the imqcmd subcommands by function.
Broker Management Subcommands
Table 13-4 lists the imqcmd subcommands used to manage brokers. If no host name or port is specified, the default (localhost:7676) is assumed.
Table 13-4 imqcmd Subcommands Used to Manage a Broker
Subcommand Syntax
Description
metrics bkr [-b hostName:port]
[-m metricType]
[-int interval]
[-msp numSamples]Displays broker metrics for the default broker or a broker at the specified host and port.
Use the -m option to specify the type of metric to display:
ttl Displays metrics on messages and packets flowing into and out of the broker. (default metric type)
rts Displays metrics on rate of flow of messages and packets into and out of the broker (per second).
cxn Displays connections, virtual memory heap, and threads.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. The default is an unlimited number (infinite).
pause bkr [-b hostName:port]
Pauses the default broker or a broker at the specified host and port. See Pausing and Resuming a Broker.
query bkr -b hostName:port
Lists the current settings of properties of the default broker or a broker at the specified host and port. Also shows the list of running brokers (in a multi-broker cluster) that are connected to the specified broker.
reload cls
Applies only to broker clusters. Forces all the brokers in a cluster to reload the imq.cluster.brokerlist property and update cluster information. See Adding Brokers to a Cluster for more information.
restart bkr [-b hostName:port]
Shuts down and restart the default broker or a broker at the specified host and port, using the options specified when the broker started.
resume bkr [-b hostName:port]
Resumes the default broker or a broker at the specified host and port.
shutdown bkr [-b hostName:port]
Shuts down the default broker or a broker at the specified host and port.
update bkr [-b hostName:port]
-o attribute=value
[-o attribute=value1]…Changes the specified attributes for the default broker or a broker at the specified host and port.
Physical Destination Management Subcommands
Table 13-5 lists the imqcmd subcommands used to manage physical destinations. If no host name or port is specified, the default (localhost:7676) is assumed.
Table 13-5 imqcmd Subcommands Used to Manage Destinations
Subcommand Syntax
Description
compact dst [-t destType
-n destName]Compacts the built-in file-based data store for the destination of the specified type and name. If no destination type and name are specified, all destinations are compacted. Destinations must be paused before they can be compacted.
create dst -t destType
-n destName
[-o attribute=value]
[-o attribute=value1]…Creates a destination of the specified type, with the specified name, and the specified attributes. A destination name must contain only alphanumeric characters (no spaces) and can begin with an alphabetic character or the characters “_” and “$”. It cannot begin with the character string “mq.”
You cannot perform this operation in a cluster whose master broker is temporarily unavailable.
destroy dst -t destType
-n destNameDestroys the destination of the specified type and name. You cannot destroy a system-created destination, such as a dead message queue.
You cannot perform this operation in a cluster whose master broker is temporarily unavailable.
list dst [-t destType] [-tmp]
Lists all destinations of the specified type, with option of listing temporary destinations as well.
The type argument can have two values:
destType = q (queue)
destType = t (topic)If the type is not specified, all destinations of all types are listed.
metrics dst -t destType
-n destName
[-m metricType]
[-int interval]
[-msp numSamples]Displays metrics information for the destination of the specified type and name.
Use the -m option to specify the type of metric to display:
ttl Displays metrics on messages and packets flowing into and out of the destination and residing in memory. (default metric type))
rts Displays metrics on rate of flow of messages and packets into and out of the destination (per second) and other rate information.
con Displays consumer-related metrics.
dsk Displays disk usage metrics.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. The default is an unlimited number (infinite).
pause dst [-t destType
-n destName]
[-pst pauseType]Pauses the delivery of messages to consumers (-pst CONSUMERS), or from producers (-pst PRODUCERS), or both (-pst ALL), for the destination of the specified type and name. If no destination type and name are specified, all destinations are paused. The default is ALL.
purge dst -t destType
-n destNamePurges messages at the destination of the specified type and name.
query dst -t destType
-n destNameLists information about the destination of the specified type and name.
resume dst [-t destType
-n destName]Resumes the delivery of messages for the paused destination of the specified type and name. If no destination type and name are specified, all destinations are resumed.
update dst -t destType
-n destName
-o attribute=value
[-o attribute=value1]…Updates the value of the specified attributes at the specified destination.
The attribute name may be any of the attributes described in Table 15-1, unless the destination is the dead message queue, mq.sys.dmq.
Connection Services Management Subcommands
Table 13-6 lists the imqcmd subcommands used to manage connection services. If no host name or port is specified, the default (localhost:7676) is assumed.
Table 13-6 imqcmd Subcommands Used to Manage Connection Services
Subcommand Syntax
Description
list svc [-b hostName:port]
Lists all connection services on the default broker or on a broker at the specified host and port.
metrics svc -n serviceName
[-b hostName:port]
[-m metricType]
[-int interval]
[-msp numSamples]Displays metrics for the specified service on the default broker or on a broker at the specified host and port.
Use the -m option to specify the type of metric to display:
ttl Displays metrics on messages and packets flowing into and out of the broker by way of the specified service. (default metric type)
rts Displays metrics on rate of flow of messages and packets into and out of the broker (per second) by way of the specified connection service.
cxn Displays connections, virtual memory heap, and threads.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. The default is an unlimited number (infinite).
pause svc -n serviceName
[-b hostName:port]Pauses the specified service running on the default broker or on a broker at the specified host and port. You cannot pause the admin service.
query svc -n serviceName
[-b hostName:port]Displays information about the specified service running on the default broker or on a broker at the specified host and port.
resume svc -n serviceName
[-b hostName:port]Resumes the specified service running on the default broker or on a broker at the specified host and port.
update svc -n serviceName
[-b hostName:port]
-o attribute=value
[-o attribute=value1]…Updates the specified attribute of the specified service running on the default broker or on a broker at the specified host and port. For a description of service attributes, see Connection Service Properties.
Connection Subcommands
Table 13-7 lists the imqcmd subcommands that apply to connections. If no host name or port is specified, they are assumed to be localhost, 7676.
Table 13-7 imqcmd Subcommands Used to Manage Connection Services
Subcommand Syntax
Description
list cxn [-svn serviceName]
[-b hostName:port]Lists all connections of the specified service name on the default broker or on a broker at the specified host and port. If the service name is not specified, all connections are listed.
query cxn -n connectionID
[-b hostName:port]Displays information about the specified connection on the default broker or on a broker at the specified host and port.
Durable Subscription Subcommands
Table 13-8 provides a summary of the imqcmd durable subscription subcommands. If no host name or port is specified, the default (localhost:7676) is assumed.
Table 13-8 imqcmd Subcommands Used to Manage Durable Subscriptions
Subcommand
Description
list dur -d destName
Lists all durable subscriptions for the specified destination.
destroy dur -n subscrName
-c client_idDestroys the specified durable subscription with the specified Client Identifier.
You cannot perform this operation in a cluster whose master broker is temporarily unavailable.
purge dur -n subscrName
-c client_idPurges all messages for the specified durable subscription with the specified Client Identifier.
Transaction Management Subcommands
Table 13-9 provides a summary of the imqcmd transactions subcommands. If no host name or port is specified, the default (localhost:7676)is assumed.
Table 13-9 imqcmd Subcommands Used to Manage Transactions
Subcommand
Description
list txn
Lists all transactions, being tracked by the broker.
query txn -n transaction_id
Lists information about the specified transaction.
commit txn -n transaction_id
Commits the specified transaction.
rollback txn -n transaction_id
Rolls back the specified transaction.
Command Options
Table 13-10 lists the options to the imqcmd command.
Table 13-10 imqcmd Options
Option
Description
-b hostName:port
Specifies the name of the broker’s host and its port number. The default value is localhost:7676.
To specify port only: -b :7878
To specify name only: -b somehost-c clientID
Specifies the ID of the durable subscriber to a topic. See Managing Durable Subscriptions.
-d destinationName
Specifies the name of the topic. Used with the list dur and destroy dur subcommands. See Managing Durable Subscriptions.
-f
Performs action without user confirmation.
-h
Displays usage help. Nothing else on the command line is executed.
A user name and password is not needed with this option.
-H
Displays usage help, attribute list, and examples. Nothing else on the command line is executed.
A user name and password is not needed with this option.
-int interval
Specifies the interval, in seconds, at which the metrics bkr, metrics dst, and metrics svc subcommands display metrics output.
-javahome path
Specifies an alternative Java 2 compatible runtime to use (default is to use the runtime on the system or the runtime bundled with Message Queue).
-m metricType
Specifies the type of metric information to display. Use this option with the metrics dst, metrics svc, or metrics bkr subcommand. The value of metricType depends on whether the metrics are generated for a destination, a service, or a broker.
-msp numSamples
Specifies the number of metric samples the metrics bkr, metrics dst, and metrics svc subcommands display in their metrics output.
-n argumentName
Specifies the name of the subcommand argument. Depending on the subcommand, this might be the name of a service, a physical destination, a durable subscription, a connection ID, or a transaction ID.
-o attribute=value
Specifies the value of an attribute. Depending on the subcommand argument, this might be the attribute of a broker (see Using the imqcmd Command Utility), service (see Managing Connection Services), or destination (see Managing Durable Subscriptions).
-p password
Specifies your (the administrator’s) password. This option is being deprecated and will be unsupported in a future release. Use one of the following alternatives:
-passfile path
Specifies the path to a file containing the password for the user issuing the command. For more information, see Using a Passfile.
-pst pauseType
Specifies whether producers, consumers, or both are paused when pausing a destination. See Managing Durable Subscriptions.
-rtm timeout
Specifies the initial (retry) timeout period (in seconds) of an imqcmd subcommand. The timeout is the length of time the imqcmd subcommand will wait after making a request to the broker. Each subsequent retry of the subcommand will use a timeout value that is a multiple of the initial timeout period. Default: 10
-rtr numRetries
Specifies the number of retries attempted after an imqcmd subcommand first times out. Default: 5
-s
Silent mode. No output will be displayed.
-secure
Specifies a secure administration connection to the broker using the ssladmin connection service (see Step 4. Configuring and Running SSL-Based Clients). If you omit this option, the connection will not be secure.
-svn serviceName
Specifies the service for which connections are listed. See Getting Information About Connections.
-t destType
Specifies the type of a destination: t (topic) or q (queue). See Managing Durable Subscriptions.
-tmp
Displays temporary destinations. See Table 13-5.
-u userName
Specifies your (the administrator’s) name. If you omit this value, you will be prompted for it.
-v
Displays version information. Nothing else on the command line is executed.
A user name and password is not needed with this option.
See Also
For more information about using imqcmd and for command examples, see Chapter 5, "Managing a Broker" and Chapter 6, "Managing Physical Destinations."
imqobjmgrThe Object Manager utility, imqobjmgr, creates and manages Message Queue administered objects.
Syntax
imqobjmgr subcommand [options]
imqobjmgr -h|H
imqobjmgr -vSubcommands
The Object Manager utility (imqobjmgr) includes the subcommands listed in Table 13-3:
Table 13-11 imqobjmgr Subcommands
Subcommand
Description
add
Adds an administered object to the object store.
delete
Deletes an administered object from the object store.
list
Lists administered objects in the object store.
query
Displays information about the specified administered object.
update
Modifies an existing administered object in the object store.
Command Options
Table 13-12 lists the options to the imqobjmgr command. For a discussion of their use, see the task-based sections that follow.
Table 13-12 imqobjmgr Options
Option
Description
-f
Performs action without user confirmation.
-h
Displays usage help. Nothing else on the command line is executed.
-H
Displays usage help, attribute list, and examples. Nothing else on the command line is executed.
-i fileName
Specifies the name of an command file containing all or part of the subcommand clause, specifying object type, lookup name, object attributes, object store attributes, or other options. Typically used for repetitive information, such as object store attributes.
-j attribute=value
Specifies attributes necessary to identify and access a JNDI object store. See About Object Stores.
-javahome path
Specifies an alternative Java 2 compatible runtime to use (default is to use the runtime on the system or the runtime bundled with Message Queue).
-l lookupName
Specifies the JNDI lookup name of an administered object. This name must be unique in the object store’s context.
-o attribute=value
Specifies attributes of an administered object. See Chapter 16, "Administered Object Attribute Reference".
-pre
Preview mode. Indicates what will be done without performing the command.
-r read-only_state
Specifies whether an administered object is a read-only object. A value of true indicates the administered object is a read-only object. Clients cannot modify the attributes of read-only administered objects. The read-only state is set to false by default.
-s
Silent mode. No output will be displayed.
-t objectType
Specifies the type of a Message Queue administered object:
q = queue
t = topic
cf = connection factory
qf = queue connection factory
tf = topic connection factory
xcf = XA connection factory (distributed transactions)
xqf = XA queue connection factory (distributed transactions)
xtf = XA topic connection factory (distributed transactions)
e = SOAP endpoint (This administered object type is used to support SOAP messages, as described in the Message Queue Developer’s Guide for Java Clients.)
-v
Displays version information. Nothing else on the command line is executed.
See Also
For more information about imqobjmgr and for command examples, see Chapter 8, "Managing Administered Objects."
imqdbmgrThe Database Manager utility (imqdbmgr) sets up the schema needed for persistence. You can also use the imqdbmgr command to delete Message Queue database tables that become corrupted or to change the data store.
Syntax
imqdbmgr subcommand argument [options]
imqdbmgr -h|-help
imqdbmgr -v|-versionSubcommands
The Database Manager utility (imqdbmgr) includes the subcommands listed in Table 13-13:
Table 13-13 imqdbmgr Subcommands
Subcommand
and ArgumentDescription
create all
Creates a new database and Message Queue persistent store schema. This command is used on an embedded database system, and when used, the property imq.persist.jdbc.createdburl needs to be specified.
create tbl
Creates the Message Queue persistent store schema in an existing database system. This command is used on an external database system.
delete tbl
Deletes the existing Message Queue database tables in the current persistent store database.
delete oldtbl
Deletes all Message Queue database tables in an earlier version persistent store database. Used after the persistent store has been automatically migrated to the current version of Message Queue.
recreate tbl
Deletes the existing Message Queue database tables in the current persistent store database and then re-creates the Message Queue persistent store schema.
reset lck
Resets the lock so the persistent store database can be used by other processes.
Command Options
Table 13-14 lists the options to the imqdbmgr command.
Table 13-14 imqdbmgr Options
Option
Description
-Dproperty=value
Sets the specified property to the specified value.
-b instanceName
Specifies the broker instance name and use the corresponding instance configuration file.
-h
Displays usage help. Nothing else on the command line is executed.
-p password
Specifies the database password. This option is being deprecated and will be unsupported in a future release. Use one of the following alternatives:
-passfile path
Specifies the path to a file containing the database password. For more information, see Using a Passfile.
-u name
Specifies the database user name.
-v
Displays version information. Nothing else on the command line is executed.
See Also
For more information about setting up a persistent store, see Setting Up a Persistent Store.
imqusermgrThe User Manager utility (imqusermgr) lets you edit or populate a flat-file user repository. Before using imqusermgr, keep the following things in mind:
- If a broker-specific user repository does not yet exist, you must start up the corresponding broker instance to create it.
- The imqusermgr command has to be run on the host where the broker is installed.
- You need the appropriate permissions to write to the repository: namely, on Solaris and Linux, you must be the root user or the user who first created the broker instance.
Syntax
imqusermgr subcommand [options]
imqusermgr -h
imqusermgr -vSubcommands
Table 13-15 lists the imqusermgr subcommands whose use is described in this chapter.
Table 13-15 imqusermgr Subcommands
Subcommand
Description
add [-i instanceName] -u userName -p passwd
[-g group] [-s]Adds a user and associated password to the specified (or default) broker instance repository, and optionally specifies the user’s group.
delete [-i instanceName] -u userName [-s] [-f]
Deletes the specified user from the specified (or default) broker instance repository.
list [-i instanceName] [-u userName]
Displays information about the specified user or all users in the specified (or default) broker instance repository.
update [-i instanceName] -u userName -p passwd
[-a state] [-s] [-f]update [-i instanceName] -u userName -a state
[-p passwd] [-s] [-f]Updates the password and/or state of the specified user in the specified (or default) broker instance repository.
Command Options
Table 13-16 lists the options to the imqusermgr command.
Table 13-16 imqusermgr Options
Option
Description
-a active_state
Specifies (true/false) whether the user’s state should be active. A value of true means that the state is active. This is the default.
-f
Performs action without user confirmation
-h
Displays usage help. Nothing else on the command line is executed.
-i instanceName
Specifies the broker instance user repository to which the command applies. If not specified, the default instance name, imqbroker, is assumed.
-p passwd
Specifies the user’s password.
-g group
Specifies the user group. Valid values are admin, user, anonymous.
-s
Sets silent mode.
-u userName
Specifies the user name.
-v
Displays version information. Nothing else on the command line is executed.
See Also
For more information about setting up and managing a flat-file user repository, and for imqusermgr command examples, see Using a Flat-File User Repository.
imqsvcadminThe Service Administration (imqsvcadmin) utility installs a broker as a Windows service.
Syntax
imqsvcadmin subcommand [options]
imqsvcadmin -h
Subcommands
The Message Queue Service Administrator utility (imqsvcadmin) includes the subcommands listed in Table 13-17:
Table 13-17 imqsvcadmin Subcommands
Subcommand
Description
install
Installs the service and specifies startup options.
query
Displays the startup options to the imqsvcadmin command. This includes whether the service is started manually or automatically, its location, the location of the java runtime, and the value of the arguments passed to the broker on startup.
remove
Removes the service.
Command Options
Table 13-18 lists the options to the imqsvcadmin command.
Table 13-18 imqsvcadmin Options
Option
Description
-h
Displays usage help. Nothing else on the command line is executed.
-javahome path
Specifies the path to an alternate Java 2 compatible runtime to use (default is to use the runtime on the system or the runtime bundled with Message Queue.
Example: imqsvcadmin -install -javahome d:\jdk1.4
-jrehome path
Specifies the path to a Java 2 compatible JRE.
Example: imqsvcadmin -install -jrehome d:\jre\1.4
-vmargs arg [[arg]…]
Specifies additional arguments to pass to the Java VM that is running the broker service. (You can also specify these arguments in the Windows Services Control Panel Startup Parameters field.)
Example: -vmargs "-Xms16m -Xmx128m"
-args arg [[arg]…]
Specifies additional command line arguments to pass to the broker service. For a description of the imqbrokerd options, see imqbrokerd.
(You can also specify these arguments in the Windows Services Control Panel Startup Parameters field.) For example,
imqsvcadmin -install
-args “-passfile d:\imqpassfile”
The information that you specify using the -javahome, -vmargs, and -args options is stored in the Window’s registry under the keys JREHome, JVMArgs, and ServiceArgs in the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
\Services\iMQ_Broker\ParametersSee Also
For more information about running Message Queue as a Windows service, see Automatic Startup on Windows.
imqkeytoolThe (imqusermgr command generates a self-signed certificate for the broker. The same certificate can be used for the ssljms, ssladmin, or cluster connection service. On UNIX systems you may need to run imqkeytool from the superuser (root) account.
Syntax
imqkeytool -broker
See Also
For more information about setting up secure connections, see Working With an SSL-Based Service.