<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RSH: Find &amp;amp; Kill the Process by automation in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930791#M105114</link>
    <description>Its hard to kill a process everytime by its PID since it is not a constant value. You may need to write a script such a way that, it should grep by process name and get PID, then kill it.&lt;BR /&gt;&lt;BR /&gt;May be this link can help you, &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838620" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838620&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
    <pubDate>Sun, 02 Oct 2005 23:53:03 GMT</pubDate>
    <dc:creator>Arunvijai_4</dc:creator>
    <dc:date>2005-10-02T23:53:03Z</dc:date>
    <item>
      <title>RSH: Find &amp; Kill the Process by automation</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930789#M105112</link>
      <description>Here the thing I'm doing by manually once my automation has failed :&lt;BR /&gt;&lt;BR /&gt;Process identify-&amp;gt; C:\&amp;gt;rsh &lt;HOST_NAME&gt; ps -ef | grep agent&lt;BR /&gt;&lt;BR /&gt;Output -&amp;gt; SYSTEM  2576  2180  0 10:52:40 CONIN$  0:00 C:\tmp\exec\MGR107\mgragent.exe&lt;BR /&gt;&lt;BR /&gt;Killing Process-&amp;gt; C:\&amp;gt;rsh &lt;HOST_NAME&gt; kill -9 2576&lt;BR /&gt;&lt;BR /&gt;I'm doing this manual process before starting the new automation run.&lt;BR /&gt;&lt;BR /&gt;I would like to automate this process like find the process id and then kill it. Can someone help me on this?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mugil&lt;BR /&gt;&lt;/HOST_NAME&gt;&lt;/HOST_NAME&gt;</description>
      <pubDate>Sun, 02 Oct 2005 23:33:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930789#M105112</guid>
      <dc:creator>Mugilvannan</dc:creator>
      <dc:date>2005-10-02T23:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: RSH: Find &amp; Kill the Process by automation</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930790#M105113</link>
      <description>grep is not a good idea.&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep -i mugil&lt;BR /&gt;&lt;BR /&gt;will give you as follows. (assuming that there are process mugil mugilevyx, mugilggh, hjmugillp)&lt;BR /&gt;&lt;BR /&gt;You can do it as follows.&lt;BR /&gt;&lt;BR /&gt;rsh "host" 'UNIX95= ps -C"process_name" -p pid=|xargs kill'&lt;BR /&gt;&lt;BR /&gt;Make sure that you are killing a right apps/process that you want to kill.</description>
      <pubDate>Sun, 02 Oct 2005 23:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930790#M105113</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-02T23:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: RSH: Find &amp; Kill the Process by automation</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930791#M105114</link>
      <description>Its hard to kill a process everytime by its PID since it is not a constant value. You may need to write a script such a way that, it should grep by process name and get PID, then kill it.&lt;BR /&gt;&lt;BR /&gt;May be this link can help you, &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838620" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838620&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Sun, 02 Oct 2005 23:53:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930791#M105114</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-10-02T23:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: RSH: Find &amp; Kill the Process by automation</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930792#M105115</link>
      <description>Thank you both of U. But still I'm getting,&lt;BR /&gt;&lt;BR /&gt;C:\&amp;gt;rsh &lt;HOSTNAME&gt; 'UNIX95= ps -C emagent -p pid=|xargs kill'&lt;BR /&gt;&lt;BR /&gt;Winsock RSHD/NT: Error 2 executing 'UNIX95= ps -C emagent -p pid='&lt;BR /&gt;The system cannot find the file specified.&lt;BR /&gt;&lt;BR /&gt;I forget to mention that I'm want to kill the process on Windows host.&lt;BR /&gt;&lt;BR /&gt;And I tried this too,&lt;BR /&gt;&lt;BR /&gt;C:\&amp;gt;rsh &lt;HOST_NAME&gt; ps -ef | grep agent |  awk '{ print $2 ; }&lt;BR /&gt;' | xargs kill -9&lt;BR /&gt;kill: 780: no such process&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;C:\&amp;gt;rsh &lt;HOST_NAME&gt; ps -ef | grep agent | grep -v grep | awk '{ print $2 ; }&lt;BR /&gt;' | xargs kill -9&lt;BR /&gt;kill: 780: no such process&lt;BR /&gt;&lt;BR /&gt;Am I missing any more?&lt;/HOST_NAME&gt;&lt;/HOST_NAME&gt;&lt;/HOSTNAME&gt;</description>
      <pubDate>Mon, 03 Oct 2005 00:24:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930792#M105115</guid>
      <dc:creator>Mugilvannan</dc:creator>
      <dc:date>2005-10-03T00:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: RSH: Find &amp; Kill the Process by automation</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930793#M105116</link>
      <description>I'm closing this thread since we found a way like this:&lt;BR /&gt;&lt;BR /&gt;1) create a .sh file in remote machine containing ps -u ps -ef | grep -v 'grep'&lt;BR /&gt; | grep agent | awk '{ print $2; }' | xargs kill -9&lt;BR /&gt;&lt;BR /&gt;2) create a .bat file in same host which is calling the above .sh file&lt;BR /&gt;&lt;BR /&gt;3) run rsh command calling the .bat file&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mugil</description>
      <pubDate>Mon, 03 Oct 2005 04:10:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsh-find-amp-kill-the-process-by-automation/m-p/4930793#M105116</guid>
      <dc:creator>Mugilvannan</dc:creator>
      <dc:date>2005-10-03T04:10:05Z</dc:date>
    </item>
  </channel>
</rss>

