Command Reference

 
 

Online Documentation    CLI User's Guide    Command Reference

 
 

[Command Overview]     [Help [help]]     [Exit [exit]]     [Available Routers [ar]]     [Switch Router [sr]]     [Add Extension Swiftlet [add]]     [Remove Extension Swiftlet [remove]]     [Reboot [reboot]]     [Halt [halt]]     [Save [save]]     [Change Context [cc]]     [List Context [lc]]     [Show Template [show template]]     [New Entity [new]]     [Delete Entity [delete]]     [Describe Property [describe]]     [Set Property [set]]     [Display the Router Environment]     [Changing the Routername]     [Display Swiftlet Meta Data]    
[Document Index]

 
     
 
  Command Overview

CLI commands are grouped, where each group is an entry of a command stack. On the top level of the command stack are commands of the CLI shell. These commands are available every time.

CLI shell commands:

CommandDescription
helpDisplays a list of all available commands.
exitExit CLI
sr <router>Switch to Router <router>
arShow all available Routers

By invoking the a sr <router> command, CLI switches to the context of router <router>. The CLI prompt switches to the last used context of the router. Router commands are also available every time.

Router commands:

CommandDescription
cc <context>Change to context <context>. Use '..' to go up one level.
lc [<context>]List the context <context> or, if not specified, list the current context.

Next in stack are commands from the router's Swiftlet Manager. These commands are also available every time.

Swiftlet Manager commands:

CommandDescription
add <name> class <classname>Add a new Extension Swiftlet <name> with class of <classname>
remove <name>Remove an installed Extension Swiftlet <name>
rebootReboot the router
haltHalt the router
saveSave this router configuration

At the end of the command stack are commands from the current context that is a result of the cc <context> command. The current context could be an entity list or an entity. Both have different commands.

Entity list commands:

CommandDescription
show templateShow the template for new entities
new <name> [<prop> <value> ...]Create a new entity <name>, optional specify property/value pairs.
delete <entity>Delete entity <entity>

Entity commands:

CommandDescription
set <prop> [<value>]Set property <prop> to value <value> or to null
describe <prop>Show full description of property <prop>

Help [help]

The help command lists the descriptions of the commands along the current command stack.

Example:


 router1/sys$jms/listeners> help
  
 Commands from CLI shell
  
 exit Exit CLI
 sr <router> Switch to Router <router>
 ar Show all available Routers
  
 Commands from Router Context 'router1'
  
 cc <context> Change to Context <context>
 lc [<context>] List the Content of <context>
  
 Commands from current Router's Swiftlet Manager
  
 reboot Reboot the Router
 halt Halt the Router
 save Save this Router Configuration
  
 Commands from Context 'listeners'
  
 show template Show the Template for new Entities
 new <name> [<prop> <value> ...] Create a new Entity
 delete <entity> Delete Entity
  
 router1/sys$jms/listeners>_

Exit [exit]

The exit command exits CLI. Configuration changes will not be saved automatically.

Available Routers [ar]

Shows all available routers. If a new router becomes available or an existing router becomes unavailable in the router network where CLI is connected to, CLI displays the following informations (example):


 Router 'dev194.iit.de' is available for administration.

or


 Router 'dev194.iit.de' is unavailable for administration.


To get a list of currently available routers, the ar command could be used.

Example:


 pamela.iit.de/sys$queuemanager> ar
  
 Available Routers:
  
 pamela.iit.de
 dev194.iit.de
  
 pamela.iit.de/sys$queuemanager>_

Switch Router [sr]

Switches to a specific router and makes this router the current router for configuration. After CLI starts, there is no current router, so a sr command must be invoked.

Example:


 $pamela> java com.swiftmq.admin.cli.CLI smqp://localhost:4005 QueueConnectionFactory
  
 Welcome to SwiftMQ!
  
 Username: admin
 Password: secret
 Trying to connect ... connected
 Type 'help' to get a list of available commands.
 Router 'pamela.iit.de' is available for administration.
 Router 'dev194.iit.de' is available for administration.
 >sr dev194.iit.de
 dev194.iit.de>_

Note that you can abbreviate the router name, i. e. in the above example you can also type "sr d" to switch to router dev194.iit.de.

Add Extension Swiftlet [add]

Adds a new Extension Swiftlet.

Example:


 router1> add xt$mailer class com.swiftmq.extensions.mailer.MailerSwiftlet
 router1>_

Remove Extension Swiftlet [remove]

Removes an installed Extension Swiftlet.

Example:


 router1> remove xt$mailer
 router1>_

Reboot [reboot]

Reboot the router. To activate changes, the configuration must be saved before invoking reboot.

