Difference between revisions of "Useful Commands"

From NEClusterWiki
Jump to navigation Jump to search
Line 3: Line 3:
 
*  The following command uses ''gstat'' to get a list of nodes by load.  It then sorts the list by load/free CPUs and connects you to the node with the most free CPUs.  The format below is an alias that you can put in your ''.bashrc'' file if you want it to be automatically applied to your environment.
 
*  The following command uses ''gstat'' to get a list of nodes by load.  It then sorts the list by load/free CPUs and connects you to the node with the most free CPUs.  The format below is an alias that you can put in your ''.bashrc'' file if you want it to be automatically applied to your environment.
 
<source lang="bash">
 
<source lang="bash">
alias fss='ssh `/opt/ganglia/bin/gstat -p8651 -1a -i necluster | grep node | sort -gr -k 2 | sort -k 7 | head -n1 | cut -f1 -d" "`'
+
alias fss='ssh `/opt/ganglia/bin/gstat -p8651 -1a -i necluster | grep node | sort -gr -k 2 | sort -k 7 | head -n1 | cut -f1 -d" "`'
</source>
+
</source> <br>
  
 
* Get cluster load information from Ganglia in a terminal:
 
* Get cluster load information from Ganglia in a terminal:
 
<source lang="bash">
 
<source lang="bash">
/opt/ganglia/bin/gstat -p8649 -1a -i necluster
+
/opt/ganglia/bin/gstat -p8649 -1a -i necluster
 
</source>
 
</source>
  

Revision as of 19:42, 28 March 2012

Useful Commands

  • The following command uses gstat to get a list of nodes by load. It then sorts the list by load/free CPUs and connects you to the node with the most free CPUs. The format below is an alias that you can put in your .bashrc file if you want it to be automatically applied to your environment.
 alias fss='ssh `/opt/ganglia/bin/gstat -p8651 -1a -i necluster | grep node | sort -gr -k 2 | sort -k 7 | head -n1 | cut -f1 -d" "`'


  • Get cluster load information from Ganglia in a terminal:
 /opt/ganglia/bin/gstat -p8649 -1a -i necluster

Other tips