<?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: KIll Process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803110#M82391</link>
    <description>This works for me:&lt;BR /&gt;kill -9 $(ps -ef | grep &lt;PROCESS name=""&gt; | grep -v grep | awk '{print $2}')&lt;BR /&gt;&lt;BR /&gt;Ray&lt;/PROCESS&gt;</description>
    <pubDate>Tue, 10 Sep 2002 14:28:13 GMT</pubDate>
    <dc:creator>Ray Brewer</dc:creator>
    <dc:date>2002-09-10T14:28:13Z</dc:date>
    <item>
      <title>KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803105#M82386</link>
      <description>Hi guys.&lt;BR /&gt;I know that someone out there will know an easy way to cure my problem.&lt;BR /&gt;i need to kill a specific process ate shutdown level2 i am trying to use &lt;BR /&gt;"ps -ef | grep (process name) | cut ( to select pid) | kill -9"&lt;BR /&gt;to remove said process although there may be an easier way.&lt;BR /&gt;can anyone help and tell me the best command string to use to select the process and kill it, i am going to put this script at run level 2.&lt;BR /&gt;regards&lt;BR /&gt;andy</description>
      <pubDate>Tue, 10 Sep 2002 09:50:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803105#M82386</guid>
      <dc:creator>Dave Elliott</dc:creator>
      <dc:date>2002-09-10T09:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803106#M82387</link>
      <description>Andy,&lt;BR /&gt;&lt;BR /&gt;Here's a good thread about process killing:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc8d7a135f587d5118ff00090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc8d7a135f587d5118ff00090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 10 Sep 2002 09:55:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803106#M82387</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-09-10T09:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803107#M82388</link>
      <description>&lt;BR /&gt;Using ps then cut is a normal way to do it, only one thing to remember, use grep -v grep in the command or else you may end up only killing your grep (process name) pid, not the real pid you wanted to kill !&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Sep 2002 09:56:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803107#M82388</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-09-10T09:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803108#M82389</link>
      <description>I script my startup to save the PID to a file. Then I can&lt;BR /&gt;kill the process with a simple&lt;BR /&gt;command:&lt;BR /&gt;&lt;BR /&gt;kill -KILL $(cat process.pid)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I use the following function which is cleaner.&lt;BR /&gt;&lt;BR /&gt;kill_job () {&lt;BR /&gt;    pid=`cat ${pid_file}`&lt;BR /&gt;    if [ -f ${pid_file} ];     then&lt;BR /&gt;        if ps -p ${pid} &amp;gt; /dev/null; then&lt;BR /&gt;            kill -KILL ${pid}&lt;BR /&gt;        fi&lt;BR /&gt;        rm -f ${pid_file}&lt;BR /&gt;    fi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The pidfile is create with&lt;BR /&gt;&lt;BR /&gt;    echo $! &amp;gt; ${pid_file}&lt;BR /&gt;&lt;BR /&gt;executed immediately after the  command is run.&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Sep 2002 12:27:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803108#M82389</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2002-09-10T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803109#M82390</link>
      <description>Is this process started at boot time and set up using the rcXX.d files, rc.config.d?  If so, you will probably want to stop the process "cleanly" using:&lt;BR /&gt;&lt;BR /&gt;/sbin/init.d/processName stop&lt;BR /&gt;&lt;BR /&gt;Command and use a process number linked to a KILL script in rc2.d&lt;BR /&gt;&lt;BR /&gt;Unless you know exactly what this script does.&lt;BR /&gt;&lt;BR /&gt;Without knowing the details, using the kill -9 described above might leave some things floating around your system.</description>
      <pubDate>Tue, 10 Sep 2002 13:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803109#M82390</guid>
      <dc:creator>Allan Pincus</dc:creator>
      <dc:date>2002-09-10T13:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803110#M82391</link>
      <description>This works for me:&lt;BR /&gt;kill -9 $(ps -ef | grep &lt;PROCESS name=""&gt; | grep -v grep | awk '{print $2}')&lt;BR /&gt;&lt;BR /&gt;Ray&lt;/PROCESS&gt;</description>
      <pubDate>Tue, 10 Sep 2002 14:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803110#M82391</guid>
      <dc:creator>Ray Brewer</dc:creator>
      <dc:date>2002-09-10T14:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803111#M82392</link>
      <description>I would caution against using -9. This automatically terminates the process without any cleanup. This means buffers don't get flushed. Shared memory segments don't get released, etc.&lt;BR /&gt;&lt;BR /&gt;I would use, in the following order:&lt;BR /&gt;&lt;BR /&gt;-15 (terminate)&lt;BR /&gt;-1  (hangup)&lt;BR /&gt;-3 (quit)&lt;BR /&gt;and as a last resort -9 (kill)&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Marty</description>
      <pubDate>Tue, 10 Sep 2002 14:52:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803111#M82392</guid>
      <dc:creator>Martin Johnson</dc:creator>
      <dc:date>2002-09-10T14:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: KIll Process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803112#M82393</link>
      <description>Sorry about the "kill -9" in my previous reply. This should be substituted for the appropriate level you require.</description>
      <pubDate>Tue, 10 Sep 2002 18:00:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/kill-process/m-p/2803112#M82393</guid>
      <dc:creator>Ray Brewer</dc:creator>
      <dc:date>2002-09-10T18:00:17Z</dc:date>
    </item>
  </channel>
</rss>

