[MPICH] how to start up mpd conveniently

Martin Kleinschmidt mk at theochem.uni-duesseldorf.de
Wed Sep 27 03:34:31 CDT 2006


Hi Simon,

On Di, 26 Sep 2006, Galton, Simon wrote:

>I worked out a process to allow nodes to join an existing ring in our
>Linux cluster with dual-cpu cluster nodes:

thanks, helps a lot!


>#!/bin/sh
>headnode=node1
>echo -n $"Joining mpd ring hosted by $headnode: "
>port=`ssh $headnode lsof | grep python2 | grep TCP | grep \* | cut -d: -f2 |
>cut -d' ' -f1`

this pipe brought up more than 1 line:

[root at node2 root]# rsh node1 /usr/sbin/lsof | grep python2 | grep TCP | grep \*
python2.3   857      mk    4u  IPv4   12933799                  TCP *:60191 (LISTEN)
python2.3   857      mk    6u  IPv4   12933815                  TCP *:60194 (LISTEN)
python2.3   857      mk   13u  IPv4   12933823                  TCP *:60199 (LISTEN)
python2.3  1176      mk    4u  IPv4   12936272                  TCP *:60314 (LISTEN)
python2.3  1176      mk    6u  IPv4   12936288                  TCP *:60317 (LISTEN)
python2.3  1176      mk   13u  IPv4   12936296                  TCP *:60322 (LISTEN)
python2.3  1183      mk    4u  IPv4   12936419                  TCP *:60328 (LISTEN)
python2.3  1183      mk    6u  IPv4   12936435                  TCP *:60331 (LISTEN)
python2.3  1183      mk   13u  IPv4   12936443                  TCP *:60336 (LISTEN)
python2.3  1188      mk    3u  IPv4   12936469                  TCP *:60341 (LISTEN)
python2.3  1191      mk    4u  IPv4   12936548                  TCP *:60342 (LISTEN)
python2.3  1191      mk    6u  IPv4   12936564                  TCP *:60345 (LISTEN)
python2.3  1191      mk   13u  IPv4   12936572                  TCP *:60350 (LISTEN)
python2.3 32230    root    4u  IPv4   12925107                  TCP *:60149 (LISTEN)

of which I only need the last. Of course one could add "grep root" to
the pipe, but I found that one could also use mpdtrace -l :

port=`rsh $headnode mpdtrace -l | grep "$headnode"_ | awk '{print $1}' | sed 's/'$headnode'_//'`


   ...martin




More information about the mpich-discuss mailing list