2008-03-14 20:54:31 +00:00
|
|
|
=head1 Name
|
|
|
|
|
|
|
|
psh - parallel remote shell
|
|
|
|
|
|
|
|
=head1 B<Synopsis>
|
|
|
|
|
2012-06-08 11:55:39 +00:00
|
|
|
B<psh> [B<-i> I<interface>] [B<-f> I<fanout>] [B<-l> I<user>] I<noderange> I<command>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
B<psh> {B<-h>|B<--help>|B<-v>|B<--version>}
|
|
|
|
|
|
|
|
=head1 B<Description>
|
|
|
|
|
|
|
|
B<psh> is a utility used to run a command across a list of nodes in parallel.
|
|
|
|
|
|
|
|
B<ssh> must be set up to allow no prompting for B<psh> to work.
|
|
|
|
|
2012-12-27 06:02:07 +00:00
|
|
|
Note:
|
|
|
|
|
|
|
|
This command does not run through xcatd like most xCAT commands do.
|
2008-03-18 14:37:55 +00:00
|
|
|
This means you must either run it on the management node, or have a network connection between
|
2013-06-27 16:39:30 +00:00
|
|
|
your machine and the nodes. It does not support hierarchy, use xdsh to run remote command from the
|
|
|
|
management node to the compute node via a service node.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2012-12-27 06:02:07 +00:00
|
|
|
B<psh> arguments need to precede noderange, otherwise, you will get unexpected errors.
|
|
|
|
|
2008-03-14 20:54:31 +00:00
|
|
|
=head1 B<Options>
|
|
|
|
|
|
|
|
=over 7
|
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
=item B<-i> I<interface>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
The NIC on the node that psh should communicate with. For example, if I<interface> is B<eth1>,
|
|
|
|
then psh will concatenate B<-eth1> to the end of every node name before ssh'ing to it. This
|
|
|
|
assumes those host names have been set up to resolve to the IP address of each of the eth1 NICs.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2012-06-08 11:55:39 +00:00
|
|
|
=item B<-f> I<fanout>
|
|
|
|
|
|
|
|
Specifies a fanout value for the maximum number of concur-
|
|
|
|
rently executing remote shell processes.
|
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
=item B<-l> I<user>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
Log into the nodes as the specified username. The default is to use the same username as you
|
|
|
|
are running the psh command as.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
=item B<noderange>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
See L<noderange(3)|noderange.3>.
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
=item B<command>
|
|
|
|
|
|
|
|
Command to be run in parallel. If no command is give then B<psh>
|
|
|
|
enters interactive mode. In interactive mode a ">" prompt is
|
|
|
|
displayed. Any command entered is executed in parallel to the
|
|
|
|
nodes in the noderange. Use "exit" or "Ctrl-D" to end the interactive session.
|
|
|
|
|
|
|
|
=item B<-h>|B<--help>
|
|
|
|
|
|
|
|
Print help.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
2012-06-08 11:55:39 +00:00
|
|
|
=head1 B<Environment> B<Variables>
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<XCATPSHFANOUT>
|
|
|
|
|
|
|
|
Specifies the fanout value. This variable is overridden by
|
|
|
|
the B<-f> flag. Default is 64.
|
|
|
|
|
|
|
|
=back
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
=head1 B<Examples>
|
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
=over 3
|
|
|
|
|
|
|
|
=item *
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
Run uptime on 3 nodes:
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-13 16:07:46 +00:00
|
|
|
B<psh> I<node4-node6> I<uptime>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
2008-08-13 16:07:46 +00:00
|
|
|
node4: Sun Aug 5 17:42:06 MDT 2001
|
|
|
|
node5: Sun Aug 5 17:42:06 MDT 2001
|
|
|
|
node6: Sun Aug 5 17:42:06 MDT 2001
|
2008-03-18 14:37:55 +00:00
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
Run a command on some BladeCenter management modules:
|
|
|
|
|
|
|
|
B<psh> I<amm1-amm5> I<'info -T mm[1]'>
|
|
|
|
|
|
|
|
=item *
|
|
|
|
|
|
|
|
Remove the tmp files on the nodes in the 1st frame:
|
|
|
|
|
|
|
|
B<psh> I<rack01> I<'rm -f /tmp/*'>
|
2008-03-14 20:54:31 +00:00
|
|
|
|
|
|
|
Notice the use of '' to forward shell expansion. This is not necessary
|
|
|
|
in interactive mode.
|
|
|
|
|
2008-03-18 14:37:55 +00:00
|
|
|
=back
|
|
|
|
|
2008-03-14 20:54:31 +00:00
|
|
|
=head1 B<See> B<Also>
|
|
|
|
|
2008-03-17 13:34:40 +00:00
|
|
|
L<noderange(3)|noderange.3>, L<pscp(1)|pscp.1>, L<pping(1)|pping.1>, L<prsync(1)|prsync.1>
|