Questions tagged [pdsh]
10 questions
5
votes
2 answers
Parallel execution of sh script in multiple servers
I am trying to execute action in multiple servers in my loop but I would like to launch my actions in the first server and go directly to the second one without waiting for the first one to complite .
HOSTS="host1 host2"
For hostname in ${HOST}…
Issam
- 103
- 1
- 5
4
votes
1 answer
How can I issue parallel commands to remote nodes with different arguments?
I need to execute an application in parallel on multiple Ubuntu servers while supplying different arguments for different servers. I tried to google it, but could not get to the possible solution. I even experimented with ssh/pdsh/parallel, but…
Sachin
- 41
- 2
3
votes
1 answer
pdsh and command exit code
I would like to use pdsh to assert that a command successfully run on multiple nodes, if the command fails on any nodes the exit code (from pdsh) should be non-zero.
Consider the following examples:
$ pdsh -w host1,host2 "exit 0"; echo $?
host1:…
yellowhat
- 133
- 4
3
votes
1 answer
bash set env variable is not working in pdsh
I am using PDSH to control multiple servers through one command line.
The command below works fine on individual servers, but when I enter the export command within PDSH, echoing it back is empty.
Any ideas on why this is, or how to fix it?
Specific…
d-_-b
- 1,167
- 5
- 18
- 27
2
votes
2 answers
Host key verification failed (exit code 255) while using pdcp
I am trying to install a particular software across all our machines one by one so I decided to use pdsh. By default, it will operate on several machines at once in parallel, but I will be using the -f option to limit it to running on each machine…
user1950349
- 771
- 2
- 9
- 16
2
votes
1 answer
SED and PDSH: adding a line to a file on a slave node in a cluster
I am trying to add a new line containing GATEWAY=10.0.10.1 to the /etc/sysconfig/network file on each of 32 slave nodes in a cluster.
I read this post on how to insert a line with sed.
This works for me to add a line to a local file:
sed -i.bak -e…
Pip
- 43
- 4
1
vote
4 answers
pdsh input from file possible?
I can pipe data from one command to another, example:
$ echo test | cat
test
Unsure of what to call the operation I can get a similar effect using:
$ cat < <(echo test)
test
Where <(echo test) is a bashism for creating a file on the fly. Using…
azzid
- 938
- 2
- 9
- 24
0
votes
1 answer
Detect a pdsh session
On our cluster we use LMOD to load specific pre-installed modules dynamically (like PyTorch or some other scientific packages). On top of that I want to run some code with the DeepSpeed framework which allows for optimisations to run distributed…
Bram Vanroy
- 183
- 1
- 11
0
votes
1 answer
PDSH Script Output File
I run this pdsh script :
#!/bin/bash
ServersListFile=/etc/pdsh/root_audit
Result=/etc/pdsh/SudoRoot.csv
/opt/techunix/bin/pdsh.sh -f $ServersListFile -c "hostname" >> $Result
i get on the output only this:
Command to execute :…
Med
- 125
- 1
- 2
- 13
0
votes
1 answer
Command works locally but failed on remote
I don't understand why my command fails when I use it remotely with ssh or pdsh :
Locally it works:
line=` last -F | grep -vE '^(svc_qual|s594998a|reboot|s823850a|s825722a|s559857a|s603256a|root|s823656a|s230281a|s638181a|s835786a)' | head -1…
Med
- 125
- 1
- 2
- 13