Quantcast
Channel: Running multiple shell scripts in parallel and in background - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Running multiple shell scripts in parallel and in background

$
0
0

I have some YCSB Data load scripts which runs in background

data_load.sh:

nohup ycsb load couchbase2 -s -P workloada -p couchbase.bucket=poc -threads 30 .. > load1_output.txt &

nohup ycsb load couchbase2 -s -P workloada -p couchbase.bucket=poc -threads 30 .. > load2_output.txt &

nohup ycsb load couchbase2 -s -P workloada -p couchbase.bucket=poc -threads 30 .. > load3_output.txt &

And Some YCSB Run Scripts too which looks like this:

Read_test.sh:

nohup ycsb run couchbase2 -s -P workloadc -p couchbase.bucket=poc -threads 30 .. > read1_output.txt &

nohup ycsb run couchbase2 -s -P workloadc -p couchbase.bucket=poc -threads 30 .. > read2_output.txt &

nohup ycsb run couchbase2 -s -P workloadc -p couchbase.bucket=poc -threads 30 .. > read3_output.txt &

If I run them individually, they would run in background and in parallel.

But how to automate this or write a script which will call both this scripts one after another and will wait for 1st one to finish before going to the next script ?

Thanks in Advance.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>