[Beowulf] pdsh question

Ashley Pittman ashley at pittman.co.uk
Tue May 11 13:17:40 PDT 2010


On 11 May 2010, at 19:20, Prentice Bisbal wrote:

> Since so many of you use and recommend pdsh, I have a few questions for
> you:
> 
> 1. Do you build and RPM from the .spec file, which doesn't support
> genders, or do you configure/compile yourself?

I build it myself.  From the top of my head the options I use are --with-ssh --without-rsh.  Last time i built it if both were built the default was to prefer rsh over ssh which should probably be changed at some point.

> 2. If not using genders, what is the syntax of the /etc/machines file? I
> assume it's the same as the gender file, but that's just a hunch.

It's just a flat list of hosts, one per line, although I believe it can take host-specs as well.  e.g compute[0-1023]

> 3. Are there any advantages/disadvantages to using machines over genders?

Genders is much more flexible, machines is easier to configure.

Two more things of note, "dshbak -c" is worth knowing about, pipe the output of pdsh into this and it'll sort the output by hostname and compress hosts with identical output into a single report.

The other really useful aspect of pdsh is the "-R exec" option, instead of running the command on a remote node it runs the command locally but replaces %h with the hostname.  One trivial example is "pdsh -a -R exec grep %h /var/log/messages | dskbak -c" but once you get used to it you can use it for much more advanced commands, earlier on today I ran "pdsh -w [0-25] -R exec tune2fs -O extents /dev/mapper/ost_%h" to re-tune all the devices in a lustre filesystem.

Ashley.

-- 

Ashley Pittman, Bath, UK.

Padb - A parallel job inspection tool for cluster computing
http://padb.pittman.org.uk





More information about the Beowulf mailing list