<?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: System process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593022#M231657</link>
    <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;all these are dead processes , the system run it normally but can kill the process automatically , could suggest a script ? thx</description>
    <pubDate>Sun, 31 Jul 2005 10:10:41 GMT</pubDate>
    <dc:creator>peterchu</dc:creator>
    <dc:date>2005-07-31T10:10:41Z</dc:date>
    <item>
      <title>System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593018#M231653</link>
      <description>We have a system user "dbauser" always run some process in the system , but sometimes , these processes will not stop automatically l we need to terminate the process manually , can suggest the method how to terminate the process that is run by "dbauser" and run/idle over 10 minutes ? thx&lt;BR /&gt;</description>
      <pubDate>Fri, 29 Jul 2005 18:38:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593018#M231653</guid>
      <dc:creator>peterchu</dc:creator>
      <dc:date>2005-07-29T18:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593019#M231654</link>
      <description>setup a cron job that does a ps -ef | grep dbauser. and look at the time the process has been running.  Have the cron run every ten minutse to check for new ones.  If your script finds a match, have it kill it.</description>
      <pubDate>Sat, 30 Jul 2005 23:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593019#M231654</guid>
      <dc:creator>generic_1</dc:creator>
      <dc:date>2005-07-30T23:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593020#M231655</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;I am new to write script , could provide me some help ? thx</description>
      <pubDate>Sun, 31 Jul 2005 07:36:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593020#M231655</guid>
      <dc:creator>peterchu</dc:creator>
      <dc:date>2005-07-31T07:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593021#M231656</link>
      <description>I would suggest that you should take a look at why these processes keep running. How about the state of these processes, were they hung or in running state?</description>
      <pubDate>Sun, 31 Jul 2005 09:53:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593021#M231656</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2005-07-31T09:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593022#M231657</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;all these are dead processes , the system run it normally but can kill the process automatically , could suggest a script ? thx</description>
      <pubDate>Sun, 31 Jul 2005 10:10:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593022#M231657</guid>
      <dc:creator>peterchu</dc:creator>
      <dc:date>2005-07-31T10:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593023#M231658</link>
      <description>$ ps -fea |grep dbauser</description>
      <pubDate>Sun, 31 Jul 2005 19:51:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593023#M231658</guid>
      <dc:creator>Pedro Tapia_2</dc:creator>
      <dc:date>2005-07-31T19:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593024#M231659</link>
      <description>kill -9 `ps -aef | grep dbuser | awk ' { print $2 }'</description>
      <pubDate>Mon, 01 Aug 2005 00:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593024#M231659</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-08-01T00:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593025#M231660</link>
      <description>You can terminate them as,&lt;BR /&gt;&lt;BR /&gt;ps -u &lt;USERNAME&gt; | awk '{ split($3,a,":"); if ( a[2] &amp;gt; 10 ) { print $1; }}' | xargs kill -9&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;kill -9 `ps -u dbauser | | awk '{ split($3,a,":"); if ( a[2] &amp;gt; 10 ) { print $1; }}'`&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/USERNAME&gt;</description>
      <pubDate>Mon, 01 Aug 2005 01:01:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593025#M231660</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-01T01:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593026#M231661</link>
      <description>thx Muth,&lt;BR /&gt;when run your script , it pop &lt;BR /&gt;sage: kill [ -s signal | -p ] [ -a ] pid ...&lt;BR /&gt;       kill -l [ signal ]&lt;BR /&gt;&lt;BR /&gt;it seems my system can't use "split" , could provide some help again ? thx in advance</description>
      <pubDate>Tue, 02 Aug 2005 01:59:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593026#M231661</guid>
      <dc:creator>hangyu</dc:creator>
      <dc:date>2005-08-02T01:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593027#M231662</link>
      <description>It's quite easy to script a reaper for the long running process.&lt;BR /&gt;But as someone else already replied you should better check what's causing this.&lt;BR /&gt;  &lt;BR /&gt;Anyway you can parse the PID (to send a signal to), and the elapsed time of the process).&lt;BR /&gt;In my example I send a "sleep 600" in the background, and I intend to shoot it if it was running for more than 3 mins.&lt;BR /&gt; &lt;BR /&gt;1. parse pid and etime and store in vars&lt;BR /&gt; &lt;BR /&gt;UNIX95= ps -o pid= -o etime= -C sleep|read pid etime&lt;BR /&gt; &lt;BR /&gt;2. test if etime &amp;gt; 3 min. and shoot&lt;BR /&gt;  &lt;BR /&gt;[[ $(printf "%d" $(echo $etime|cut -d: -f1)) -ge 3 ]] &amp;amp;&amp;amp; kill $pid&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;Ideally you would put the test (i.e. the [[ ]]) in a loop conditional block.&lt;BR /&gt; &lt;BR /&gt;e.g.&lt;BR /&gt; &lt;BR /&gt;until [[ $(printf "%d" $(echo $etime|cut -d: -f1)) -ge 3 ]];do sleep 10;done; kill $pid&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;There are hundred similar ways to implement this little functionality (probably better ones).&lt;BR /&gt; &lt;BR /&gt;However, some caveat.&lt;BR /&gt;If the process you want to kill already has been running for several hours the etime format changes to HH:MM:SS&lt;BR /&gt;So your parsing would have to accomodate for such subtle nuissances.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Aug 2005 02:27:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593027#M231662</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-08-02T02:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593028#M231663</link>
      <description>Rubbish, please forget the until loop example!&lt;BR /&gt;I was too quick clicking forgetting thinking.&lt;BR /&gt;You of course need to put the variable assignment of $etime within the loop's body to update the value.</description>
      <pubDate>Tue, 02 Aug 2005 02:32:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593028#M231663</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2005-08-02T02:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: System process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593029#M231664</link>
      <description>thx Ralph Grothe 's working,&lt;BR /&gt;&lt;BR /&gt;I am not too understand the statement "UNIX95= ps -o pid= -o etime= -C sleep|read pid etime" , it seems no output to the system , could suggest simipler way ? thx in advance.</description>
      <pubDate>Tue, 02 Aug 2005 07:35:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-process/m-p/3593029#M231664</guid>
      <dc:creator>hangyu</dc:creator>
      <dc:date>2005-08-02T07:35:08Z</dc:date>
    </item>
  </channel>
</rss>

