<?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: Finding processes running too long in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989748#M421908</link>
    <description>Thanks for thee quick response, that is what I needed.</description>
    <pubDate>Mon, 10 Jul 2006 12:10:26 GMT</pubDate>
    <dc:creator>Brenda G Follin</dc:creator>
    <dc:date>2006-07-10T12:10:26Z</dc:date>
    <item>
      <title>Finding processes running too long</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989746#M421906</link>
      <description>I need to know if it is possible to determine if a process is running too long (3 days) and be able to kill the process.  This is something that I need to use for oracle processes only.</description>
      <pubDate>Mon, 10 Jul 2006 11:14:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989746#M421906</guid>
      <dc:creator>Brenda G Follin</dc:creator>
      <dc:date>2006-07-10T11:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Finding processes running too long</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989747#M421907</link>
      <description>Generally I do not suggest that this process to be automated because it could be perfectly normal for some jobs to run this long or longer. I always prefer direct intervention and moreover, waiting 3 days to kill runaway process isn't very good system management either.&lt;BR /&gt;&lt;BR /&gt;In any event, I will get you started. You need to assert the XPG4 behavior of the ps command by setting the UNIX95 environment variable:&lt;BR /&gt;&lt;BR /&gt;This should list all the processes owned by oracle, the PID, and the elapsed time. A little more awk or Perl and you should be good to go (although I still think this idea is dangerous and/or dumb):&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset PID=""&lt;BR /&gt;typeset COMM=""&lt;BR /&gt;UNIX95= ps -U oracle -o comm,pid,etime |\&lt;BR /&gt;awk '{split($3,a,"-"); if (a[1] + 0 &amp;gt;= 3) {print $1,$2}}' | \&lt;BR /&gt;while read COMM PID&lt;BR /&gt;  do&lt;BR /&gt;    echo "Command: ${COMM} PID: ${PID}"&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;Put in your kills (and do not use kill -9 ${PID} and you should be good to go); you probably want to read a list of commands not to kill and filter those out but that is left for you to complete.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jul 2006 11:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989747#M421907</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-10T11:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Finding processes running too long</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989748#M421908</link>
      <description>Thanks for thee quick response, that is what I needed.</description>
      <pubDate>Mon, 10 Jul 2006 12:10:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-processes-running-too-long/m-p/4989748#M421908</guid>
      <dc:creator>Brenda G Follin</dc:creator>
      <dc:date>2006-07-10T12:10:26Z</dc:date>
    </item>
  </channel>
</rss>

