21
Data Center Solutions
Command Line Tools: pdsh
pdsh (parallel distributed shell): http://sourceforge.net/projects/pdsh/
Run a task (including fanout) in parallel across many hosts. Here is a crash course:
• Build pdsh
./configure --without-rsh --with-ssh
make
make install
# Put this in your .bash-profile:
export PDSH_RCMD_TYPE=ssh
• Set up SSH keys
# Create SSH key pair & copy to remote host. “No passphrase” is most convenient.
ssh-keygen -t dsa
• Create file “cluster” with list of hosts (1 per line)
# cat ./cluster
192.168.8.150
192.168.8.152
• Use it!
# pdsh -w^cluster df
192.168.8.150: Filesystem 1K-blocks Used Available Use% Mounted on
192.168.8.150: /dev/ram0 2015824 1280376 735448 64% /
192.168.8.150: tmpfs 6145172 0 6145172 0% /dev/shm
192.168.8.152: Filesystem 1K-blocks Used Available Use% Mounted on
192.168.8.152: /dev/mapper/VolGroup00-LogVol00
192.168.8.152: 459081360 11901756 423483428 3% /
192.168.8.152: /dev/sda1 101086 12541 83326 14% /boot
192.168.8.152: tmpfs 6145140 0 6145140 0% /dev/shm
• Decent summary can be found at: http://www.grid5000.fr/mediawiki/index.php/PDSH
http://PowerEdgeC.com
Comments to this Manuals