<div dir="ltr"><div>Hi Cedar,</div><div><br></div><div>There is no direct command I know of. However, there are several simple workarounds.</div><div><br></div><div>1. You can certainly qsub - however you do not know which node will run the command unless you specify it using modifiers, so this is probably not what you need.</div>
<div>2. You can use sshmaster and sshnode from your PC to run the command. you can write a simple batch script in either windows or Linux environment to run through the nodes and execute this command for each node. I tried this in the past.</div>
<div>3. You can write a bash script that you can put on the master and that loops doing ssh node with the command you want - you can use &amp; to run this command on each node in parallel to save time. I have not tried this - yet it seems easy enough.</div>
<div>4. You can write a starcluster plugin that will run the command automatically for you for each node. Note, however, that there are already many plugins ready and there might be a plugin that does what you want. For example, there is a plugin that will pip install a python library for you on certain nodes or NFS mount for you. I am using these two plugins.</div>
<div><br></div><div>I agree that a starcluster command such as sshall starcluster that submits a shell command to all nodes in parallel would be helpful. However, I do not know of such functionality.</div><div><br></div><div>
I hope you find those workarounds helpful.</div><div><div tabindex="0" id=":rq"><img src="https://mail.google.com/mail/images/cleardot.gif"></div></div><span><font color="#888888"><div><br></div><div>               Jacob</div>
</font></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 3, 2014 at 5:56 PM, Cedar McKay <span dir="ltr">&lt;<a href="mailto:cmckay@uw.edu" target="_blank">cmckay@uw.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the easiest way to run terminal commands on each and every node? I can qsub a command as many times as I have hosts, but (perhaps if nodes are busy) nodeX could run the command multiple times, and nodeY not at all.<br>

<br>
<br>
Our local cluster has something that works like this:<br>
<br>
$ rocks run host compute &quot;COMMAND&quot;<br>
<br>
That runs COMMAND on every &quot;compute&quot; host.<br>
<br>
I&#39;m sort of surprised this functionality isn&#39;t totally standard (or is it?) on all clusters. I have gotten tmux going, but it seems both over-complicated, and a bit fragile. Plus, will it scale to a 100 node cluster? Any tips?<br>

<br>
best,<br>
Cedar<br>
<br>
<br>
<br>
_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
</blockquote></div><br></div>