1. Local Commands

The following is a list of common commands used in jeusadmin.

Command Description

connect

Tries to access JEUS Master Server or Managed Server.

disconnect

Disconnects and returns to an offline state.

help

Displays command help information.

history

Displays the history of entered commands.

p

Executes a previously entered command. If no option is specified, the previous command is executed.

remove-login-cache

Removes specified user login information from the cache file stored via the cachelogin function.

set-server-option

Specifies the default value for the server option.

set-servers-option

Specifies the default value for the servers option.

start-record

Starts the recording function that stores entered commands in script format.

stop-record

Stops the recording function.

unset-server-option

Deletes the default values specified by set-server-option.

unset-servers-option

Deletes the default values specified by set-servers-option.

verbose

Displays details when executing a command.

1.1. connect

Connects to a server. The user name and password must be specified.

  • Alias

    login

  • Usage

    connect [-u,--username <user-name>]
            [-p,--password <password>]
            [-f <file-name>]
            [-cachelogin]
            [-h,--host <server-address>]
            [-port <server port>]
            [-d,--domain <domain name>]
  • Parameters

    Parameter Description

    [-u, --username <user-name>]

    User name.

    [-p, --password <password>]

    Password.

    [-f <file-name>]

    Name of the password file that contains the user name and password.

    [-cachelogin]

    Records the user name and password in a file.

    [-h, --host <server-address>]

    Server address to connect to. If not specified, jeusadmin tries to connect to the localhost.

    [-port <server-port>

    Server port to connect to. If not specified, the default value is used. (Default: 9736)

    [-d,--domain <domain name>]

    Domain name, which is used to search for the security.key file.

  • Example

    • The following connects to a host specified with [-h] by using the user name specified with [-u] and the password specified with [-p].

      offline>connect -u administrator -p jeus -h 127.0.0.1
      Attempting to connect to 127.0.0.1:9736.
      The connection has been established to JEUS Master Server [adminServer] in the domain [domain1].
      [MASTER]domain1.adminServer>
    • The following connects to the localhost because [-h] is not used.

      offline>connect -u administrator -p jeus
      Attempting to connect to 127.0.0.1:9736.
      The connection has been established to JEUS Master Server [adminServer] in the domain [domain1].
      [MASTER]domain1.adminServer>
  • Note

    This command can be used without being connected to the server.

1.2. disconnect

Closes the connection and returns to an offline state.

  • Alias

    logout

  • Usage

    disconnect
  • Example

    offline>connect
    Enter the server address:
    User name: administrator
    Password:
    Attempting to connect to 127.0.0.1:9736.
    The connection has been established to JEUS Master Server [adminServer] in the domain [domain1].
    
    [MASTER]domain1.adminServer>disconnect
    The connection has been closed.
    offline>
  • Note

    This command can be used without being connected to the server.

1.3. help

Displays command help information. If the command is executed without any other options, a list of commands and an explanation of the basic syntax of the commands are displayed.

  • Usage

    help [-g,--group <group-name> | <command-name> | -l,--list]
  • Parameters

    Parameter Description

    [-g,--group <group-name>]

    Displays a list of commands and simple descriptions that belong to the given group name.

    [<command-name>]

    Displays help information of the specified command (command name).

    Displays information about the command such as command name, alias, usage, and options.

    Options can be omitted.

    [-l,--list]

    Displays a simple description of all commands.

  • Example

    • When only the help command is used

      offline>help
      LIST OF AVAILABLE COMMANDS
      [Local]____________________________________________________________________
        connect                             disconnect
        exit                                help
        history                             p
        remove-login-cache                  set-server-option
        set-servers-option                  start-record
        stop-record                         unset-server-option
        unset-servers-option                verbose
      
      [Server Management]________________________________________________________
        local-shutdown
      
      [Domain Configuration]_____________________________________________________
        apply-configuration-plan            create-domain
        delete-domain                       list-domains
        pack-domain                         unpack-domain
      
      [Application]______________________________________________________________
        install-application                 install-deployment-plan
        redeploy-application
      
      [Library]__________________________________________________________________
        install-library
      
      [Web]______________________________________________________________________
        precompile-jsp
      
      COMMAND GRAMMAR
          Command Usage
              COMMAND [COMMAND_OPTIONS] [GLOBAL_OPTIONS] [(>|>>) FILENAME]
          Details
              COMMAND: target command to execute.
              [COMMAND_OPTIONS]: Options for target command.
              [GLOBAL_OPTIONS]: Common options for all commands.
                  -verbose
                      Prints the stack trace for errors.
                  -repeat <count>
                      Repeats the target command X times.
                  -interval <seconds>
                      Specifies the interval at which to repeat execution, in
                      seconds.
              [(>|>>) FILENAME]
                  Prints the result of the target command to the specified file.
          Examples
              help -l -repeat 3 -interval 10 > result.txt
      
      To show detailed information for a command, use 'help [COMMAND_NAME]'.
      ex) help connect
      offline>
    • When the help command is used with the [-l] option

      offline>help -l
      [Local]____________________________________________________________________
        connect                  Attempting to authenticate with the target
                                 server.
        disconnect               Disconnects from the currently connected server.
      
        ......
      
      [Server Management]________________________________________________________
        local-shutdown           Shuts down the currently connected server.
      
        ......
      
      
      To show detailed information for a command, use 'help [COMMAND_NAME]'.
      ex) help connect
      offline>
    • When the help command is used with the [-g] option

      The following is an example of displaying a list of the 'Server Management' group commands.

      offline>help -g "Server Management"
      [Server Management]________________________________________________________
        local-shutdown    Shuts down the currently connected server.
      
      To show detailed information for a command, use 'help [COMMAND_NAME]'.
      ex) help connect
      offline>
    • When the help command is used with the [<command name>] option, help information for the specified command is displayed.

      The following is an example of displaying the help information of the add-server command.

      [MASTER]domain1.adminServer>help add-server
      NAMES
          add-server
              Adds a new server to the domain configuration. If a server name is
              not provided, the current server list in this domain will be shown.
      Alias
          addserver
      USAGE
          add-server <server-name>
              [-target,--duptargetserver <target-server>]
              [-port,--baseport <base-port>]
              [-addr,--baseaddr <base-addr>]
              [-http,--httpport <http-port>]
              [-node,--nodeName <node-name>]
              [-jvm,--jvmOptions <jvm-options>]
              [-logdir,--logHomeDirectory <server-log-home-directory>]
              [-a,--actionOnResourceLeak <action-on-resource-leak>]
              [-l,--logStdoutToRawFormat <print-stdout-to-raw-format>]
              [-m,--mejb <enable-MEJB>]
              [-c,--classFtp <enable-class-ftp-service>]
              [-f,--forceLock]
              [-detail]
      OPTIONS
          <server-name>
              the name of server you want to modify configuration of
      
          [-target,--duptargetserver <target-server>]
              duplicate the configuration of the target server
      
          [-port,--baseport <base-port>]
              base service listen port of the server
      
          [-addr,--baseaddr <base-addr>]
              base service listen address of the server
      
          [-http,--httpport <http-port>]
              http listen port of the server
      
          [-node,--nodeName <node-name>]
              name of the node this server is located
      
          [-jvm,--jvmOptions <jvm-options>]
              jvm configurations applied to this server jvm
      
          [-logdir,--logHomeDirectory <server-log-home-directory>]
              the log directory which has all the log files created by this server
      
          [-a,--actionOnResourceLeak <action-on-resource-leak>]
              strategy when resource leak is detected. it must be one of
              AutoClose, NoAction, Warning
      
          [-l,--logStdoutToRawFormat <print-stdout-to-raw-format>]
              [Dynamic] whether stdout is printed in row format or in JEUS Logger
              format.
      
          [-m,--mejb <enable-MEJB>]
              [Dynamic] whether using MEJB or not .true, false
      
          [-c,--classFtp <enable-class-ftp-service>]
              [Dynamic] whether using class ftp service or not .true, false
      
          [-f,--forceLock]
              Acquires the configuration lock forcibly.
      
          [-detail]
              Show detail results
  • Note

    This command can be used without being connected to the server.

