<?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: Unuse process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632996#M238002</link>
    <description>&amp;gt;&amp;gt;how to make your script to run 10 times per every 1 minute&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# unuse.ksh&lt;BR /&gt;# Time to Sleep -  60 seconds / 10 times = 6 second&lt;BR /&gt;stime=6&lt;BR /&gt;&lt;BR /&gt;while [ 1 ]&lt;BR /&gt;do&lt;BR /&gt;  for pid in `ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $3 != "2" ) { print $2; }} '`&lt;BR /&gt;  do&lt;BR /&gt;     kill -9 $pid&lt;BR /&gt;     [ $? -eq 0 ] &amp;amp;&amp;amp; echo "pid is killed" || echo "pid is not killed" &amp;gt;&amp;gt; /tmp/pid.log&lt;BR /&gt;  done&lt;BR /&gt;  sleep $stime&lt;BR /&gt;done&lt;BR /&gt;# end&lt;BR /&gt;&lt;BR /&gt;# chmod +x unuse.ksh&lt;BR /&gt;# ./unuse.ksh &amp;amp;&lt;BR /&gt;# tail -f /tmp/pid.log&lt;BR /&gt;&lt;BR /&gt;# Use ctr + d to stop it. Or you can use crontab to schedule it accordingly. Change stime variable to suite your requirement.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Mon, 26 Sep 2005 06:23:34 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-09-26T06:23:34Z</dc:date>
    <item>
      <title>Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632980#M237986</link>
      <description>I found that in my system , there are some strange process , it will make the system crash so I would like to control the system no such process is running , &lt;BR /&gt;I found that if the system process that its process name is "ora" AND its ppid is not "2" , then it will crash the system, can suggest how to make sure the system no such kind of process is running ? thx</description>
      <pubDate>Thu, 22 Sep 2005 21:33:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632980#M237986</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-22T21:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632981#M237987</link>
      <description>Check your RC scripts, they are located in /etc/rc.config.d/. It seems like it is oracle process. Are you sure you dont want that to run ? &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 22 Sep 2005 22:36:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632981#M237987</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-09-22T22:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632982#M237988</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;it is not related to "oracle" , it is "ora" that the application we use .&lt;BR /&gt;can suggest the script / way to do that ?&lt;BR /&gt;&lt;BR /&gt;thx</description>
      <pubDate>Thu, 22 Sep 2005 22:46:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632982#M237988</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-22T22:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632983#M237989</link>
      <description>OK, Have you looked into your RC scripts to stop loading from startup ? &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 22 Sep 2005 22:57:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632983#M237989</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-09-22T22:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632984#M237990</link>
      <description>the strange process is generate from our application , I would prefer to use the script to fix it because it happen in my other unix base system . thx in advance.</description>
      <pubDate>Thu, 22 Sep 2005 23:14:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632984#M237990</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-22T23:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632985#M237991</link>
      <description>First, what exactly is this process?? What it does?? Is it running or hung process??&lt;BR /&gt;&lt;BR /&gt;glance, select process, wait state if it is a hung process. If it is hung process, you can not kill it and reboot remains the only option.</description>
      <pubDate>Thu, 22 Sep 2005 23:44:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632985#M237991</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-09-22T23:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632986#M237992</link>
      <description>OK, then you can kill it at the startup. Edit your /etc/profile or /.profile and add the following lines, &lt;BR /&gt;&lt;BR /&gt;kill -9 `ps -ae |grep -i "ora"||awk '{ print $1}'`&lt;BR /&gt;&lt;BR /&gt;-Arun &lt;BR /&gt;</description>
      <pubDate>Thu, 22 Sep 2005 23:44:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632986#M237992</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2005-09-22T23:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632987#M237993</link>
      <description>thx RAC, &lt;BR /&gt;&lt;BR /&gt;it is running process , the process is for system checking ,&lt;BR /&gt;&lt;BR /&gt;thx Arunvijai, &lt;BR /&gt;&lt;BR /&gt;you script seems not check the ppid , I use 'ps -ef' can find the ppid .&lt;BR /&gt;&lt;BR /&gt;thx</description>
      <pubDate>Fri, 23 Sep 2005 00:26:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632987#M237993</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-23T00:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632988#M237994</link>
      <description>If it starts periodically you can add the above script in cron.</description>
      <pubDate>Fri, 23 Sep 2005 00:30:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632988#M237994</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-09-23T00:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632989#M237995</link>
      <description>Never us signal 9 to kill process. That is a bad sysadmin practise. It just kills the process and does not do any cleanup with respect to memory and other resouces that process is using. I ususally do as follows.&lt;BR /&gt;&lt;BR /&gt;kill -15 "pid"&lt;BR /&gt;kill -1 "pid"&lt;BR /&gt;kill -2 "pid"&lt;BR /&gt;kill -3 "pid"&lt;BR /&gt;kill -11 "pid"&lt;BR /&gt;&lt;BR /&gt;Last resort&lt;BR /&gt;kill -9 "pid"&lt;BR /&gt;&lt;BR /&gt;you can kill you process as follows.&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -C"process_name" -o pid= | xargs kill</description>
      <pubDate>Fri, 23 Sep 2005 00:32:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632989#M237995</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-09-23T00:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632990#M237996</link>
      <description>You can get those process information as,&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $2 != "2" ) { print; } }'&lt;BR /&gt;&lt;BR /&gt;Is there anything in /etc/rc.log or syslog on regaring problem with this application startup.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 23 Sep 2005 00:35:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632990#M237996</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-23T00:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632991#M237997</link>
      <description>thx all help ,&lt;BR /&gt;&lt;BR /&gt;in Muthukumar's script &lt;BR /&gt;ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $2 != "2" ) { print; } }'&lt;BR /&gt;&lt;BR /&gt;could suggest if I want to kill the process and log what process that it has kill , what can I do ? thx&lt;BR /&gt;&lt;BR /&gt;and I am not too understand what is the function of rc script , is it useful for controlling such process ? thx</description>
      <pubDate>Sun, 25 Sep 2005 03:46:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632991#M237997</guid>
      <dc:creator>addendum1</dc:creator>
      <dc:date>2005-09-25T03:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632992#M237998</link>
      <description>Script of ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $3 != "2" ) { print $2; }} ' will execute ps -ef command and then,&lt;BR /&gt;&lt;BR /&gt; =&amp;gt; grep out ora with case-insensitive&lt;BR /&gt; =&amp;gt; It will remove the first line of ps -ef ouput&lt;BR /&gt; =&amp;gt; It will check for ppid not equal to 2&lt;BR /&gt;&lt;BR /&gt;To track all process and killed information then,&lt;BR /&gt;&lt;BR /&gt;for pid in `ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $3 != "2" ) { print $2; }} '`&lt;BR /&gt;do&lt;BR /&gt;  kill -9 $pid&lt;BR /&gt;  [ $? -eq 0 ] &amp;amp;&amp;amp;   echo "pid is killed" ||   echo "pid is not killed" &amp;gt;&amp;gt; /tmp/pid.log&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;cat /tmp/pid.log will give information.&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Sep 2005 04:01:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632992#M237998</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-26T04:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632993#M237999</link>
      <description>thx Muthukumar ,&lt;BR /&gt;&lt;BR /&gt;what is the use of the below string ? thx&lt;BR /&gt;&lt;BR /&gt;!/COMMAND/</description>
      <pubDate>Mon, 26 Sep 2005 06:07:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632993#M237999</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-26T06:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632994#M238000</link>
      <description>thx Muthukumar again ,&lt;BR /&gt;&lt;BR /&gt;how to make your script to run 10 times per every 1 minute ? thx in advance.</description>
      <pubDate>Mon, 26 Sep 2005 06:11:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632994#M238000</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-26T06:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632995#M238001</link>
      <description>Use of !/COMMAND/ is,&lt;BR /&gt;&lt;BR /&gt;# ps -ef&lt;BR /&gt;     UID   PID  PPID  C    STIME TTY       TIME COMMAND&lt;BR /&gt;    root     0     0  0  Sep 20  ?         0:16 swapper&lt;BR /&gt;&lt;BR /&gt;to remove first line of UID PID .. COMMAND from usage with scripting.&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 26 Sep 2005 06:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632995#M238001</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-26T06:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632996#M238002</link>
      <description>&amp;gt;&amp;gt;how to make your script to run 10 times per every 1 minute&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# unuse.ksh&lt;BR /&gt;# Time to Sleep -  60 seconds / 10 times = 6 second&lt;BR /&gt;stime=6&lt;BR /&gt;&lt;BR /&gt;while [ 1 ]&lt;BR /&gt;do&lt;BR /&gt;  for pid in `ps -ef | grep -i 'ora' | awk '!/COMMAND/ { if ( $3 != "2" ) { print $2; }} '`&lt;BR /&gt;  do&lt;BR /&gt;     kill -9 $pid&lt;BR /&gt;     [ $? -eq 0 ] &amp;amp;&amp;amp; echo "pid is killed" || echo "pid is not killed" &amp;gt;&amp;gt; /tmp/pid.log&lt;BR /&gt;  done&lt;BR /&gt;  sleep $stime&lt;BR /&gt;done&lt;BR /&gt;# end&lt;BR /&gt;&lt;BR /&gt;# chmod +x unuse.ksh&lt;BR /&gt;# ./unuse.ksh &amp;amp;&lt;BR /&gt;# tail -f /tmp/pid.log&lt;BR /&gt;&lt;BR /&gt;# Use ctr + d to stop it. Or you can use crontab to schedule it accordingly. Change stime variable to suite your requirement.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 26 Sep 2005 06:23:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632996#M238002</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-26T06:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unuse process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632997#M238003</link>
      <description>thx Muthukumar  ,&lt;BR /&gt;&lt;BR /&gt;your method is excellent , I want to have one more question , if run this script , it seems try to kill the pid that in the script running grep , like the below example , it seems try to kill the process 32612 , can suggest how to prevent the system kill it ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;root       758     1  0 Jul23 ?        00:02:26 ora&lt;BR /&gt;root    768   1  0 Jul23 ?        00:00:00 ora&lt;BR /&gt;root 32612 22295  0 21:45 pts/0    00:00:00 grep ora&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Sep 2005 08:48:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/unuse-process/m-p/3632997#M238003</guid>
      <dc:creator>addendum1</dc:creator>
      <dc:date>2005-09-26T08:48:47Z</dc:date>
    </item>
  </channel>
</rss>