Example:


 router5> reboot
  
 Reboot Launch in 10 Seconds.
  
 router5> Connection lost.
 $pamela>_

Halt [halt]

Halts the router. To activate changes, the configuration must be saved before invoking halt.

Example:


 router5> halt
  
 Router Halt in 10 Seconds.
  
 router5> Connection lost.
 $pamela>_

Save [save]

Saves the configuration in the router's property file. Before save, the old property file is backed up.

Example:


 router5> save
  
 Configuration backed up to file 'smqr5.properties.20000515144104783'.
 Configuration saved to file 'smqr5.properties'.
  
 router5>_

Change Context [cc]

Change the current context. The context could be specified absolute or relative to the current context. Specifying double-dots ".." switches to the context one level above.

Examples:


 dev194.iit.de/sys$queuemanager> cc queues
 dev194.iit.de/sys$queuemanager/queues> cc /sys$jms/listeners/plainsocket
 dev194.iit.de/sys$jms/listeners/plainsocket> cc ..
 dev194.iit.de/sys$jms/listeners>_

Note that you can abbreviate the context name, i. e. in the above example you can also type "cc /sys$j/l/p" to switch to context /sys$jms/listeners/plainsocket.

List Context [lc]

Lists the content of the given context or, if not specified, the content of the current context.

Example:


 router1/sys$jms/listeners> lc
  
 Entity List: Listeners
 Description: Listener definitions
  
 Entities in this List:
 ----------------------
 plainsocket
  
 router1/sys$jms/listeners> lc /sys$queuemanager/queues/testqueue
  
 Entity: Queue Properties
 Description: Properties for each Queue
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 cache.size 100
 cleanup.interval -1
  
 Entity contains no Sub-Entities.
  
 router1/sys$jms/listeners>_

Note that you can abbreviate the context name, i. e. in the above example you can also type "lc /sys$q/q/t" to list context /sys$queuemanager/queues/testqueue.

Show Template [show template]

Shows the template for new entities of an entity list. This command is useful if one doesn't know which properties are mandantory if a new entity should be created.

Example:


 router1/sys$queuemanager/queues> show template
  
 Template: Queue Properties
 Description: Properties for each Queue
  
 Properties for this Template:
  
 Property Name : cache.size
 Display Name : Cache Size
 Description : Message Queue Cache Size
 Type : class java.lang.Integer
 Min. Value : 10
 Max. Value : <not set>
 Default Value : 100
 Poss. Values : <not set>
 Mandantory : false
 Read Only : false
 Reboot Required: false
  
 Property Name : cleanup.interval
 Display Name : Cleanup Interval
 Description : Cleanup Interval for expired Messages
 Type : class java.lang.Long
 Min. Value : <not set>
 Max. Value : <not set>
 Default Value : -1
 Poss. Values : <not set>
 Mandantory : false
 Read Only : false
 Reboot Required: false
  
 Template contains no Sub-Entities.
  
 router1/sys$queuemanager/queues>_

New Entity [new]

Creates a new entity in this entity list. CLI uses the template (see show template) to create a new entity. All mandantory properties must be set in the new command. For optional properties the default values are set from CLI.

Example:


 router1/sys$queuemanager/queues> new srvinbound cache.size 200
 router1/sys$queuemanager/queues> lc srvinbound
  
 Entity: Queue Properties
 Description: Properties for each Queue
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 cache.size 200
 cleanup.interval -1
  
 Entity contains no Sub-Entities.
  
 router1/sys$queuemanager/queues> lc
  
 Entity List: Queues
 Description: Queue definitions
  
 Entities in this List:
 ----------------------
 srvinbound
 testqueue
 timeQueue
  
 router1/sys$queuemanager/queues>_

Delete Entity [delete]

Deletes the entity from this entity list.

Example:


 router1/sys$queuemanager/queues> lc
  
 Entity List: Queues
 Description: Queue definitions
  
 Entities in this List:
 ----------------------
 srvinbound
 testqueue
 timeQueue
  
 router1/sys$queuemanager/queues> delete srvinbound
 router1/sys$queuemanager/queues> lc
  
 Entity List: Queues
 Description: Queue definitions
  
 Entities in this List:
 ----------------------
 testqueue
 timeQueue
  
 router1/sys$queuemanager/queues>_

Describe Property [describe]

Shows a full description of the specific property.

Example:


 router1/sys$authentication> describe authentication.enabled
  
 Property Name : authentication.enabled
 Display Name : Authentication Enabled
 Description : Enabled/disables Authentication
 Type : class java.lang.Boolean
 Min. Value : <not set>
 Max. Value : <not set>
 Default Value : false
 Poss. Values : <not set>
 Actual Value : true
 Mandantory : false
 Read Only : false
 Reboot Required: false
  
 router1/sys$authentication>_

