LibraryToggle FramesPrintFeedback

Using the Command Console

Overview

The Fuse ESB Enterprise command console is the central tool for both managing the Fuse ESB Enterprise environment and interacting with Fuse Fabric. When you start Fuse ESB Enterprise the console starts automatically.

The console provides commands that you can use to perform basic management of your Fuse ESB Enterprise environment, including deploying and configuring applications.

The console uses prefixes to group commands relating to the same functionality. For example, commands related to configuration are prefixed config:, and logging-related commands are prefixed log:.

Starting the command console

To start Fuse ESB Enterprise, open a command prompt in the installation directory and enter:

Windowsbin\fuseesb.bat
*NIXbin/fuseesb.sh

Fuse ESB Enterprise starts and the console is ready. You should see the prompt shown in Example 1.

Example 1. The Fuse ESB Enterprise Console

______                   _____  _____ ______ 
|  ___|                 |  ___|/  ___|| ___ \
| |_  _   _  ___   ___  | |__  \ `--. | |_/ /
|  _|| | | |/ __| / _ \ |  __|  `--. \| ___ \
| |  | |_| |\__ \|  __/ | |___ /\__/ /| |_/ /
\_|   \__,_||___/ \___| \____/ \____/ \____/

  Fuse ESB (7.0.0.fuse-beta-042)
  http://fusesource.com/products/fuse-esb-enterprise/

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Fuse ESB.

FuseESB:karaf@root> 

Getting help

The console provides two levels of help:

  • console help—list all of the commands along with a brief summary of the commands function

  • command help—a detailed description of a command and its arguments

To access the console help, enter the help command from the console prompt. It displays a grouped list of all the commands available in the console. Each command in the list is followed by a description, as shown in Example 2.

Example 2. Console Help

FuseESB:karaf@root> help
COMMANDS
        activemq:browse
        activemq:bstat
        activemq:create-broker
                Creates a broker instance.
        activemq:destroy-broker
                Destory a broker instance.
        activemq:list
        activemq:purge
        activemq:query
        admin:change-opts
                Changes the Java options of an existing container instance.
        admin:change-rmi-registry-port
                Changes the RMI registry port (used by management layer) of an 
                existing container instance.
    ...
FuseESB:karaf@root>

The help for each command includes the definition, the syntax, and the arguments and any options. To display the help for a command, type the command with the --help option. As shown in Example 3, entering admin:start --help displays the help for that command.

Example 3. Help for a Command

FuseESB:karaf@root> admin:start --help
DESCRIPTION
        admin:start

        Starts an existing container instance.

SYNTAX
        admin:start [options] name

ARGUMENTS
        name           The name of the container instance

OPTIONS
        --help
                       Display this help message
        -o, --java-opts
                       Java options when launching the instance

FuseESB:karaf@root>

Command completion

Pressing Tab at anytime provides you with a list of commands that can complete what you have already entered at the prompt. For example, if you enter active followed by Tab, a list similar to Example 4 is shown.

Example 4. Console Commands

activemq:browse
activemq:bstat                    activemq:create-broker
activemq:destroy-broker           activemq:list
activemq:purge                    activemq:query
FuseMQ:karaf@root>

If you press Tab without entering anything at the prompt, the console lists all of the available commands.

Command groups

Commands are grouped under prefixes according to functionality. Table 1 summarizes the command groups available in the console. Click on a command group name for more information.

Table 1. Apache ActiveMQ Command Groups

Command GroupDescription
activemq Views and manages brokers and messages.
admin Creates, manages, and destroys containers.
camelManages Apache Camel contexts and routes
config Manages configuration.
cxfManages Apache CXF buses and endpoints.
dev Utilities that are useful for a developer while testing bundles in the container.
fab Manages the dependency resolution mechanism used by Fuse Application Bundles.
fabric Performs provisioning and configuration using Fuse Fabric.
features Performs provisioning based on Apache Karaf feature specs.
jaas Manages the console's security settings.
jbiManage deployed JBI artifacts.
log Displays and configures logging.
nmrLists NMR endpoints.
obrAccesses the OSGi Bundle Repository (OBR).
osgi Manages OSGi bundles.
packages Lists imported and exported packages.
patch Manages patches.
shell Performs basic console functions
ssh Creates and connects to a remote SSH server
web Lists the WARs deployed in the container.
zk Accesses and modifies entries in the Zookeeper registry.

Short version

Many of the console commands allow you to omit the group prefix.

If the command is only in one command groups, you can omit the group prefix. For example, you can enter bstat in place of activemq:bstat because it only exists in the activemq command group.

If the command exists in multiple command groups, you can still drop the prefix and the console will default to using the version of the command from one of the following command groups:

  • shell

  • osgi

  • admin

For example, info is equivalent to shell:info. If you wanted to use osgi:info, you need to enter the full command.

Comments powered by Disqus