1.4. history

Displays a list of previously executed commands.

The list of commands is stored in ${user.home}/.jeusadmin/commandHistory. Use the p command to re-execute a command. The maximum number of commands in the list is 100.

  • Usage

    history [-clear | <size>]
  • Parameters

    Parameter Description

    [-clear]

    Resets the list of commands.

    [<size>]

    Number of commands to display. Displays as many commands as size, in chronological order.

  • Example

    offline>history
    1 : help history
    2 : connect -u administrator -p jeus
    3 : disconnect
    
    To execute a command in the history, please use '!' command (e.g. ! 7)
    offline>history 3
    3 : disconnect
    
    To execute a command in the history, please use '!' command (e.g. ! 7)
    offline>history -clear
    The command history has been cleared.
    offline>
  • Note

    This command can be used without being connected to the server.

1.5. p

Re-executes a previous command. Use the history command to view the list of previously executed commands.

  • Alias

    !

  • Usage

    p [<history-number>]
  • Parameters

    Parameter Description

    [<history-number>]

    History number of the command to be re-executed.

  • Example

    offline>history
    1 : connect -u jeus -p jeus
    2 : disconnect
    
    To execute a command in the history, please use '!' command (e.g. ! 7)
    offline>p 1
    connect -u jeus -p jeus
    Attempting to connect to 127.0.0.1:9736.
    The connection has been established to JEUS Master Server [adminServer] in the domain [domain1].
    [MASTER]domain1.adminServer>! 2
    disconnect
    The connection has been closed.
    offline>
  • Note

    This command can be used without being connected to the server.

