<?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: Need A Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224418#M170945</link>
    <description>is&lt;BR /&gt;&lt;BR /&gt;# perl -MProc::ProcessTable -e'$x=getpwnam"orasag";kill 9,map{$_-&amp;gt;pid}grep{$_-&amp;gt;uid==$x&amp;amp;&amp;amp;$_-&amp;gt;cmndline=~/LOCAL=NO/)@{Proc::ProcessTable-&amp;gt;new()-&amp;gt;table}'&lt;BR /&gt;&lt;BR /&gt;too terse?&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Sat, 20 Mar 2004 06:34:52 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-03-20T06:34:52Z</dc:date>
    <item>
      <title>Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224417#M170944</link>
      <description>Hi Gurus&lt;BR /&gt;I have a script in the cron that shutsdown my Database. I have now  found that the database does not go down and needs manual intervention to kill some of the hanging processess. &lt;BR /&gt;&lt;BR /&gt;The ps -ef give the following output&lt;BR /&gt;orasag  7454     1  2 05:51:57 ?         0:04 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6515     1  0 05:45:50 ?         0:03 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6700     1  0 05:45:54 ?         0:59 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  7262     1  0 05:49:57 ?         0:04 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  7274     1  2 05:49:58 ?         0:13 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6648     1  2 05:45:53 ?         0:03 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6818     1  0 05:46:01 ?         0:00 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6824     1  0 05:46:01 ?         0:11 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  7096     1  0 05:47:56 ?         0:04 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6682     1  0 05:45:54 ?         0:58 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6533     1  0 05:45:50 ?         0:03 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  7256     1  0 05:49:56 ?         0:00 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6768     1  0 05:45:56 ?         0:04 oracleSAG (LOCAL=NO) &lt;BR /&gt;orasag  6732     1  0 05:45:55 ?         0:00 oracleSAG (LOCAL=NO)&lt;BR /&gt;&lt;BR /&gt;I need a script that could identify all PID's for the  processess that belong to orasag and where LOCAL=NO and perform a 'kill -9 ' for those PIds.&lt;BR /&gt;&lt;BR /&gt;thankyou in advance&lt;BR /&gt;Faizer&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Mar 2004 06:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224417#M170944</guid>
      <dc:creator>Faizer</dc:creator>
      <dc:date>2004-03-20T06:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224418#M170945</link>
      <description>is&lt;BR /&gt;&lt;BR /&gt;# perl -MProc::ProcessTable -e'$x=getpwnam"orasag";kill 9,map{$_-&amp;gt;pid}grep{$_-&amp;gt;uid==$x&amp;amp;&amp;amp;$_-&amp;gt;cmndline=~/LOCAL=NO/)@{Proc::ProcessTable-&amp;gt;new()-&amp;gt;table}'&lt;BR /&gt;&lt;BR /&gt;too terse?&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sat, 20 Mar 2004 06:34:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224418#M170945</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-03-20T06:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224419#M170946</link>
      <description>Hi Faizer,&lt;BR /&gt;&lt;BR /&gt;How about:&lt;BR /&gt;&lt;BR /&gt;kill -9 $(ps -ef | grep -v grep | grep "LOCAL=NO" | awk  '/oracleSAG/ {print $2}')&lt;BR /&gt;&lt;BR /&gt;Check this first, before adding the kill -9 string, to make sure i did not make a typo.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Gideon</description>
      <pubDate>Sat, 20 Mar 2004 06:37:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224419#M170946</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-03-20T06:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224420#M170947</link>
      <description>Nice one Gideon, but you forgot the "user" part:&lt;BR /&gt;&lt;BR /&gt;kill -9 $(ps -ef | grep -v grep | grep ^orasag | grep "LOCAL=NO" | awk '/oracleSAG/ {print $2}')&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sat, 20 Mar 2004 07:07:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224420#M170947</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-03-20T07:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224421#M170948</link>
      <description>Procura,&lt;BR /&gt;&lt;BR /&gt;Thanks for the correction.&lt;BR /&gt;&lt;BR /&gt;Gideon&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Mar 2004 08:04:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224421#M170948</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-03-20T08:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224422#M170949</link>
      <description>Please note that I am geeting the folloiwng error.&lt;BR /&gt;syntax error The source line is 1.  &lt;BR /&gt;The error context is                &lt;BR /&gt;                &amp;gt;&amp;gt;&amp;gt; oracleSAG/{ &amp;lt;&amp;lt;&amp;lt; &lt;BR /&gt;awk: Quitting                       &lt;BR /&gt;The source line is 1. &lt;BR /&gt;best regards</description>
      <pubDate>Sat, 20 Mar 2004 09:26:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224422#M170949</guid>
      <dc:creator>Faizer</dc:creator>
      <dc:date>2004-03-20T09:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224423#M170950</link>
      <description>#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;for i in $(ps -ef | grep -v grep | grep orasag | grep oracleSAG | grep | grep 'LOCAL=NO' | awk '{print $2}')&lt;BR /&gt;do&lt;BR /&gt; kill -9 $i&lt;BR /&gt;done</description>
      <pubDate>Sat, 20 Mar 2004 10:58:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224423#M170950</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2004-03-20T10:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224424#M170951</link>
      <description>Hi Faizer,&lt;BR /&gt;&lt;BR /&gt;Try a space between / and {&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;Gideon</description>
      <pubDate>Sat, 20 Mar 2004 16:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224424#M170951</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2004-03-20T16:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224425#M170952</link>
      <description>Check V$session view to find more on this. These are Oracle active/inactive sessions. Following sql can help:&lt;BR /&gt;&lt;BR /&gt;SELECT SID, SERIAL#, STATUS, SERVER, USERNAME FROM V$SESSION&lt;BR /&gt;&lt;BR /&gt;If a user session is processing a transaction (ACTIVE status) when it is terminated, the transaction is rolled back and the user immediately receives the following message:&lt;BR /&gt;&lt;BR /&gt;ORA-00028: your session has been killed&lt;BR /&gt;&lt;BR /&gt;If the session is not making a SQL call to Oracle (is INACTIVE) when it is terminated, the ORA-00028 message is not returned immediately.&lt;BR /&gt;&lt;BR /&gt;Check the following link as well:&lt;BR /&gt;&lt;A href="http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/manproc.htm#3849" target="_blank"&gt;http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/manproc.htm#3849&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Have a look at tnsnames.ora also.&lt;BR /&gt;&lt;BR /&gt;sks&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Mar 2004 22:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224425#M170952</guid>
      <dc:creator>Sanjay Kumar Suri</dc:creator>
      <dc:date>2004-03-20T22:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224426#M170953</link>
      <description>Hi every one&lt;BR /&gt;Thankyou for the time spent on this. Both the scripts provided worked. &lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;Faizer</description>
      <pubDate>Sun, 21 Mar 2004 05:02:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224426#M170953</guid>
      <dc:creator>Faizer</dc:creator>
      <dc:date>2004-03-21T05:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224427#M170954</link>
      <description>Faizer,&lt;BR /&gt;&lt;BR /&gt;please have a look at this:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#28" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#28&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;&lt;BR /&gt;Michael&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Mar 2004 07:49:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224427#M170954</guid>
      <dc:creator>Michael Schulte zur Sur</dc:creator>
      <dc:date>2004-03-21T07:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need A Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224428#M170955</link>
      <description>Faizer,&lt;BR /&gt;I was also looking for a similar script. Thank you and all for this great help. Can you give points to all these helpfull guys.</description>
      <pubDate>Mon, 22 Mar 2004 12:43:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script/m-p/3224428#M170955</guid>
      <dc:creator>GIRIJA SWAIN</dc:creator>
      <dc:date>2004-03-22T12:43:38Z</dc:date>
    </item>
  </channel>
</rss>

