<?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: Killing process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791420#M943383</link>
    <description>Hi Stefan,&lt;BR /&gt;&lt;BR /&gt;Thanks and I will assign points shortly!&lt;BR /&gt;&lt;BR /&gt;This process can run for a time of about hour before you know that its a zombie.&lt;BR /&gt;&lt;BR /&gt;How do I allow it to check that its been running for 60min + before killing it?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Darren</description>
    <pubDate>Thu, 22 Aug 2002 06:21:01 GMT</pubDate>
    <dc:creator>Darren Murray_1</dc:creator>
    <dc:date>2002-08-22T06:21:01Z</dc:date>
    <item>
      <title>Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791416#M943379</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a problem with users leaving a process behind if the application crashes. Once left behind this process chomps up cpu. The problem I have that a nightly job has the same process name so I need a script that will kill a process with the process name being mdb_x.27831 owned by any other username than qbdba.&lt;BR /&gt;&lt;BR /&gt;The process is able to run for users other than qbdba but not for any longer than 60 minutes&lt;BR /&gt;&lt;BR /&gt;I hope that makes sense.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 05:58:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791416#M943379</guid>
      <dc:creator>Darren Murray_1</dc:creator>
      <dc:date>2002-08-22T05:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791417#M943380</link>
      <description>Here is an example from top where you will see the same name but different user id's&lt;BR /&gt;&lt;BR /&gt;The user whybroja should be killed&lt;BR /&gt;&lt;BR /&gt;29896 whybroja 241 run   1563:34 98.81 98.64 mdb_x&lt;BR /&gt;&lt;BR /&gt;13842 qbdba    148 20 5:13 10.26 10.24 mdb_x</description>
      <pubDate>Thu, 22 Aug 2002 06:02:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791417#M943380</guid>
      <dc:creator>Darren Murray_1</dc:creator>
      <dc:date>2002-08-22T06:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791418#M943381</link>
      <description>&lt;BR /&gt;Easy. &lt;BR /&gt;PID=$(ps -ef|grep mdb_x|grep -v grep|grep -v qbdba|awk '{print $2}')&lt;BR /&gt;&lt;BR /&gt;Gives you the pid number to kill. It greps out the process owned by qbdba so if you have a runaway this will find it, then if the pid is non null kill it;&lt;BR /&gt;&lt;BR /&gt;[ "$PID" -ne "" ] &amp;amp;&amp;amp; kill $PID&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 06:12:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791418#M943381</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-08-22T06:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791419#M943382</link>
      <description>Hi,&lt;BR /&gt;There are several good threads about how to go about killing processes. Example : &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;I found this thread by doing a search on the forums with keywords : "kill grep process".&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 22 Aug 2002 06:18:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791419#M943382</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2002-08-22T06:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791420#M943383</link>
      <description>Hi Stefan,&lt;BR /&gt;&lt;BR /&gt;Thanks and I will assign points shortly!&lt;BR /&gt;&lt;BR /&gt;This process can run for a time of about hour before you know that its a zombie.&lt;BR /&gt;&lt;BR /&gt;How do I allow it to check that its been running for 60min + before killing it?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Darren</description>
      <pubDate>Thu, 22 Aug 2002 06:21:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791420#M943383</guid>
      <dc:creator>Darren Murray_1</dc:creator>
      <dc:date>2002-08-22T06:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791421#M943384</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can try this:&lt;BR /&gt;&lt;BR /&gt;for i in $(ps -ef | grep "mbx_x*"| grep -v -e "qbdba" -e "grep" |sed -e 's/^/ /g' -e 's/\ \{1,\}/#/g' | cut -d"#" -f3)&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;If all works, change the "echo $i" by "kill $i"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Thu, 22 Aug 2002 06:21:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791421#M943384</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-22T06:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791422#M943385</link>
      <description>Hi Darren&lt;BR /&gt;&lt;BR /&gt;This script looks for running heavy cpu time users of a particular type and Zaps them.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The line:-&lt;BR /&gt;if [ $cpu00 -gt 180 ]  - sets the cpu usage before the kill is activated ??? adjust to suit.&lt;BR /&gt;&lt;BR /&gt;It is not the tidiest script but it works.&lt;BR /&gt;&lt;BR /&gt;Test it well before use and echo back results before unhashing the Kill line. &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula&lt;BR /&gt;&lt;BR /&gt;------------------------cut here--------------&lt;BR /&gt;# CONNECTION MONITORING /CONTROL # &lt;BR /&gt;########################################################### &lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;# Get info on the users &lt;BR /&gt;# Change the grep to suit particular user &lt;BR /&gt;# &lt;BR /&gt;ps -ef | grep " mdb_x.27831" | grep whybroja | grep -v grep | awk '{print $2, $5, $7}' | while read pid time cpu &lt;BR /&gt;do &lt;BR /&gt;# Strip the ':' &lt;BR /&gt;cpu00=`echo $cpu | sed 's/://'` &lt;BR /&gt;time00=`echo $time | sed 's/://'` &lt;BR /&gt;time000=`echo $time00 | sed 's/://'` &lt;BR /&gt;currenttime=`date "+%H%M%S"` &lt;BR /&gt;# &lt;BR /&gt;# Calculate total time connected &lt;BR /&gt;timeon=`print $currenttime - $time000|bc` &lt;BR /&gt;echo $timeon&lt;BR /&gt;# &lt;BR /&gt;# CPU usage bit &lt;BR /&gt;# Cpu usage limit&lt;BR /&gt;if [ $cpu00 -gt 180 ] &lt;BR /&gt;then &lt;BR /&gt;# Gracefull kill&lt;BR /&gt;echo $pid&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# kill $pid &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Stronger kill (If required)&lt;BR /&gt;# sleep 5 &lt;BR /&gt;# kill -9 $pid &lt;BR /&gt;fi &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;------------------------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 06:30:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791422#M943385</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-22T06:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Killing process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791423#M943386</link>
      <description>Darren&lt;BR /&gt;&lt;BR /&gt;Welcome to the forum.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Thu, 22 Aug 2002 07:17:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/killing-process/m-p/2791423#M943386</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-22T07:17:24Z</dc:date>
    </item>
  </channel>
</rss>

