<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Managing_interactive_jobs_on_cluster</id>
	<title>Managing interactive jobs on cluster - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?action=history&amp;feed=atom&amp;title=Managing_interactive_jobs_on_cluster"/>
	<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Managing_interactive_jobs_on_cluster&amp;action=history"/>
	<updated>2026-05-13T18:47:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Managing_interactive_jobs_on_cluster&amp;diff=1598&amp;oldid=prev</id>
		<title>Nn320: Created page with &quot;When using cluster it is important to know how to manage interactive jobs. We may want to know what all jobs are running, what all jobs a particular user is running and how to...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php?title=Managing_interactive_jobs_on_cluster&amp;diff=1598&amp;oldid=prev"/>
		<updated>2020-05-18T11:20:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;When using cluster it is important to know how to manage interactive jobs. We may want to know what all jobs are running, what all jobs a particular user is running and how to...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;When using cluster it is important to know how to manage interactive jobs. We may want to know what all jobs are running, what all jobs a particular user is running and how to kill a particular job. The following bash commands are useful for this purpose: top, ps and kill.&lt;br /&gt;
&lt;br /&gt;
===top===&lt;br /&gt;
&amp;lt;b&amp;gt;top &amp;lt;/b&amp;gt; command is used to list the processes running on the system in real time. To exit from the top window press &amp;lt;b&amp;gt;q&amp;lt;/b&amp;gt; . top command has several useful options.&lt;br /&gt;
* &amp;lt;b&amp;gt;top -u CRSid &amp;lt;/b&amp;gt; is used to list the jobs of a particular user.&lt;br /&gt;
* &amp;lt;b&amp;gt; top -n 1 -b &amp;gt; output &amp;lt;/b&amp;gt; can be used to save the top window to a file.&lt;br /&gt;
In top window itself&lt;br /&gt;
* pressing &amp;lt;b&amp;gt;z &amp;lt;/b&amp;gt; highlights the running process.&lt;br /&gt;
* pressing &amp;lt;b&amp;gt;c &amp;lt;/b&amp;gt; shows absolute path of all running processes.&lt;br /&gt;
* pressing &amp;lt;b&amp;gt;k &amp;lt;/b&amp;gt; displays a line in top window where the process id (pid) of the process that needs to be killed can be directly entered and when asked about confirmation simply press &amp;lt;b&amp;gt;y &amp;lt;/b&amp;gt; to kill the process.&lt;br /&gt;
* pressing &amp;lt;b&amp;gt;Shift+o &amp;lt;/b&amp;gt; opens a new window with several options along with the corresponding letter that needs to be pressed to sort the top window based on a particular column. For example to sort all processes depending on memory usage i.e. %MEM press &amp;lt;b&amp;gt; shift+o, n &amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt; Enter &amp;lt;/b&amp;gt;.&lt;br /&gt;
There is a lot more that can be done using top and more information can be found on its man page.&lt;br /&gt;
&lt;br /&gt;
===ps===&lt;br /&gt;
ps stands for process status. One of its use can be to view the jobs of a particular user.&lt;br /&gt;
&amp;lt;pre&amp;gt; ps aux | egrep CRSid &amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; ps aux &amp;lt;/b&amp;gt; displays all processes along with usernames and &amp;lt;b&amp;gt; egrep CRSid &amp;lt;/b&amp;gt; can be used to extract processes belonging to a particular user.&lt;br /&gt;
===kill===&lt;br /&gt;
kill can be used to kill a process. When running an interactive job, its execution can be stopped by pressing &amp;lt;b&amp;gt;Ctrl+z&amp;lt;/b&amp;gt; and then kill command can be used.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 kill signal pid &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt; kill -9 pid &amp;lt;/b&amp;gt;can be used to kill the process immediately. The option -9 stands for SIGKILL. More information about different types of signals can be found here https://en.wikipedia.org/wiki/Signal_(IPC)#List_of_signals&lt;/div&gt;</summary>
		<author><name>Nn320</name></author>
	</entry>
</feed>