Login Form






Lost Password?
No account yet? Register

Who's Online

12 guests online
No Users Online

Syndicate

Home
Parallel command execution on all nodes in a cluster PDF Print
Written by Frank Schalude   
Tuesday, 23 March 2010
HACMP/PowerHA offers a nice tool for parallel command execution in the cluster. This command is part of C-SPOC, fully supported, and does not require any setup of ssh or dsh.

The command /usr/es/sbin/cluster/cspoc/cli_on_cluster works with two options:

-P execute the command on all nodes of the cluster in parallel
-S execute the command on all nodes in the cluster sequentially

The command works in the following way:

1. Extract all nodenames from the HACMP ODM classes (no need to give the names as an argument)
2. Use the clcomdES subsystem for remote command execution (it is a DSH which uses the cl_rsh binary as remote command)

A very useful alias to quickly receive information from all nodes or to quickly execute command on all nodes could be:

clush='/usr/es/sbin/cluster/cspoc/cli_on_cluster -P'

The output could be passed to the dshbak for consolidation.

Example:
Direct Output:
226# clush "lspv|grep filevg"
class5a: hdisk2          00c7bd30c87398e3                    filevg          concurrent
class5a: hdisk3          000c5e4140d519b6                    filevg          concurrent
class5a: hdisk5          00c7bd30c8739ba3                    filevg          concurrent
class5b: hdisk2          00c7bd30c87398e3                    filevg          concurrent
class5b: hdisk3          000c5e4140d519b6                    filevg          concurrent
class5b: hdisk5          00c7bd30c8739ba3                    filevg          concurrent

Output through dshbak:

 clush "lspv|grep filevg"|dshbak
HOST: class5a
-------------
hdisk2          00c7bd30c87398e3                    filevg          concurrent
hdisk3          000c5e4140d519b6                    filevg          concurrent
hdisk5          00c7bd30c8739ba3                    filevg          concurrent

HOST: class5b
-------------
hdisk2          00c7bd30c87398e3                    filevg          concurrent
hdisk3          000c5e4140d519b6                    filevg          concurrent
hdisk5          00c7bd30c8739ba3                    filevg          concurrent

Consolidated output through dshbak (will group same results):

clush "lspv|grep filevg"|dshbak -c
HOSTS -------------------------------------------------------------------------
class5a, class5b
-------------------------------------------------------------------------------
hdisk2          00c7bd30c87398e3                    filevg          concurrent
hdisk3          000c5e4140d519b6                    filevg          concurrent
hdisk5          00c7bd30c8739ba3                    filevg          concurrent


 
< Prev   Next >

Polls

Which AIX do you Use?
 
Copyright © 2008 www.isarlab.de