$ cd /opt/ultraesb-2.6.1/bin $ ./uterm.sh -command help
Ultra Terminal, shortened as UTerm is a management terminal for the UltraESB. It is a CLI (Command Line Interface) to interact with a remote UltraESB server or a complete UltraESB cluster to manage those nodes with a unified set of commands.
UTerm has 2 operational modes,
This mode of operation is very convenient for automated management of the ESB instances as it execute the command in one go and gives the result if there is any. It is expected to be used by scripts, but no limitation for a human using this to get the result of an execution in one go.
Scriptable commands to manage/monitor ESB nodes
You can use UTerm commands or a combination of those to automate certain management tasks with scripts, as it operates as a standalone command to be executed to manage/monitor the ESB instances
To run the UTerm with this mode, you need to pass the "-command" or "–command" option, if this option is not passed in it defaults to run the UTerm in the interactive mode.
Running the UTerm with the standalone, scriptable mode can be done by executing the uterm.sh or the uterm.bat, depending on your operating system with the following options.
On Linux based systems, use a command line shell to navigate to the ULTRA_HOME/bin directory and execute the uterm.sh script with the –command or -command option to see the set of available commands.
$ cd /opt/ultraesb-2.6.1/bin $ ./uterm.sh -command help
Upon executing this you will see the list of commands available to be executed with the –command or the -command option. The displayed command set has a short command, long command and a description, printed in-order separated by a comma. You could use the short or the long form of the command with the above option as you feel convenient. For example to list the UltraESB instances running locally on the same host, the "ls" or the "list-servers" command could be used with the –command or -command option as follows.
$ sh bin/uterm.sh -command ls
The list of complete commands available can be found in the UTerm Command Reference. Alternatively, you can find various options available with the command set printed by the previous "help" command by using the –help or -h option with each and every command. For example to see the possible options with the list-servers command, you can execute;
$ sh bin/uterm.sh -command ls -h
You will be able to see the help of the "list-servers" command with the possible options. You can replace the ls command with any valid command to get the help with the options of those respective commands.
Except for the list-servers command, all the other commands when running in standalone mode requires the –server option, to specify the JMX service URL of the UltraESB instance against which this command to be executed. If this option is not provided UTerm tries to connect to a locally running UltraESB instance.
For example to list the proxy services running on the remote UltraESB instance with the JMX service URL "http://loft:8280/service:jmx:rmi:/10.100.8.1:9994/jndi/rmi:/10.100.8.1:1099/ultra[service:jmx:rmi://10.100.8.1:9994/jndi/rmi://10.100.8.1:1099/ultra]"
$ sh bin/uterm.sh -command lps --server service:jmx:rmi://10.100.8.1:9994/jndi/rmi://10.100.8.1:1099/ultra
If you just need to check the list of proxy services on the UltraESB instance running locally, you can use the same command without the –server option and the URL.
Named service URL configuration
If you have a set of well-known JMX service URLs of the UltraESB instances that you will be managing (which is the case in most of the production deployments), you can name them and use the given name while executing the command instead of the complete URL. See the UTerm Configurations for more information on how to specify named service URLs and use them to invoke the commands.
In the same manner, if you have more than one local UltraESB instances, you can use the ls command first to find the name of the server and then use it to manage that specific local UltraESB instance.
In production deployments of the UltraESB, it is recommended to secure the JMX access, with username password authentication, and in those circumstances you will have to specify the username and the password to connect to the give JMX service URL. For that matter, you can use the "–username" ad "–password" options to specify the username and password.
For example to execute the same previous command over a secured remote JMX connection, secured with "admin" username and "admin" password (which are the default username and password of the UltraESB remote JMX connection)
$ sh bin/uterm.sh -command lps --server service:jmx:rmi://10.100.8.1:9994/jndi/rmi://10.100.8.1:1099/ultra --username admin --password admin
If you try to invoke a command over secure JMX connection without specifying the username and the password, you will get the message "Authentication failed! Credentials required".
Associate security credentials for named JMX service URL
You can associate a username and password to be used with a given server name, and when using the name as the –server option those credentials are used automatically by the tool. See UTerm Configurations for information on how to configure this.
You can view all these available options for running the UTerm with the –help or -h option of the UTerm as follows;
$ sh bin/uterm.sh -h
This will print the help including all the above options and its usage.
This mode of operation is very convenient for human operators/system administrators, and is designed to manage sessions of multiple command executions after connected to a server. Also you can switch between server from the same UTerm console, without logging out from the tool, etc..
Interactive mode supports named JMX service URL
With the interactive mode, you can specify the server to connect to with –server option as in the standalone mode at launching the terminal or can connect to a given server after launching the terminal with the "con" command. This mode also supports the named server URLs and connecting to a node by there name. For secure connections the username and password can be configured with the given server name as in the standalone mode or can be passed at launching time or after launching with the "con" command.
To run the UTerm in this mode, you do not need any option, unless you specify the –server, –username and the –password options at launching time.
Running the UTerm with the interactive mode can be done by executing the uterm.sh or the uterm.bat, depending on your operating system.
On Linux based systems, use a command line shell to navigate to the ULTRA_HOME/bin directory and execute the uterm.sh script.
$ cd /opt/ultraesb-2.6.1/bin $ ./uterm.sh
This will launch the UTerm and you will be given the UTerm prompt to interact with the tool on the CLI.
Welcome to the UltraESB UTerm (interactive mode) Type 'help' for the list of commands uterm>
Type "help" to see the list of available commands on the prompt and hit enter. You will be able to see the list of commands in-order with short command, long command and the description separated by a comma.
To see available options or help on any individual command type the command with the –help or -h option as follows;
uterm> con -h
This command is a special command used in the interactive mode to connect to a given server or to switch to a new server, where you can use the –username or -u option to specify the username and the –password or -o option to specify the password with the server to connect to. This command also supports the named server URLs and the username and password association to a named service URL.
Command auto completion
Note the auto completion of the commands, on typing the "tab" key.
After using the "con" command to connect to a given server, launching the UTerm with the –server option or if you have a locally running UltraESB instance without any of the above, you can execute any command from the set of available commands. Check the help of command and the options available with the –help or -h option before executing the command for the first time.
For example to connect to the server and to retrieve the list of proxy services;
uterm> con service:jmx:rmi://18.104.22.168:9994/jndi/rmi://22.214.171.124:1099/ultra -u admin -p admin Successfully connected to the UltraESB instance! uterm> lps echo-back echo-proxy uterm>
If there is any command that has a clustering presence (most of the operation commands does) you can use the "–cluster-wide" or the "-w" option to invoke the command on the complete cluster, from the instance to which you are connected to.
All about UTerm is covered in this section and have a look at the UTerm Command Reference to learn each and every command in action.