array(1) array(1)
array - execute an array command
array [options...] command [args...]
The array command is used to execute the array command specifed by
"command args..." on one or more machines in an array and display the
resulting output on stdout. An array command is not necessarily the same
thing as a UNIX command. It is passed to arrayd(1M), the array services
daemon, which is responsible for translating it to an actual UNIX command
and executing it on the machines that make up the array. Several array
commands are available by default; these are described below.
array takes several options. The first token on the command line that
does not constitute a valid option is assumed to mark the beginning of
the array command. None of the remaining tokens will be examined by
array, other than to pass them along as arguments to the array command
itself.
The valid options include:
-a arrayname or -array arrayname
Specifies the name of the array to which this command should be
directed. If not specified, the array services daemon's default
destination will be used.
-D or -direct
When used with -s, indicates that the request should be sent
directly to the specified server, rather than forwarded to that
server by the local array services daemon. This will fail on
systems that use array services authentication unless the -Kl and
-Kr options are also specified. -D is the default behavior under
normal circumstances (but see the description of the ARRAYD_FORWARD
variable, below).
-F or -forward
When used with -s, indicates that the request should be forwarded to
the specified server via the local array services daemon, rather
than sent directly to it. -F will become the default behavior if
the value of the ARRAYD_FORWARD environment variable begins with the
letter "Y" (as in "yes"; it may be in either upper or lower case).
-g or -global
Global command: indicates that the array command should be run in a
new global array session, that is, a new array session that has been
assigned a fresh global array session handle.
-Kl key or -localkey key
Use key for the local authentication key when communicating directly
with a remote array services daemon. key is an unsigned 64-bit
Page 1
array(1) array(1)
value. The default local key is obtained from the environment
variable ARRAYD_LOCALKEY; if that does not exist, no key is used.
The actual role played by key depends on the authentication method
used by array services in a particular configuration. In general,
it is not used when communicating with an array services daemon on
the local machine.
-Kr key or -remotekey key
Use key for the remote authentication key when communicating
directly with a remote array services daemon. key is an unsigned
64-bit value. The default remote key is obtained from the
environment variable ARRAYD_REMOTEKEY; if that does not exist, no
key is used. The actual role played by key depends on the
authentication method used by array services in a particular
configuration. In general, it is not used when communicating with
an array services daemon on the local machine.
-l or -local
Local request: indicates that the request should not be propagated
to other machines. This could be useful for testing a new array
command.
-p port or -port port
Specifies the port address of the array services daemon. Defaults
to the value of the "ARRAYD_PORT" environment variable if present,
or the standard port number of the "sgi-arrayd" service otherwise.
-q or -quiet
Quiet: discard the output of the array command rather than sending
it to stdout.
-s server or -server server
Specifies the hostname or IP address of the array services daemon.
Defaults to the value of the "ARRAYD" environment variable if
present, or "localhost" otherwise.
-t value or -timeout value
Specifies the timeout value (in seconds) used for waiting on a
single array services request. Most commands involve one array
services daemon requesting services from another array services
daemon, so it will typically take two times this many seconds before
the array command itself will timeout. The default is 15 seconds
(so most array commands will timeout if no response is received in
30 seconds).
-v Verbose messages: display additional progress messages. Repeated
occurrences (either "-v -v ..." or "-vv...") increases the
verbosity, although this is generally only useful for debugging
arrayd itself.
Page 2
array(1) array(1)
USING A REMOTE ARRAY SERVICES DAEMON
Ordinarily, the array command uses the array services daemon running on
the local machine for processing requests. However, there are some
circumstances where it is useful to contact an array services daemon on
another machine instead, such as when a smaller machine, perhaps running
IRIX 5.3 and therefore not capable of running an array services daemon,
is used as a console interface for an array. There are two ways to
accomplish this. If it is necessary to use a remote array services
daemon only infrequently, the -s server option can be specified on the
command line to indicate the hostname of the server that should be
contacted. However, if the remote daemon will be used frequently or
exclusively (such as in the case where the local machine is being used as
a console interface to an array, and not as a member of the array itself)
then an easier approach is to set the environment variable ARRAYD to the
hostname of the remote server. If the -s option is not specified, then
the array command will use the value of that variable (if it is set)
rather than trying to contact an array services daemon on the local
machine.
DEFAULT ARRAY COMMANDS
The default array services configuration includes several simple array
commands:
array kill ASH
Sends a SIGTERM signal to all of the processes in the array that
belong to the array session specified by the handle ASH. By
default, SIGTERM will kill most processes, though shell programs are
often a notable exception.
array ps
Shows the array session handle, machine name, process ID, owner, run
time and command line for every process in the array that has a
non-zero array session handle.
array resume ASH
Resumes all processes in the array that belong to the array session
specified by the handle ASH by sending them the SIGCONT signal.
Presumably this array session had been suspended earlier with array
suspend.
array signal sig ASH
Sends signal sig to all processes in the array that belong to the
array session specified by the handle ASH. This is simply a more
general version of the kill/suspend/resume commands.
array suspend ASH
Suspends all processes in the array that belong to the array session
specified by the handle ASH by sending them the SIGTSTP signal.
array uptime
Equivalent to running the uptime(1) command on each machine in the
array.
Page 3
array(1) array(1)
array who
Shows the login name, current machine, origin machine and current
command for every logged-in user of the array.
Note that the available array commands are controlled by the system
administrator, so some or all of these commands may not be present.
Other array commands may also be available. Consult your system
adminstrator for more information.
The array services daemon (arrayd(1M)) must be running on all machines
that are to execute an array command. It does not necessarily have to be
running on the machine that executes array if an alternate server was
specified in some way.
arrayd(1M), arrayd.conf(4).
PPPPaaaaggggeeee 4444 [ Back ]
|