Using the RexecJ Client

After RexecJ has been set up according to the instructions in the setup section, the provided RexecJ client can be invoked with the rexecjc executable, located in the bin subdirectory of the RexecJ installation. Users interested in setting up an RexecJ server should first consult the RexecJ server section of the documentation.

At the minimum, the RexecJ client requires the hostname of an RexecJ server and the command to execute on the RexecJ server. For example,

rexecjc -host localhost -cmd test

will execute the command "test" on the RexecJ server running on the host localhost (the local machine). When greater control for executing commands is necessary, refer to the following list of rexecjc options:

  • -host <hostname>
    • This required option is used to set the hostname of the RexecJ server to connect to to the value of the <hostname> argument.
  • -port <port>
    • This option is used to specify the port that the RexecJ client should connect to, given as the argument <port>. If this option is not specified, the RexecJ client will default to port 8230.
  • -user <username>
    • If the RexecJ server that the RexecJ client is connecting to requires user authentication, the username to connect as should be specified with the <username> argument. Otherwise, this option should not be specified.
  • -pass <password>
    • If the RexecJ server that the RexecJ client is connecting to requires user authentication, the password for the previously specified username (set with the -host option) should be set with the <password> argument. Note that if the -host option has been specified then the -pass option must be present as well. Otherwise, this option should not be specified.
  • -cmd <command>
    • This required option is used to specify the name of the command to execute on the given RexecJ server (specified by the -host option). The name of the command is taken from the <command> argument. If this option is not specified, then it is expected that one of the options -list or -stop is specified instead.
  • -group <group>
    • This option is used to specify the group name that a given command (specified previously by the -cmd option) should execute under on the given RexecJ server. This option is not required.
  • -args <args>
    • This option is used to specify the arguments that a given command (specified previously by the -cmd option) should be aware of during execution. The <args> list can contain one or more arguments. Note that if an argument starting with the command line switch "-" is to be provided, it must be escaped by a backslash character (e.g., "\-example"). This option is not required.
  • -cmdlist
    • If this option is specified, a listing of all commands understood by the RexecJ server that this RexecJ client connects to will be displayed.
  • -list
    • If this option is specified, a listing of all commands running on the RexecJ server that this RexecJ client connects to will be displayed.
  • -stop <pid>
    • This option will halt execution of the command running on the RexecJ server that this RexecJ client connects to. The process ID (PID) of the command is specified by the <pid> argument. A PID is a string of the form group_number, where group is a group name and number is an integer.

For rexecjc usage examples, consult the examples section of this documentation.

Valid XHTML 1.0! Valid CSS!