cexec.1 (2012 03)
c
cexec(1) cexec(1)
NAME
cexec - Issues comands to the specified hosts in parallel. In a Serviceguard cluster, defaults to issuing
commands cluster-wide. When not in a Serviceguard cluster, defaults to issuing commands on the local
host. Command execution reports can be created, and saved reports can be used to replay commands.
cexec is part of the Distributed Systems Administration Utilities (DSAU).
SYNOPSIS
Path: /opt/dsau/bin/cexec
cexec [options] command
cexec {-h|--help | -?}
cexec --retry={all|fail|success} report_file
cexec {-V|--version}
DESCRIPTION
cexec runs commands on multiple systems in parallel on either distributed systems or in a Serviceguard
cluster. Runs the command cluster-wide by default in a Serviceguard cluster, subject to user authoriza-
tion. cexec also enables users to view reports of previously run commands, and to retry commands that
did not execute either because a node was unreachable or because the command returned an error status
on the remote system.
In a Serviceguard cluster, the user must have the MONITOR role or have root privileges in order for
cexec to get the list of cluster members. For non-root users without the MONITOR role, DSAU main-
tains a cluster-membership list based on member addition and deletion events during the life of the clus-
ter. cexec and related tools (ccp, ckill, cps) use this list. The list is maintained at:
/var/opt/dsau/sg/nodelist.
Remote Command Transport Options
The user selects how
cexec runs commands on remote hosts at runtime using the -R option. The proto-
cols listed below are supported, the default is ssh.
• rsh
Uses an internal, thread-safe implementation of BSD
rcmd(3) to run commands using the
standard f3rsh(1) protocol.
• ssh
Uses a variant of
popen(3) to run multiple copies of the ssh(1) command. ssh(1) is the
default command transport.
Standard cexec
Options
-a
cexec reads the /etc/machines file to obtain the list of nodes. This option has no arguments.
Note that /etc/machines is not shipped by default and can be created on a per-host basis. The
format for the /etc/machines file is the same as that for the --hostsfile described below.
-f | --hostsfile filename
Runs the command on all hosts listed in the specified file. The file must contain a list of target
hosts, one hostname per line. Hostlist expressions are valid; see HOSTLIST EXPRESSIONS
below.
-n | -w | --nodes host1[,host2,...]
Target the specified list of hosts. In a Serviceguard cluster, the target host list is not required
and the default is all cluster members. The host list may contain hostlist expressions of the
form "host[1-5,7]" For more information about the hostlist format, see the HOSTLIST
EXPRESSIONS section below. This option overrides all other host specification options.
-x | --exclude host1[,host2,...]
Exclude the specified hosts.
Other
Options
-fanout number
Sets the maximum number of simultaneous remote commands to number. The default is 32.
HP-UX 11i Version 3: March 2012 − 1 − Hewlett-Packard Company 1