<?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: A script about TOP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914489#M285048</link>
    <description>typeset: not found, why? Pls help!</description>
    <pubDate>Tue, 19 Dec 2006 02:41:38 GMT</pubDate>
    <dc:creator>ericfjchen</dc:creator>
    <dc:date>2006-12-19T02:41:38Z</dc:date>
    <item>
      <title>A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914486#M285045</link>
      <description>There is a process occupied over 99% CPU (running time &amp;gt; 240 min) as below,  &lt;BR /&gt;&lt;BR /&gt;PID USERNAME PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND&lt;BR /&gt;91847 prodmgr   44    0   57M   18M sleep   240:02  99.00% f60webmx&lt;BR /&gt;-----------------&lt;BR /&gt;Because we have 10 CPU in the server, so we can't detect this process by total CPU loading.&lt;BR /&gt;Can you tell me how to write a sciprt to detect a process (CPU &amp;gt; 99%, Run Time &amp;gt; 240)?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Eric&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Dec 2006 03:41:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914486#M285045</guid>
      <dc:creator>ericfjchen</dc:creator>
      <dc:date>2006-12-18T03:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914487#M285046</link>
      <description>Hi Eric,&lt;BR /&gt;&lt;BR /&gt;Try this one.&lt;BR /&gt;&lt;BR /&gt;# echo " %CPU PID RUSER COMMAND" ;UNIX95= ps -ef -o 'pcpu pid ruser args'|sort -nr|head -10&lt;BR /&gt;&lt;BR /&gt;top 10 cpu&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -e -o "user,pcpu,cpu,vsz,pid,ppid,args" | sort -rnk2 | head -10&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan&lt;BR /&gt;&lt;BR /&gt;Ps.&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=4177" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=4177&lt;/A&gt;</description>
      <pubDate>Mon, 18 Dec 2006 04:07:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914487#M285046</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2006-12-18T04:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914488#M285047</link>
      <description>&lt;!--!*#--&gt;Hi Eric,&lt;BR /&gt;&lt;BR /&gt;Give this quasi-tested script a shot (adjust THRESHOLD_CPU and THRESHOLD_RT accordingly):&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset -i THRESHOLD_CPU=99&lt;BR /&gt;typeset -i THRESHOLD_RT=240&lt;BR /&gt;top -d 1 -n 30 -f /tmp/top.$$.1&lt;BR /&gt;awk -v T_CPU=${THRESHOLD_CPU} -v T_RT=${THRESHOLD_RT} 'NR&amp;gt;15{ sub(/:../,"",$10); if ($11 &amp;gt; T_CPU &amp;amp;&amp;amp; $10 &amp;gt; T_RT) print}' &amp;lt; /tmp/top.$$.1 &amp;gt; /tmp/top.$$.2&lt;BR /&gt;if [[ -s /tmp/top.$$.2 ]]&lt;BR /&gt;then&lt;BR /&gt;  mailx -m -s "Process(es) Hogging CPU!" your@email.addr &amp;lt; /tmp/top.$$.2&lt;BR /&gt;fi&lt;BR /&gt;rm -f /tmp/top.$$.[12]&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 18 Dec 2006 09:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914488#M285047</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-12-18T09:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914489#M285048</link>
      <description>typeset: not found, why? Pls help!</description>
      <pubDate>Tue, 19 Dec 2006 02:41:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914489#M285048</guid>
      <dc:creator>ericfjchen</dc:creator>
      <dc:date>2006-12-19T02:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914490#M285049</link>
      <description>Hi Spex,&lt;BR /&gt;some note about your script:&lt;BR /&gt;you use NR&amp;gt;15 to skip the header line in TOP output till the first line after CPU but this is not fixed. It depends on teh number of CPU you have in my case is 27:&lt;BR /&gt;    24&lt;BR /&gt;    25  Memory: 11548788K (5845412K) real, 14852188K (8039792K) virtual, 16883816K free  Page# 1/42&lt;BR /&gt;    26&lt;BR /&gt;    27  CPU TTY  PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND&lt;BR /&gt;    28  11   ? 25893 oracle   149 22  1136M 51436K sleep   53:37 40.19 40.12 oracleGPWK01CS&lt;BR /&gt;&lt;BR /&gt;in awk simply use: &lt;BR /&gt;/tmp/top.$$.1 &lt;BR /&gt;instead of &amp;lt; /tmp/top.$$.1 &lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Tue, 19 Dec 2006 03:39:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914490#M285049</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-12-19T03:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: A script about TOP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914491#M285050</link>
      <description>something a little simpler:&lt;BR /&gt;&lt;BR /&gt;ps aux |tail +2 |sort -rn -k 3,3 |more</description>
      <pubDate>Tue, 19 Dec 2006 05:45:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-script-about-top/m-p/3914491#M285050</guid>
      <dc:creator>lawrenzo</dc:creator>
      <dc:date>2006-12-19T05:45:30Z</dc:date>
    </item>
  </channel>
</rss>

