<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Rocks%3A_SGE_Commands</id>
	<title>Rocks: SGE Commands - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?action=history&amp;feed=atom&amp;title=Rocks%3A_SGE_Commands"/>
	<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Rocks:_SGE_Commands&amp;action=history"/>
	<updated>2026-05-04T16:09:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Rocks:_SGE_Commands&amp;diff=2500&amp;oldid=prev</id>
		<title>Michael: Created page with &quot;===== Using qstat ===== &lt;syntaxhighlight&gt; qstat -f                                # what jobs are running qstat -f -q \*@compute-0-0              # full display info [for compute-0-0 onl...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.define-technology.com/mediawiki-1.35.0/index.php?title=Rocks:_SGE_Commands&amp;diff=2500&amp;oldid=prev"/>
		<updated>2013-05-13T10:03:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;===== Using qstat ===== &amp;lt;syntaxhighlight&amp;gt; qstat -f                                # what jobs are running qstat -f -q \*@compute-0-0              # full display info [for compute-0-0 onl...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===== Using qstat =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qstat -f                                # what jobs are running&lt;br /&gt;
qstat -f -q \*@compute-0-0              # full display info [for compute-0-0 only&lt;br /&gt;
qstat -f -g c                           # display cluster queue summary&lt;br /&gt;
qstat -s r -q all.q@compute-0-0         # show all running jobs on compute-0-0&lt;br /&gt;
qstat -u viglen                         #show jobs being run by user; eg viglen; note jobid&lt;br /&gt;
qstat -j &amp;lt;jobid&amp;gt;                        #print all information with regards to jobid; numerical number&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Control jobs using qdel and qmod =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qdel &amp;lt;job_id&amp;gt;                           #delete job job_id&lt;br /&gt;
qdel -f &amp;lt;job_id&amp;gt;                        #delete job job_id; register job status change at sge_master without contacting sge_execd&lt;br /&gt;
qdel -u viglen                          #delete all jobs being run by user viglen&lt;br /&gt;
qdel 12 -u viglen                       #delete job with jobid 12 being run user viglen&lt;br /&gt;
qdel -u &amp;quot;*&amp;quot;                             #delete all jobs being run by all users: USE WITH LOTS OF CAUTION&lt;br /&gt;
qmod -sj &amp;lt;job_id&amp;gt;                       #suspend a running job&lt;br /&gt;
qmod -rj &amp;lt;job_id&amp;gt;                       #resume/reschedule the job&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Using qconf =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qconf -sel                              # show the nodes configured on sge&lt;br /&gt;
qconf -qpl                              # show parallel environments configured&lt;br /&gt;
qconf -sp mpi|mpich|orte                # show the parallel env configuration (pre/post scripts etc)&lt;br /&gt;
&lt;br /&gt;
qconf -sq all.q@compute-0-0.local       # show the queue configuration per node&lt;br /&gt;
qconf -sq all.q                         # show &amp;quot;all.q&amp;quot; queue info&lt;br /&gt;
qconf -mq all.q                         #  modify &amp;quot;all.q&amp;quot; queue: update hostlist, #slots&lt;br /&gt;
qconf -aq all.q                         # create queue named &amp;quot;all.q&amp;quot;&lt;br /&gt;
&lt;br /&gt;
qhost -h compute-0-0,compute-0-1        # show host info for multiple nodes&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Add headnode to queue =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
# on headndoe&lt;br /&gt;
cd /opt/gridengine&lt;br /&gt;
./install_execd -auto&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Submit to a specific host =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qsub -q &amp;#039;*@compute-0-0&amp;#039; script.sh&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Queue Configuration Changes =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qconf -mhgrp @allhosts     # edit the lists of hosts in SGE&lt;br /&gt;
qconf -mq all.q            # modify a queue, then you can remove nodes from the slots&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Disable/Enable a node on the queue =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qconf -rattr queue slots 0 all.q@compute-0-0  # slots -&amp;gt; 0 (== pbsnodes -o)&lt;br /&gt;
qconf -rattr queue slots 8 all.q@compute-0-0  # slots -&amp;gt; 8 (== pbsnodes -a)&lt;br /&gt;
&lt;br /&gt;
qmod -d all.q@compute-0-0                     # enable compute-0-0 in queue all.q (-d == disable)&lt;br /&gt;
qmod -e all.q@compute-0-0                     # enable compute-0-0 in queue all.q (-d == disable)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Check sgeexecd on nodes =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
qping -info compute-0-0 537 execd 1          # check status of execd on compute-0-0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Submission flags =====&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
#$ -N &amp;lt;name-of-job&amp;gt;     # Give your job a name; useful when using -o and -e options below in file-naming&lt;br /&gt;
#$ -cwd                 # Use the Current Working Directory&lt;br /&gt;
#$ -o &amp;lt;file-name.out&amp;gt;   # Pipe standard output to file-name.out&lt;br /&gt;
#$ -e &amp;lt;file-name.err&amp;gt;   # Pipe standard error ti file-name.err&lt;br /&gt;
##$ -j y                # Join standard output and input&lt;br /&gt;
#$ -S /bin/bash         # Interpreting Shell used is BASH&lt;br /&gt;
#$ -V                   # Export all environment variables within the qsub utility to the context of the job&lt;br /&gt;
#$ -pe orte 32          # 32 cores, using the openmpi PE&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Got $NSLOTS processors.&amp;quot;&lt;br /&gt;
echo &amp;quot;Machines:&amp;quot; &lt;br /&gt;
cat $PE_HOSTFILE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Michael</name></author>
	</entry>
</feed>