[MPICH] how to start up mpd conveniently

Galton, Simon galtons at aecl.ca
Wed Sep 27 07:44:32 CDT 2006


Martin:

Excellent!  That works faster than using lsof -- good one!

Simon 

-----Original Message-----
From: Martin Kleinschmidt [mailto:mk at theochem.uni-duesseldorf.de] 
Sent: September 27, 2006 4:35 AM
To: mpich-discuss at mcs.anl.gov
Cc: Galton, Simon
Subject: Re: [MPICH] how to start up mpd conveniently

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

CONFIDENTIAL AND PRIVILEGED INFORMATION NOTICE

This e-mail, and any attachments, may contain information that
is confidential, subject to copyright, or exempt from disclosure.
Any unauthorized review, disclosure, retransmission, 
dissemination or other use of or reliance on this information 
may be unlawful and is strictly prohibited.  

AVIS D'INFORMATION CONFIDENTIELLE ET PRIVILÉGIÉE

Le présent courriel, et toute pièce jointe, peut contenir de 
l'information qui est confidentielle, régie par les droits 
d'auteur, ou interdite de divulgation. Tout examen, 
divulgation, retransmission, diffusion ou autres utilisations 
non autorisées de l'information ou dépendance non autorisée 
envers celle-ci peut être illégale et est strictement interdite.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20060927/dd349625/attachment.htm>


More information about the mpich-discuss mailing list