Set Property [set]

Sets the value for this property. For String type properties the value is optional. In this case, the default value is set by CLI.

Example:


 router1/sys$authentication> lc
  
 Entity: Authentication Swiftlet
 Description: Authentication Server
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 authentication.enabled false
  
 Sub-Entities of this Entity:
 ----------------------------
 .metadata
 groups
 users
  
 router1/sys$authentication> set authentication.enabled true
 router1/sys$authentication> lc
  
 Entity: Authentication Swiftlet
 Description: Authentication Server
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 authentication.enabled true
  
 Sub-Entities of this Entity:
 ----------------------------
 .metadata
 groups
 users
  
 router1/sys$authentication>_

Display the Router Environment

Each Router has a special entity ".env" which contains data about the environment the router is running in. Use the lc command to display this data.

Example:


 router1> lc .env
  
 Entity: Router Environment
 Description: Environment of this Router
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 hostname (R/O) dev194.iit.de
 jre (R/O) 1.2.2
 os (R/O) Windows NT 4.0 x86
 routername router1
 startuptime (R/O) Wed Jun 21 15:31:54 GMT+02:00 2000
  
 Entity contains no Sub-Entities.
  
 router1>_

Changing the Routername

Within the entity ".env" of each router is one property "routername" which is not read only. It contains the logical name of the router. This name must be set if multiple routers are running on one host. If this property isn't set, the routername is equal to the DNS name of the host where the router is running on.

Be aware, that changing the routername is - even in a connected router network - a very heavyweight change, because all references to this router (authentication grants, static routes etc) must also be changed. For this reason it is the very best, to give each router per default a logical routername on initial configuration. In this case, there are really minimal changes if, for example, a router is transferred on another physical host or another router is started on the same host.

Example:


 router1> cc .env
 router1/.env> set routername
  
 To activate this Propertychange, a Reboot of this Router is required.
  
 router1/.env> lc
  
 Entity: Router Environment
 Description: Environment of this Router
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 hostname (R/O) dev194.iit.de
 jre (R/O) 1.2.2
 os (R/O) Windows NT 4.0 x86
 routername <not set>
 startuptime (R/O) Wed Jun 21 15:31:54 GMT+02:00 2000
  
 Entity contains no Sub-Entities.
  
 router1/.env> set routername router1
  
 To activate this Propertychange, a Reboot of this Router is required.
  
 router1/.env> lc
  
 Entity: Router Environment
 Description: Environment of this Router
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 hostname (R/O) dev194.iit.de
 jre (R/O) 1.2.2
 os (R/O) Windows NT 4.0 x86
 routername router1
 startuptime (R/O) Wed Jun 21 15:31:54 GMT+02:00 2000
  
 Entity contains no Sub-Entities.
  
 router1/.env>_

Display Swiftlet Meta Data

Each Swiftlet has a special entity ".meta" which contains meta data about the Swiftlet as vendor, version etc. Use the lc command to display this data.

Example:


 router1/sys$jms> lc .meta
  
 Entity: Swiftlet Meta Data
 Description: Describes this Swiftlet
  
 Properties for this Entity:
  
 Name Current Value
 --------------------------------------------------------------
 class (R/O) com.swiftmq.router.swiftlets.jms.JMSSwiftlet
 description (R/O) Java Message Service Server
 displayname (R/O) JMS Swiftlet
 name (R/O) sys$jms
 vendor (R/O) IIT GmbH, Bremen/Germany
 version (R/O) 1.0
  
 Entity contains no Sub-Entities.
  
 router1/sys$jms>_

 
 
     
 

[Command Overview]     [Help [help]]     [Exit [exit]]     [Available Routers [ar]]     [Switch Router [sr]]     [Add Extension Swiftlet [add]]     [Remove Extension Swiftlet [remove]]     [Reboot [reboot]]     [Halt [halt]]     [Save [save]]     [Change Context [cc]]     [List Context [lc]]     [Show Template [show template]]     [New Entity [new]]     [Delete Entity [delete]]     [Describe Property [describe]]     [Set Property [set]]     [Display the Router Environment]     [Changing the Routername]     [Display Swiftlet Meta Data]    
[Document Index]

 
 

Online Documentation    CLI User's Guide    Command Reference

 
 

 Copyright © 2000, IIT GmbH, Bremen/Germany. All rights reserved.
SwiftMQ and Swiftlet are registered trademarks of IIT GmbH.
All other product names mentioned herein are trademarks of their respective owners.