<?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: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390132#M199040</link>
    <description>Sundar,&lt;BR /&gt;Thanks for getting back to me and pointing out the modification.&lt;BR /&gt;&lt;BR /&gt;wvsa</description>
    <pubDate>Thu, 30 Sep 2004 14:01:25 GMT</pubDate>
    <dc:creator>wvsa</dc:creator>
    <dc:date>2004-09-30T14:01:25Z</dc:date>
    <item>
      <title>shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390126#M199034</link>
      <description>Greetings fellow admins&lt;BR /&gt;&lt;BR /&gt;We have oracle apps environment, have noticed from time to time the f60webmx jobs which are basically oracle forms processes going to a runaway state consuming 100% of a cpu.  Is there anyway to write a script or ?  that would detect these processes and alert us.&lt;BR /&gt;&lt;BR /&gt;Thank you for input,it is truly appreciated.&lt;BR /&gt;&lt;BR /&gt;wvsa</description>
      <pubDate>Wed, 29 Sep 2004 15:55:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390126#M199034</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2004-09-29T15:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390127#M199035</link>
      <description>Just run top and observe for CPUTIME...No need to do anything extra. &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Prashant</description>
      <pubDate>Wed, 29 Sep 2004 16:00:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390127#M199035</guid>
      <dc:creator>Prashant Zanwar_4</dc:creator>
      <dc:date>2004-09-29T16:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390128#M199036</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The best way is to configure 'alarmdef' of measureware and get alerted on it. It does a good job of keeping track of the history as well reporting. &lt;BR /&gt;&lt;BR /&gt;Otherway is to use the grand old 'ps' and gather the data. For ex.,&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -C "sshd" -o "pcpu args" |sort -n&lt;BR /&gt;&lt;BR /&gt;Should give you the %utilization of the process sshd. You can take samples of these utilizations for every 15 mins or so and keep track of processes that are at 100% and report them after 2 hours. Bit scripting is involved but that's not difficult to write.&lt;BR /&gt;You can specify multiple processes with -C option such as -C "sshd,inetd' etc.,&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Wed, 29 Sep 2004 16:10:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390128#M199036</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2004-09-29T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390129#M199037</link>
      <description>WVSA,&lt;BR /&gt;&lt;BR /&gt;   It is relatively easy and accurate to implement this using Measureware alarmgen.&lt;BR /&gt;&lt;BR /&gt;   Do you have measureware agent installed in the system ? -&lt;BR /&gt;&lt;BR /&gt;   If you do&lt;BR /&gt;&lt;BR /&gt;1) # vi /var/opt/perf/alarmdef&lt;BR /&gt;  &lt;BR /&gt;   threshold=100 &lt;BR /&gt;   PROCESS LOOP&lt;BR /&gt;   {&lt;BR /&gt;     if (PROC_PROC_NAME  ==  "f60webmx") then&lt;BR /&gt;     {&lt;BR /&gt;       if (PROC_CPU_TOTAL_TIME &amp;gt; 7200) and (PROC_CPU_TOTAL_UTIL_CUM &amp;gt; 100) then&lt;BR /&gt;       {&lt;BR /&gt;          exec "/usr/local/bin/run-away.ksh", PROC_PROC_ID&lt;BR /&gt;       }&lt;BR /&gt;      }&lt;BR /&gt;    }&lt;BR /&gt;    #&lt;BR /&gt;&lt;BR /&gt;    Create the script /usr/local/bin/run-away.sh and process the PID provided as the command line parameter to the script.&lt;BR /&gt;&lt;BR /&gt;    Once the script is ready, you need to restart the MWA alarmgen&lt;BR /&gt; &lt;BR /&gt;   # mwa restart alarmgen&lt;BR /&gt;&lt;BR /&gt;   You might have to do some tweaking to the measureware alarm definition.&lt;BR /&gt;&lt;BR /&gt;- Sundar.  &lt;BR /&gt;    &lt;BR /&gt;</description>
      <pubDate>Wed, 29 Sep 2004 16:21:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390129#M199037</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-29T16:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390130#M199038</link>
      <description>Sundar,&lt;BR /&gt;&lt;BR /&gt;Thank you for your response, going to test first by using mailx to mail the procid to me.  &lt;BR /&gt;&lt;BR /&gt;Thanks to all who responded</description>
      <pubDate>Thu, 30 Sep 2004 13:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390130#M199038</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2004-09-30T13:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390131#M199039</link>
      <description>Hi Wvsa,&lt;BR /&gt;&lt;BR /&gt;  Sorry, there are couple of blunders in my post...&lt;BR /&gt;&lt;BR /&gt;1) # vi /var/opt/perf/alarmdef&lt;BR /&gt;&lt;BR /&gt;threshold=100 &lt;BR /&gt;PROCESS LOOP&lt;BR /&gt;{&lt;BR /&gt;if (PROC_PROC_NAME == "f60webmx") then&lt;BR /&gt;{&lt;BR /&gt;if (PROC_CPU_TOTAL_TIME &amp;gt; 7200) and (PROC_CPU_TOTAL_UTIL_CUM &amp;gt;= threshold) then&lt;BR /&gt;{&lt;BR /&gt;exec "/usr/local/bin/run-away.ksh", PROC_PROC_ID&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;and &lt;BR /&gt;&lt;BR /&gt;# mwa restart alarm&lt;BR /&gt;&lt;BR /&gt;Good luck :-)&lt;BR /&gt;&lt;BR /&gt;- Sundar.</description>
      <pubDate>Thu, 30 Sep 2004 13:42:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390131#M199039</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-09-30T13:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: shell script or ? to find all processes that have used 100% of cpu for more than 2 hours</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390132#M199040</link>
      <description>Sundar,&lt;BR /&gt;Thanks for getting back to me and pointing out the modification.&lt;BR /&gt;&lt;BR /&gt;wvsa</description>
      <pubDate>Thu, 30 Sep 2004 14:01:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-or-to-find-all-processes-that-have-used-100-of-cpu/m-p/3390132#M199040</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2004-09-30T14:01:25Z</dc:date>
    </item>
  </channel>
</rss>

