Compiling and Using PDSH


What is PDSH?

Pdsh is a multithreaded remote shell client which executes commands on multiple remote hosts in parallel. Pdsh can use several different remote shell services, including standard “rsh”, Kerberos IV, and ssh. For more information, do look at https://github.com/chaos/pdsh

Compilating PDSH

% ./configure CC=/usr/local/intel/2019u5/bin/icc --enable-static-modules --without-rsh --with-ssh --without-ssh-connect-timeout-option --prefix=/usr/local/pdsh-2.33
% make
% make install

Specifying a list of hosts

% pdsh -w ^/home/user1/pdsh/hosts uptime

* pdsh take the hostnames from the listed after -w ^ which is /home/users/tmp/hosts

node1: 16:52:59 up 527 days, 3:36, 0 users, load average: 39.46, 38.98, 37.59
node2: 16:53:00 up 30 days, 6:53, 0 users, load average: 44.54, 42.87, 42.20
node3: 16:53:00 up 105 days, 6:40, 0 users, load average: 0.00, 0.01, 0.05
node4: 16:53:00 up 147 days, 9 min, 0 users, load average: 116.68, 111.40, 106.65
node5: 16:53:00 up 548 days, 6:05, 0 users, load average: 32.01, 32.02, 32.05
node6: 16:53:00 up 413 days, 5:19, 0 users, load average: 21.68, 20.74, 20.43
node7: 16:53:00 up 548 days, 6:04, 0 users, load average: 32.00, 32.01, 32.05
node8: 16:53:00 up 23 days, 6:08, 0 users, load average: 32.06, 32.05, 32.05
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.