Could someone please point me towards the syntax for using GNU screen from the command line. On a previous cluster, I managed to create a bash script that would create X number of tiled shells, each ssh-ing into a remote node and running htop. This way I could monitor an entire cluster from one shell. I have lost access to that cluster (and the work on it), but I need to do the same thing again.

I do remember seeing an answered question on StackExchange, SuperUser, or LinuxQuestions which is what I based my previous script on, but I cannot for the life of me find it again, so I am having to ask again.



** Please do not suggest using a screenrc file. That is not the ideal way of achieving what I want.


Try cluster ssh. You can find many tutorial on line e.g this article with a simple command line.

 cssh -l <username> <machinename1> <machinename2> <machinename3>.

Mybe you can find interesting to give a look to this article

Extended synopsis

cssh <-s server[[:'cmds'][,server[:'cmd;cmd2'],server]]... | 
-c config file> [-h] [-d <1-3>] [-n] [-p ] [-a]
             [-l ] [-q] [-b] [-x] [-y] [-e] [-C] [-P] [-S] [-e]

as command you can use htop or whatever else. You can give a look to the cssh man page.

  • Thanks for your input Hastur. However I should have been more specific, as I am SSH-ing into the head-node, I do not think I can use ClusterSSH as (from what I can tell) it only runs in X. – Stuart Buckingham Sep 14 '14 at 21:40
  • It seems that "It requires the Perl libraries Tk (perl-tk on Debian or Ubuntu) and X11::Protocol (libx11-protocol-perl on Debian or Ubuntu), in addition to xterm and OpenSSH." see here. From the man page instead they report need of Perl 5.8.x.( _Cssh requires Net::SSH::Perl to be installed properly in order to work.). If X is installed on the head-node you can always connect with ssh -X head-node. [Ps>You're welcome] – Hastur Sep 14 '14 at 21:53
  • Thanks Hastur. I'm going to steer away from that at the moment. I have the cluster configured with a very stripped down OS at the moment, and would prefer not to bulk it up by running X. – Stuart Buckingham Sep 15 '14 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.