kexec(1)

PROGRAM
kexec - Executes a process on a remote host

SYNTAX

kexec

-c  command to be executed

-m  machine to execute on

[-V]
    Gives the version for kexec

[-U]
    Gives the usage for kexec

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called kexec.ans or file1

[-a [file1]]
    Uses kexec.ans or file1 as the answer file

DESCRIPTION
kexec executes a process on a remote host. The command, which should be in quotes, is taken as the process to be exec'ed on the remote host. If the remote daemon (phantomd) is not running, kexec will attempt to start a remote daemon before executing the desired command. If a daemon could not be started then the program will print out an appropriate error message and exit with a status of 1.

REQUIRED ARGUMENTS

-c  type: string
    desc: command to be executed

OPTIONAL ARGUMENTS

-m  type: string
    desc: machine to execute the command on.

EXAMPLES
The following example shows how to do a remote "ls" command.

    % kexec -c "ls -l" -m poopsie.eece.unm.edu

The remote machine can also be specified in the command instead of using the -m command.

    % kexec -c "ls@poopsie -l"

Both the command specified machine and -m option can be used in order to execute a command thru a gateway. Therefore, if you want to execute the command "ls" on "poopsie" via the machine "gateway" then use:

    % kexec -c "ls@poopsie -l" -m gateway
                     - or -
    % kexec -c "ls@poopsie@gateway -l"

SEE ALSO
intro(1), phantom(1), phantomd(1), kcp(1), verror(3), vgparms(3), vutils(3)

RESTRICTIONS
The one major restriction to be aware of is that the remote status is not returned. Therefore if the job fails an exit status of 0 is returned anyway.

If the remote daemon is not present then kexec will execute a local shell script (phantom) to do the actual work of contacting the remote host for starting the remote daemon (phantomd). Currently there is no way to indicate the remote user account for which we wish to start the daemon on.

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.