<?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: check the process in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635727#M238385</link>
    <description>You can get as,&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -eo comm,pid,etime | awk '{ split($3,a,":"); time=a[1]*60 + a[2]; if ( time &amp;gt; 30 ) { print $2" is running more than 30 seconds" }}'&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Tue, 27 Sep 2005 06:30:31 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-09-27T06:30:31Z</dc:date>
    <item>
      <title>check the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635725#M238383</link>
      <description>I want to find the pid ( by ps ) that has already run over 30 seconds , I know ps only show the minute/hour . &lt;BR /&gt;&lt;BR /&gt;eg. the start time of the below process are 15:19 / 15:20  , but I don't know the exact time ( in term of "second" ) it start to run ( I only know the hour and minute ) , if I want to find which of these jobs that it has started to run over 30 seconds ( it should be 8212 , 8215 , 8221 ) , what can I do ? thx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#ps -ef |grep ora&lt;BR /&gt;&lt;BR /&gt;root  8212     1  0 15:19 ?        00:00:00 ora &lt;BR /&gt;root  8215     1  0 15:20 ?        00:00:00 ora &lt;BR /&gt;root  8221     1  0 15:20 ?        00:00:00 ora &lt;BR /&gt;root  8224     1  0 15:20 ?        00:00:00 ora &lt;BR /&gt;&lt;BR /&gt;#date&lt;BR /&gt;Mon Sep 26 15:20:35 CST 2005</description>
      <pubDate>Tue, 27 Sep 2005 05:40:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635725#M238383</guid>
      <dc:creator>addendum</dc:creator>
      <dc:date>2005-09-27T05:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: check the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635726#M238384</link>
      <description>UNIX95= ps -uoracle -o etime= -o pid= -o ruser= | grep -i [o]ra&lt;BR /&gt;&lt;BR /&gt;If etime (the format seems to be MM:SS) is greater than 30 secs, you can do what you want.</description>
      <pubDate>Tue, 27 Sep 2005 05:57:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635726#M238384</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-09-27T05:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: check the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635727#M238385</link>
      <description>You can get as,&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -eo comm,pid,etime | awk '{ split($3,a,":"); time=a[1]*60 + a[2]; if ( time &amp;gt; 30 ) { print $2" is running more than 30 seconds" }}'&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 27 Sep 2005 06:30:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635727#M238385</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-27T06:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: check the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635728#M238386</link>
      <description>thx Muthukumar 's help much ,&lt;BR /&gt;&lt;BR /&gt;If I want to merge the above condition with the script you provide , could suggest how to change it ? thx&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</description>
      <pubDate>Tue, 27 Sep 2005 09:46:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635728#M238386</guid>
      <dc:creator>addendum1</dc:creator>
      <dc:date>2005-09-27T09:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: check the process</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635729#M238387</link>
      <description>it is possible to add this new checking to the script ? thx</description>
      <pubDate>Wed, 28 Sep 2005 08:10:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/check-the-process/m-p/3635729#M238387</guid>
      <dc:creator>addendum1</dc:creator>
      <dc:date>2005-09-28T08:10:34Z</dc:date>
    </item>
  </channel>
</rss>

