rsh script to run on cluster
If I have a cluster that is secure from the net and I have rsh running on all of them so I can easily communicate with no overhead, how can I write ONE script that can be run and it will dispatch all machines to start a process? My first thought was just a shell script that rsh'd to all the nodes and ran something but after the script rsh's to the first node the script loses control, any idea? For the sake of argument lets say I want to execute an arbirary script or executable that all the nodes have access to via NFS...
|
doesn't something like this work:
============== for machine in <list-of-machines>;do rsh $machine <script> & done =================== or am i being stupid? regards, billy |
That looks like it should, thanks.
|
Ideally you'd probably want to batch them, so you get a mail with the output from each, and maybe pass script as a parameter?
so instead probably better is ================ #!/bin/bash script=<SCRIPT_NAME> # script name OR script=$1 # passed as parameter for machine in <LIST>;do batch <<EOF /bin/rsh $machine $script EOF done =================== (if batch doesn't work use 'at now' ) then you will get an email for each invocation on each machine easier to catch errors! regards, billy |
All times are GMT -5. The time now is 07:22 PM. |