----- Forwarded by Raymond Higgs/Poughkeepsie/IBM on 07/12/2007 12:27 PM -----
Raymond Higgs/Poughkeepsie/IBM 07/12/2007 12:26 PM To [email protected] cc Subject Re: Wrapper around SSH to run command on mutliple Linuxes? Linux on 390 Port <[email protected]> wrote on 07/12/2007 11:55:26 AM: > On Jul 12, 2007, at 10:44 AM, Michael MacIsaac wrote: > > > Hello list, > > > > Does anyone have a simple wrapper around SSH to run the same > > command on > > multiple Linuxes? > > > Well, it's pretty much just a for loop: > > for $i in $hosts; do > ssh $i $cmd > done > > Except that you *do* have to be careful about quoting your arguments, > and about making sure your cwd is the same on all hosts (and what to > do if it doesn't exist, and about making sure that your shell > environment is the same...at least if you want it to be a general- > purpose tool. > > Adam > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 When I worked on clustering, we used dsh that came with IBM's CSM stuff: http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.csm.doc/csm141/am7ad110142.html You can probably find an open source version somewhere. It might be easier than reinventing the wheel. Ray Higgs System z FCP Development Bld. 706, B24 2455 South Road Poughkeepsie, NY 12601 (845) 435-8666, T/L 295-8666 [EMAIL PROTECTED] Sorry, I sent a bad link. It should have been: http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/index.jsp?topic=/com.ibm.cluster.csm16010.cmds.doc/am7cm_dsh.html Ray Higgs System z FCP Development Bld. 706, B24 2455 South Road Poughkeepsie, NY 12601 (845) 435-8666, T/L 295-8666 [EMAIL PROTECTED] ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
