Sponsored Content
Homework and Emergencies Homework & Coursework Questions Parallel execution on multiple servers in UNIX Post 302971798 by sneha1887 on Tuesday 26th of April 2016 01:23:29 AM
Old 04-26-2016
Parallel execution on multiple servers in UNIX

I have a requirement (in a shell script) to connect to several servers at once and execute a series of commands.

I am aware that ssh can be used for sequential execution. But since most of the commands that I need to execute take a long time, I have to go for the parallel option.

Is there a way to run commands simultaneously without using any command line tools such as pssh, cluster ssh etc?

Can someone please help?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parallel Execution

Hello, I wish to run parallel process forked from one script. Currently I doing is submit them in background. For example: --------------------------------------------------------------- #!/usr/bin/ksh process1 & process2 & process3 & ..... ..... #here I check for completion of... (4 Replies)
Discussion started by: RishiPahuja
4 Replies

2. Shell Programming and Scripting

Plink connections to multiple unix servers

Hi, I have a simple windows batch file which connects to a UNIX server and runs a shell script in my home directory on the server. It works perfectly, using plink + ssh keys in the background. What I plan to do is expand this batch file to connect to multiple servers and execute one script... (2 Replies)
Discussion started by: Moxy
2 Replies

3. High Performance Computing

Parallel Execution on Multiple System

Hi All, I am working on a project where I need to execute set of arguments (around 500) on a Simulator. If I execute this on one linux (RedHat 8.0) machine it will approximately takes 2~3 days. Since I am having more linux machines am thinking of executing these on different machines in... (7 Replies)
Discussion started by: 123an
7 Replies

4. HP-UX

Automatic execution of commands in multiple servers using single script.

Hi, I've to do a simple job many times whenever it has been asked, just i've to log in to all of fourtien HP servers and i've to execute ps -fu user > temp cat temp|sendmail "xyz@z.com" commands to send the statics of all of 14 servers over the mail to particular user id.. Though logging... (4 Replies)
Discussion started by: vickramshetty
4 Replies

5. Programming

Parallel Execution of Programs

Since there've been a few requests for a method to execute commands on multiple CPUs (logical or physical), with various levels of shell-, make-, or Perl-based solutions, ranging from well-done to well-meant, and mostly specific to a certain problem, I've started to write a C-based solution... (4 Replies)
Discussion started by: pludi
4 Replies

6. UNIX for Advanced & Expert Users

grep for a line in a file on multiple unix servers

Hi, I need to grep(look) for a line in filename named /tmp/Test on all 90 unix servers. Without logging to each servers manually and grep'ing for the line, is there a way to pull this info in output file thru' the ksh/sh/bash script. Can someone pl. help to create this script for me? Ex.... (3 Replies)
Discussion started by: Mike1234
3 Replies

7. Shell Programming and Scripting

need a script that does a simple task on multiple unix servers.

hi guys, i need a script that does a simple task on multiple aix servers. if possible with both telnet and ssh. the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... :( can anybody help me with making... (2 Replies)
Discussion started by: curtis911
2 Replies

8. Solaris

Remote execution of a local script on multiple servers

So I have a scriptlet called solaris_command: for i in \ server1 server2 server3 do echo $i ssh $i $1 echo "" done I then use that as a command in multiple scripts to allow for data gathering for all virtual hosts in the environment thusly: solaris_command "cat... (3 Replies)
Discussion started by: os2mac
3 Replies

9. UNIX for Beginners Questions & Answers

Parallel execution of Oracle procedure in UNIX

i have say x number of procedure to run, ie i have one procedure which accepts variable and i need that to run in parallel and capture the error code if in case if it fails through the unix. sqlplus <EOF> exec test_t (abc,124); </EOF> sqlplus <EOF> exec test_t (abc,125); </EOF> sqlplus <EOF>... (2 Replies)
Discussion started by: ATWC
2 Replies

10. Shell Programming and Scripting

Parallel execution of Oracle PROC in UNIX

Hi, Trying to run the Oracle Proc in parallel, but not working.. below code runs each call of the procedure and its coming out of the loop before its completion and printing the last statement! not waiting for the sqlplus to complete. for name in `cat abc.txt` do (sqlplus -s ... (3 Replies)
Discussion started by: ATWC
3 Replies
oarsh(1)							   OAR commands 							  oarsh(1)

NAME
oarsh - remote shell connector for OAR batch scheduler. oarcp - oarsh compagnon to copy files from a node or to a node. SYNOPSIS
oarsh [OPTIONS] <NODENAME> [COMMAND] oarcp [OPTIONS] [NODENAME:]<PATHNAME> [NODENAME:]<PATHNAME> DESCRIPTION
Connect a node from the submission frontal of the cluster or any node. OPTIONS
oarsh uses OpenSSH client (the ssh command) underneath to perform the connection. Thus any OpenSSH option can be used. ENVIRONMENT
OAR_JOB_ID From the frontal of the cluster or any node, specify the Id of the job oarsh must connect to. OAR_JOB_KEY_FILE Specify a job key oarsh must use, e.g. the one that was used for the submission of the job you want to connect to. This is mandatory when connecting to a node of a job from a host that does not belong to the nodes managed by the OAR server the job was submitted to. The -i option may be used as well. CONFIGURATION
In order to provide the user with the ability to use oarsh to connect both the nodes of his job or other hosts that live out of the scope of his job, oarsh tries to read two configuration files: first ~/.oarsh-host-include then ~/.oarsh-hosts-exclude. If exist, those files must contain one regular expression matching a hostname per line. At execution time, if oarsh finds in ~/.oarsh-host-include a match for the hostname used in the command line, it continues with the execution of oarsh, skipping ~/.oarsh-hosts-exclude file. If not, it tries to find a match in ~/.oarsh-hosts-exclude and if one is found, then executes ssh with the same command line. Finally, it no match is found (or for instance, if none of those files exists), it continues with the execution of oarsh. For instance, if all nodes look like name-XXX.domain, one may place ^[^.]+-[[:digit:]]+ in ~/.oarsh-host-include and .* in ~/.oarsh-hosts-exclude and then can use oarsh to connect any host. The feature finally becomes really sexy when one considers placing a symlink to oarsh named ssh, and then can always use the ssh command to connect any host. EXAMPLES
Connecting from within our job, from one node to another one (node23): > oarsh node-23 Connecting to a node (node23) of our job (Id: 4242) from the frontal of the cluster: > OAR_JOB_ID=4242 oarsh node-23 Connecting to a node (node23) of our job that was submitted using a job key: > OAR_JOB_KEY_FILE=~/my_key oarsh node-23 Same thing but using OpenSSH-like -i option: > oarsh -i ~/my_key node-23 NOTES
All OpenSSH features should be inherited by oarsh, for instance X11 forwarding. However, one feature that oarsh does break is the SSH Agent. None of OpenSSH user configuration files (within ~/.ssh directory) are used by oarsh. SEE ALSO
oarsub(1), oardel(1) oarstat(1), oarnodes(1), oarhold(1), oarresume(1) COPYRIGHTS
Copyright 2008 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU Library General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. oarsh 2012-05-23 oarsh(1)
All times are GMT -4. The time now is 12:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy