Command Line Option - Connection Monitor
RMIAdmin support command line usage, therefore you may further develop script/batch which invoke activity such as "Connection Monitoring", as a result to promote automation.


For example, you may wish to check remote server connection status via Command Prompt (for Windows) or Console (for Unix-like Computer) rather than using the RMIAdmin GUI. The benefit is that you could then embed all your instructions into batch (*.bat) or shell script (*sh), and therefore the integration with other scripting/programming languages is made possible.

Usage instructions
  1. java RMIAdmin.RMIAdminClient_ConnectionMonitor -h
    Display the help menu

  2. java RMIAdmin.RMIAdminClient_ConnectionMonitor -i ip_address
    Specify the "IP Address" of remote RMIServer e.g. "203.186.94.62"

  3. java RMIAdmin.RMIAdminClient_ConnectionMonitor -p port_no
    Specify the "Port Number" of remote RMIServer e.g. "1099"

  4. java RMIAdmin.RMIAdminClient_ConnectionMonitor -a "action"
    Specify the "Action" to be executed, e.g. test the remote connection, restart remote RMI service


Usage examples
java RMIAdmin.RMIAdminClient_ConnectionMonitor -i ip_address -p port_no -a "action"
  1. Test the connection status of remote server
    [Windows]
    java RMIAdmin.RMIAdminClient_ConnectionMonitor -i 203.186.94.62 -p 1099 -a connect
    0
    [Linux]
    java RMIAdmin.RMIAdminClient_ConnectionMonitor -i 203.186.94.61 -p 1099 -a connect

  2. Restart the RMI service of remote server
    [Windows]
    java RMIAdmin.RMIAdminClient_ConnectionMonitor -i 203.186.94.62 -p 1099 -a restart


    [Linux]
    java RMIAdmin.RMIAdminClient_ConnectionMonitor -i 203.186.94.61 -p 1099 -a restart


Usage Tips
  1. Note that the command entered is non-case sensitive for Windows, but case sensitive for all unix-like system.

  2. If the command entered contain double quotes, the \ symbol should be included for the double quotes to be passed in properly.
    [Windows Example]
    java RMIAdmin.RMIAdminClient_CommandLine -i 203.186.94.62 -p 1099 -s cmd.exe -c "dir \"c:\program files\""

  3. Cross-platform execution is supported, therefore you can perform use command mode on a Linux Machine to invoke instructions on remote Windows Machine, and vice versa.

  4. To run this command successfully, you must include the path (including filename) where you placed the RMIAdmin program (RMIAdmin.jar) in the system classpath.
    [Windows Example]
    set CLASSPATH=%CLASSPATH%;fullpath_of_RMIAdmin.jar
    e.g. set CLASSPATH=%CLASSPATH%;c:\RMIAdmin\RMIAdmin.jar
    * Assume RMIAdmin.jar is installed in C:\RMIAdmin

    [Linux Example]
    CLASSPATH=$CLASSPATH:fullpath_of_RMIAdmin.jar
    e.g. CLASSPATH=$CLASSPATH:/RMIAdmin/RMIAdmin.jar
    * Assume RMIAdmin.jar is installed in /RMIAdmin

  5. Other than setting the system classpath, you may also use the java -cp parameter to specify the CLASSPATH at runtime.
    [Windows Example]
    java -cp fullpath_of_RMIAdmin.jar
    e.g. java -cp C:\RMIAdmin\RMIAdmin.jar RMIAdmin.RMIClient_ConnectionMonitor -i ......
    * Assume RMIAdmin.jar is installed in C:\RMIAdmin

    [Linux Example]
    java -cp fullpath_of_RMIAdmin.jar
    e.g. java -cp /RMIAdmin/RMIAdmin.jar RMIAdmin.RMIClient_ConnectionMonitor -i ......
    * Assume RMIAdmin.jar is installed in /RMIAdmin


Related Topics:





Copyright 2005 © RMIAdmin. All rights reserved.