1.6. remove-login-cache

Deletes the specified user login information from the cache file stored by the cachelogin function.

The information stored by cachelogin is distinguished by <domain-name> and <user-name>.

  • Usage

    remove-login-cache [-domain <domain-name>]
                       [-u <user-name>]
                       [-f <file-name>]
  • Parameters

    Parameter Description

    [-domain <domain-name>]

    Domain name used to store the login information.

    [-u <user-name>]

    User name used to store the login information.

    [-f <file-name>]

    Name of the password file that contains the user name and password.

  • Example

    offline>remove-login-cache -domain domain1 -u user1
    The cached login information [domain1:user1] has been successfully removed from /home/OSUser/.jeusadmin/.jeuspasswd.
  • Note

    This command can be used without being connected to the server.

1.7. set-server-option

Sets the default value for the -server option. If no option is specified, the current default value is displayed.

  • Alias

    setserver

  • Usage

    set-server-option <server-name>
  • Parameters

    Parameter Description

    <server-name>

    Sets the server name as the default server option value.

  • Example

    Set "adminServer" as the default value and execute the jndi-info command. Before a value is set, an error occurs when executing the jndi-info command because the server option is missing. After the value is set, the jndi-info command executes on adminServer without the server option.

    [MASTER]domain1.adminServer>jndi-info
    The following options are missing: server
    
    [MASTER]domain1.adminServer>set-server-option
    The default server name is not set.
    
    [MASTER]domain1.adminServer>set-server-option adminServer
    The default server name has been set: adminServer.
    
    [MASTER]domain1.adminServer>set-server-option
    The current default server name: adminServer.
    
    [MASTER]domain1.adminServer>jndi-info
    The JNDI list on the adminServer
    List of the context /
    ================================================================================
    +---------------------+----------------------------------------+---------------+
    |         Name        |                  Value                 | Local Binding |
    +---------------------+----------------------------------------+---------------+
    | ConnectionFactory   | jeus.jms.client.facility.factory.JeusC | false         |
    |                     |onnectionFactory                        |               |
        ......
    
    [MASTER]domain1.adminServer>
  • Note

    This command can be used without being connected to the server.

1.8. set-servers-option

