<?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 commands needed in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048806#M750752</link>
    <description>hi, All,&lt;BR /&gt;&lt;BR /&gt;appreciate if someone could provide the below command.&lt;BR /&gt;&lt;BR /&gt;* grep a process id then kill the process, all command in one line. eg : &lt;BR /&gt;when i want to kill some processes with command oralcePROD , i have to : ps -ef |grep oraclePROD, from here i kill -9 PID, is there any command/script which i can run to kill all the oraclePROD process ?&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 23 May 2007 23:29:55 GMT</pubDate>
    <dc:creator>ng_7</dc:creator>
    <dc:date>2007-05-23T23:29:55Z</dc:date>
    <item>
      <title>commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048806#M750752</link>
      <description>hi, All,&lt;BR /&gt;&lt;BR /&gt;appreciate if someone could provide the below command.&lt;BR /&gt;&lt;BR /&gt;* grep a process id then kill the process, all command in one line. eg : &lt;BR /&gt;when i want to kill some processes with command oralcePROD , i have to : ps -ef |grep oraclePROD, from here i kill -9 PID, is there any command/script which i can run to kill all the oraclePROD process ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 May 2007 23:29:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048806#M750752</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-23T23:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048807#M750753</link>
      <description>I'm not sure you ever want to do a kill -9 on Oracle if you can help it.&lt;BR /&gt;&lt;BR /&gt;You could do the following:&lt;BR /&gt;# kill -9 $( UNIX95= ps -C oralcePROD -opid= )&lt;BR /&gt;&lt;BR /&gt;(Make sure you test it with an "echo" before the kill.)</description>
      <pubDate>Thu, 24 May 2007 00:38:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048807#M750753</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-24T00:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048808#M750754</link>
      <description>hi, Dennis,&lt;BR /&gt;&lt;BR /&gt;i got error message on the command, pls advise.&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 24 May 2007 02:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048808#M750754</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-24T02:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048809#M750755</link>
      <description>Hi ng&lt;BR /&gt;&lt;BR /&gt;you did simply typo:&lt;BR /&gt;&lt;BR /&gt;oralcePROD instead of oraclePROD.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Thu, 24 May 2007 03:00:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048809#M750755</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2007-05-24T03:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048810#M750756</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;before trying with 'kill', check, which process get reported by the 'ps' - in your case no output was produced, so kill got no process id(s):&lt;BR /&gt;Execute&lt;BR /&gt;UNIX95= ps -C oralcePROD -opid=&lt;BR /&gt;&lt;BR /&gt;and check for spelling errors.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 24 May 2007 03:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048810#M750756</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-05-24T03:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048811#M750757</link>
      <description>ps -ef | grep oraclePROD |awk -F " " '{print $2}' | kill -9</description>
      <pubDate>Thu, 24 May 2007 03:15:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048811#M750757</guid>
      <dc:creator>Luk Vandenbussche</dc:creator>
      <dc:date>2007-05-24T03:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048812#M750758</link>
      <description>&amp;gt;i got error message on the command,&lt;BR /&gt;&lt;BR /&gt;(It would be more helpful if you just cut n' paste the error rather that attach a bitmap.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;HGH: you did simply typo:&lt;BR /&gt;&lt;BR /&gt;Oops, I cut n' paste the line with the typo.&lt;BR /&gt;&lt;BR /&gt;You could just redirect stderr so you don't get errors if there aren't any oraclePROD but you sure had a lot.  :-)&lt;BR /&gt;# kill -9 $( UNIX95= ps -C oraclePROD -opid= ) 2&amp;gt; /dev/null</description>
      <pubDate>Thu, 24 May 2007 03:21:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048812#M750758</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-24T03:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048813#M750759</link>
      <description>You haven't assigned any points yet.  If our answers were helpful, please see:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Thu, 24 May 2007 03:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048813#M750759</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-24T03:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048814#M750760</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;@Luk:&lt;BR /&gt;Since kill won't read its PIDs from stdin, something like&lt;BR /&gt;... | kill ..&lt;BR /&gt;won't work - you have to use&lt;BR /&gt;... | xargs kill ..&lt;BR /&gt;&lt;BR /&gt;Nevertheless the POSIX part of 'ps' is much more reliable, IMHO.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 24 May 2007 03:47:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048814#M750760</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-05-24T03:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048815#M750761</link>
      <description>hi, thanks for you guy response, but i still have some problem on this, please refer to my attachment on my problem. thanks</description>
      <pubDate>Thu, 24 May 2007 05:25:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048815#M750761</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-24T05:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048816#M750762</link>
      <description>Hi ng,&lt;BR /&gt;&lt;BR /&gt;$ ps -ef |grep sam |awk -F "" '{print $2}'|kill â  9&lt;BR /&gt;&lt;BR /&gt;Can not work because kill does NOT read from stdin!&lt;BR /&gt;&lt;BR /&gt;you have to "xargs" the kill command this way:&lt;BR /&gt;&lt;BR /&gt;$ ps -ef |grep sam |awk -F "" '{print $2}'|xargs kill â  9&lt;BR /&gt;&lt;BR /&gt;see xargs(1)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Thu, 24 May 2007 05:33:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048816#M750762</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2007-05-24T05:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048817#M750763</link>
      <description>As Peter said, you can't do: ... | kill -9&lt;BR /&gt;&lt;BR /&gt;And if you want to see what the ps does, do the following to see why it doesn't kill all:&lt;BR /&gt;$ UNIX95= ps -C sam -opid=&lt;BR /&gt;&lt;BR /&gt;From your hard to read bitmap, I see you have a samx (14569) and a shell script running /usr/sbin/sam (14564).&lt;BR /&gt;&lt;BR /&gt;So you can replace sam by samx to get 14569.  But you don't want to kill ALL sh's on the system.</description>
      <pubDate>Thu, 24 May 2007 05:34:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048817#M750763</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-24T05:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048818#M750764</link>
      <description>for i in `ps -ef | grep oraclePROD |awk -F " " '{print $2}'`&lt;BR /&gt;do&lt;BR /&gt;kill -9 $i&lt;BR /&gt;done</description>
      <pubDate>Thu, 24 May 2007 06:33:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048818#M750764</guid>
      <dc:creator>Vladimir Fabecic</dc:creator>
      <dc:date>2007-05-24T06:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048819#M750765</link>
      <description>hi, all, my knowleadge fail me again, pls refer to attached file for my problem.&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Thu, 24 May 2007 20:50:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048819#M750765</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-24T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048820#M750766</link>
      <description>&amp;gt;pls refer to attached file for my problem.&lt;BR /&gt;&lt;BR /&gt;I can't see why that ps command is failing.&lt;BR /&gt;What does this show?&lt;BR /&gt;# UNIX95= ps -C oraclePROD&lt;BR /&gt;&lt;BR /&gt;(I can't see your bitmaps accurately enough to tell what your other problems are.  Can't you copy just text?&lt;BR /&gt;You seem to be echoing $UNIX95 in test.sh instead of echoing $(UNIX95= ps -C oraclePROD)&lt;BR /&gt;&lt;BR /&gt;Note your ps -ef | grep oraclePROD, will find the grep and may kill it.  You need to grep -v grep:&lt;BR /&gt;# kill -9 $(ps -ef | grep oraclePROD | grep -v grep | awk '{print $2}')</description>
      <pubDate>Thu, 24 May 2007 22:56:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048820#M750766</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-24T22:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048821#M750767</link>
      <description>Hi ng&lt;BR /&gt;&lt;BR /&gt;The last line in your second bitmap, the one giving "&amp;gt;" :&lt;BR /&gt;&lt;BR /&gt;you are just missing the closing ' before |xargs&lt;BR /&gt;&lt;BR /&gt;Again please give the output of&lt;BR /&gt;# UNIX95= ps -C oraclePROD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Fri, 25 May 2007 02:14:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048821#M750767</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2007-05-25T02:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048822#M750768</link>
      <description>&lt;BR /&gt;output for UNIX95= ps -C oraclePROD is : &lt;BR /&gt;&lt;BR /&gt;tamcodb1:/# echo $(UNIX95= ps -C oraclePROD)&lt;BR /&gt;PID TTY TIME CMD</description>
      <pubDate>Fri, 25 May 2007 04:22:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048822#M750768</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-25T04:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048823#M750769</link>
      <description>&amp;gt;output for UNIX95= ps -C oraclePROD is:&lt;BR /&gt;# echo $(UNIX95= ps -C oraclePROD)&lt;BR /&gt;PID TTY TIME CMD&lt;BR /&gt;&lt;BR /&gt;Ok, this is saying there are no processes with the basename of oraclePROD.  You could try changing it to just "oracle".&lt;BR /&gt;&lt;BR /&gt;This probably occurs because Oracle is fiddling with argv[0] to make it pretty for the users and it no longer matches the real executable.&lt;BR /&gt;&lt;BR /&gt;So it appears you'll need to use your grep solution:&lt;BR /&gt;# kill -9 $(ps -ef | grep oraclePROD | grep -v grep | awk '{print $2}')</description>
      <pubDate>Fri, 25 May 2007 04:31:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048823#M750769</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-25T04:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048824#M750770</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;ps -ef|awk '/oraclePROD/{print $2}'|xargs -i kill -9 {}&lt;BR /&gt;&lt;BR /&gt;ps -ef|awk '/oraclePROD/{ print "kill -9",$2 }'|sh&lt;BR /&gt;</description>
      <pubDate>Tue, 29 May 2007 06:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048824#M750770</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-05-29T06:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: commands needed</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048825#M750771</link>
      <description>hi, thanks for all,i managed to kill all the oraclePROD process by a single command already.</description>
      <pubDate>Wed, 30 May 2007 01:15:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/commands-needed/m-p/5048825#M750771</guid>
      <dc:creator>ng_7</dc:creator>
      <dc:date>2007-05-30T01:15:35Z</dc:date>
    </item>
  </channel>
</rss>

