EXPORT(1)

NAME
export - export command using customs

SYNOPSIS
export [-same] [-uselocal] [-exclusive] [-force] [-attr value ...] [command [args ... ]]
export -id connection-fd return-fd id

DESCRIPTION

Export is used to export a single command to a remote host via the customs(8) system. it recreates the local execution environment (including user id, group memberships, nice level, resource limits, environment, and current directory) on the `most available' remote host in the customs network, and executes the command. Standard input and output (including error output) of the remote job are routed to export's standard I/O. The following signals are caught and forwarded to the remote process: SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGTSTP, SIGCONT, SIGWINCH (SIGWINDOW), SIGXCPU, SIGUSR1, SIGUSR2. SIGTTIN and SIGTTOU suspend the export process locally and cause the remote process to wait on I/O. Export terminates when the remote job terminates (returning its exit status), or if killed by SIGKILL. The later should be avoided if possible since it relinquishes control of the remote job (which may then have to be killed by logging into the remote machine).

If no command is specified the user's command shell (from the SHELL environment variable) is invoked to read commands from standard input.

The -same option will allow exportation only to host with the same customs architecture code as the local host.

The -uselocal option will only export the command if the local host does not match customs availability criteria (except for idle time and load) or the requested attributes (see below).

The flag -exclusive restricts exportation to hosts that do not have any other jobs imported (although they may otherwise be considered available). Also, for the duration of the job, no other imports will be allowed on the machine chosen. This option is meant to override multiple availability (as typically provided by multi-processor machines) in special circumstances, but is otherwise considered anti-social.

To select a host with specific attributes for exportation any number of -attr flags with associated value may be specified, all of which must then be satisfied for exportation to succeed. The value is an atomic string denoting the presence of a named characteristic, possibly preceeded by ``!'' to denote negation, i.e., absence of an attribute. The special attribute ``OR'' can be given to separate disjuncts, thus allowing any Boolean combination of attributes to be specified in disjunctive normal form. For example,

export -attr sun4 -attr !diskless -attr OR -attr sun4m

selects hosts that have the ``sun4,'' but not the ``diskless'' attribute, or have the ``sun4m'' attribute.

If no suitable host for exportation can be found, the command is executed locally, unless one or more -attr attributes have been specified and the local host cannot satisfy these.

The -force option asks customs to disable the availability check in searching for a host, effectively forcing exportation to any of the hosts matching the user-specified criteria. Don't abused this feature: it is meant to be used in combination with suitable -attr options to provide a convenient alternative to rsh(1) and on(1).

Non-standard clients of the customs system may set up job exportation themselves using the customs RPC library, and then call export to just handle the input/output, signal and exit status forwarding. In that case the -id option is used to specify the file descriptors for standard I/O and exit status return already set up, as well as the job ID returned by the customs daemon.

NOTE
Like pmake(1), export is intended only for creation of short-lived remote jobs, typically compilations, text formatter runs and the like. This is important because jobs once exported can only be removed from the remote machine by termination, and it is the overall goal of the customs system to make remote machines available if, and only if, they are idle. To prevent abuse of the system and run-away jobs, remote execution occurs such that processes that stay on the machine for longer that 2 minutes after the machine stops being idle are evicted by a sequence of signals (see customs(8) for details).

SEE ALSO
customs(8), cctrl(8), importquota(8), pmake(1), logd(8), rsh(1), on(1).

BUGS
Jobs run with -force are still subject to eviction.
Specification of attribute combinations by repeated -attr flags is a kludge which should be replaced by more standard Boolean expression syntax.

AUTHOR
Adam de Boor, adam@bsw.uu.net (...!uunet!bsw!adam).
Bugfixes and enhancements by Andreas Stolcke (stolcke@icsi.berkeley.edu).