Sets the default value for the -servers option. If no option is specified, the current default value is displayed.

  • Alias

    setservers

  • Usage

    set-servers-option [<server-list>]
  • Parameters

    Parameter Description

    [<server-list>]

    Specifies the server names to be used as default values for the servers option. Each server name is separated by a comma.

  • Example

    The following is an example of using the set-servers-option command to specify the deploy targets (servers), and then using the deploy command to deploy applications to the specified targets (servers).

    [MASTER]domain1.adminServer>set-servers-option
    The default server list is not set.
    
    [MASTER]domain1.adminServer>set-servers-option adminServer,server1
    The default server list has been set: adminServer,server1.
    
    [MASTER]domain1.adminServer>set-servers-option
    The current default server list: adminServer,server1.
    
    [MASTER]domain1.adminServer>deploy sample
    deploy the application for the application [sample] succeeded.
    
    [MASTER]domain1.adminServer>appinfo
    Application information for the domain [domain1].
    ================================================================================
    +----------+-----------+---------+-------------+----------+--------------------+
    | Applicati|Application|  State  |    Target   |  Target  |  Application Path  |
    |  on ID   |   Type    |         |   Servers   | Clusters |                    |
    +----------+-----------+---------+-------------+----------+--------------------+
    | sample   | WAR       | RUNNING | server1,admi|          | ${INSTALL_HOME}/sam|
    |          |           |         |nServer      |          |ple/sample.war      |
    +----------+-----------+---------+-------------+----------+--------------------+
    ================================================================================
  • Note

    This command can be used without being connected to the server.

1.9. start-record

Starts the recording function that records entered commands in a script file.

Commands are stored according to the extensions of the specified recording files by using the following script. Once recording starts, "-Rec*" is added to the prompt.

  • Alias

    startrecord

  • Usage

    start-record [<recfile>]
  • Parameters

    Parameter Description

    [<recfile>]

    Specifies the file that will record commands. This is stored as a script file, so only the currently supported script’s extensions, ".py" and ".rb" can be used.

  • Example

    • Store commands in record_script_[timestamp].py when executing without specifying an option.

      offline>start-record
      Starting recording to file : record_script_20150101123456.py
      offline-Rec*>
    • Store commands in the applicable file when [<recfile>] is specified.

      offline>start-record record.py
      Starting recording to file : record.py
      offline-Rec*>
  • Note

    This command can be used without being connected to the server.

1.10. stop-record

Stops the recording function.

  • Alias

    stoprecord

  • Usage

    stop-record
  • Example

    offline-Rec*>stop-record
    Stopping recording to file : recrod.py
    offline>
  • Note

    This command can be used without being connected to the server.

1.11. unset-server-option

Deletes the default value set by the set-server-option command.

  • Alias

    unset-server-option

  • Usage

    unset-server-option
  • Example

    Reset the default value set by the set-server-option command. If the jndi-info command is executed after resetting the default value, an error occurs that states the server option is missing.

    [MASTER]domain1.adminServer>set-server-option
    The current default server name: adminServer.
    
    [MASTER]domain1.adminServer>unset-server-option
    The default server name has been unset.
    
    [MASTER]domain1.adminServer>set-server-option
    The default server name is not set.
    
    [MASTER]domain1.adminServer>jndi-info
    The following options are missing: server
  • Note

    This command can be used without being connected to the server.

1.12. unset-servers-option

Deletes the default value set by the set-servers-option command.

  • Alias

    unsetservers

  • Usage

    unset-servers-option
  • Example

    [MASTER]domain1.adminServer>set-servers-option
    The current default server list: adminServer,server1.
    
    [MASTER]domain1.adminServer>unset-servers-option
    The default server list has been unset.
    
    [MASTER]domain1.adminServer>set-servers-option
    The default server list is not set.
    
    [MASTER]domain1.adminServer>
  • Note

    This command can be used without being connected to the server.

1.13. verbose

Displays the details of the command process. If no option is specified, the system displays the current setting for this property. If this setting is activated and an error occurs while processing the command, a stack trace is displayed.

  • Usage

    verbose [-off | -on]
  • Parameters

    Parameter Description

    [-on]

    Activates the command.

    [-off]

    Deactivates the command.

  • Example

    • To check if the command was activated

      offline>verbose
      Verbose output disabled.
      offline>
    • Execution example

      offline>verbose
      Verbose output disabled.
      
      offline>help notexistcommand
      Command notexistcommand not found
      
      offline>verbose -on
      Verbose output is enabled.
      
      offline>help notexistcommand
      Command notexistcommand not found
      jeus.tool.console.executor.CommandException: Command notexistcommand not found
      
        ......
      
      offline>verbose -off
      Verbose output disabled.
      
      offline>help notexistcommand
      Command notexistcommand not found
      offline>
  • Note

    This command can be used without being connected to the server.