<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oracle Database Tips blog &#187; kill oracle process using grep</title>
	<atom:link href="http://oracle-database-tips.com/wp/tag/kill-oracle-process-using-grep/feed" rel="self" type="application/rss+xml" />
	<link>http://oracle-database-tips.com/wp</link>
	<description>News for Oracle professionals</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:37:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Kill oracle processes using grep only</title>
		<link>http://oracle-database-tips.com/wp/oracle-scripts/kill-oracle-processes-using-grep-only</link>
		<comments>http://oracle-database-tips.com/wp/oracle-scripts/kill-oracle-processes-using-grep-only#comments</comments>
		<pubDate>Fri, 23 Oct 2009 11:48:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle Scripts]]></category>
		<category><![CDATA[kill oracle process using grep]]></category>
		<category><![CDATA[management agent]]></category>
		<category><![CDATA[nohup]]></category>
		<category><![CDATA[oms]]></category>
		<category><![CDATA[oracle listener]]></category>
		<category><![CDATA[oracle management]]></category>
		<category><![CDATA[oracle product]]></category>
		<category><![CDATA[pl]]></category>
		<category><![CDATA[sid]]></category>
		<category><![CDATA[sids]]></category>

		<guid isPermaLink="false">http://oracle-database-tips.com/wp/?p=102</guid>
		<description><![CDATA[Use grep to kill a range of similar oracle processes]]></description>
			<content:encoded><![CDATA[<p>If you have ever sighed at needing to kill a number of Oracle processes related to one aspect of Oracle<br />
(listener,instance, agent, oms) then you will enjoy using this little script as much as I do now that I&#8217;ve found it.<br />
Be very careful with it, if you get the &#8216;requirement&#8217; wrong, you could end up killing the wrong processes.</p>
<p>For example, if you want to kill all processes associated with one particular SID, but have multiple SIDs running on your server,<br />
don&#8217;t grep for &#8216;oracle&#8217; as the list that is returned is for ALL oracle processes on the server.</p>
<p>In this example, I need to kill all processed associated with the Oracle management agent (emagent) on a server.</p>
<p>I do not need to worry about being careful as I only have one agent home on the server and can not accidentally kill irrelevant ones.<br />
<!-- ccccccccccccccccccccccccccccccccccccccccccccccccc   --></p>
<pre class="medium">$ps -ef | grep emagent

oracle     395 14244  0 15:10 pts/1    00:00:00
 grep emagent
oracle    3905     1  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/perl/bin/perl
/home/oracle/product/agent10g/bin/emwd.pl
agent /home/oracle/product/agent10g/sysman/log/emagent.nohup
oracle    3922  3905  0 13:45 pts/1    00:00:08
/home/oracle/product/agent10g/bin/emagent
oracle    3928  3922  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    3929  3928  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    3930  3928  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    3931  3928  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    3932  3928  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4019  3928  0 13:45 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4233  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4235  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4236  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4237  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4238  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4239  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4240  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle    4241  3928  0 13:46 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent
oracle   14736  3928  0 14:41 pts/1    00:00:00
/home/oracle/product/agent10g/bin/emagent

$ps -ef | grep emagent| awk '{print $2}' | xargs kill -9
$
$ps -ef | grep emagent
oracle   27931 14244  0 15:26 pts/1    00:00:00 grep emagent</pre>
]]></content:encoded>
			<wfw:commentRss>http://oracle-database-tips.com/wp/oracle-scripts/kill-oracle-processes-using-grep-only/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

