I have tried to run the following parallel command (and variations of it) 
calling a script and I was hoping to run a 4 items in true parallel, but my 
results are decidedly serial.  For example purposes, I have made the following 
test script and made sure the script runs for approximately 5+ seconds each for 
easier resolution

${testDir}/script/test.sh
#!/bin/bash
hostname;date;sleep 5;date;crontab -l

PARALLEL CMD:
#!/bin/bash
export testDir=/my/test/dir
parallel --no-run-if-empty --will-cite --onall --keep-order --joblog 
${testDir}/jobLog.txt --results ${testDir}/resultsDir  --jobs 0 "ssh -qt {} 
${testDir}/script/test.sh" ::: LNXVP51 LNXVP52 LNXVP62 LNXVP63

RESULTS:

LNXVP51
Fri Aug 18 15:09:11 EDT 2023
Fri Aug 18 15:09:16 EDT 2023
50 2 * * 0 /home/user/script/svcCtrl.sh stop
LNXVP52
Fri Aug 18 15:09:19 EDT 2023
Fri Aug 18 15:09:25 EDT 2023
50 2 * * 0 /home/user/script/svcCtrl.sh stop
LNXVP62
Fri Aug 18 15:09:29 EDT 2023
Fri Aug 18 15:09:34 EDT 2023
50 2 * * 0 /home/user/script/svcCtrl.sh stop
LNXVP63
Fri Aug 18 15:09:35 EDT 2023
Fri Aug 18 15:09:40 EDT 2023
50 2 * * 0 /home/user/script/svcCtrl.sh stop

I was expecting all 4 nodes to show approximately the same results like the 
following, give or take 1-2 seconds depending on system load
<HOSTNAME>
Fri Aug 18 15:09:11 EDT 2023
Fri Aug 18 15:09:16 EDT 2023
50 2 * * 0 /home/user/script/svcCtrl.sh stop

I tried the parallel CMD with:
--jobs 0                               (supposedly uses max # of processes, I 
would think 4 is safe)
--jobs 4                               (the exact # of nodes)
<Nothing>                          (omitted --jobs argument

But every time I run this, it serially goes through one node at a time.

Am I missing something?


The information contained in this message is proprietary and/or confidential. 
If you are not the intended recipient, please: (i) delete the message and all 
copies; (ii) do not disclose, distribute or use the message in any manner; and 
(iii) notify the sender immediately. In addition, please be aware that any 
message addressed to our domain is subject to archiving and review by persons 
other than the intended recipient. Thank you.

Reply via email to