<?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 glance process shell in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-process-shell/m-p/2721159#M948056</link>
    <description>I want to make script for some process util. first ask me the number of process or name. If it exists print utilization per 5minutes .If not exist print echo "Not exist"&lt;BR /&gt;here is some scripts &lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;echo "pid= \c" &lt;BR /&gt;read my_pid &lt;BR /&gt;&lt;BR /&gt;for PID in `ps -ef|sed 's/^ *//g'|grep -v \^UID|awk '{print $2}'` &lt;BR /&gt;do &lt;BR /&gt;if [ $my_pid -eq $PID ] &lt;BR /&gt;then &lt;BR /&gt;echo $PID&amp;gt;./tmp_pid&lt;BR /&gt;echo "WE FOUND $my_pid IS $PID" &lt;BR /&gt;glance -adviser_only -syntax adv_cpu &amp;gt;&amp;gt;./result 2&amp;gt;&amp;gt;error&lt;BR /&gt;fi &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;print "---------", gbl_stattime&lt;BR /&gt;print "process           pid     util"&lt;BR /&gt;print "-------------------------------------------------------"&lt;BR /&gt;process loop {&lt;BR /&gt;if (proc_proc_id == $`{tail ./tmp_pid}` ) then&lt;BR /&gt;print proc_proc_name|12, "  ", proc_proc_id, "  ", proc_cpu_total_util, "       "}&lt;BR /&gt;print "     "&lt;BR /&gt;#</description>
    <pubDate>Fri, 10 May 2002 04:15:36 GMT</pubDate>
    <dc:creator>chin hyeon jung</dc:creator>
    <dc:date>2002-05-10T04:15:36Z</dc:date>
    <item>
      <title>glance process shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-process-shell/m-p/2721159#M948056</link>
      <description>I want to make script for some process util. first ask me the number of process or name. If it exists print utilization per 5minutes .If not exist print echo "Not exist"&lt;BR /&gt;here is some scripts &lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;echo "pid= \c" &lt;BR /&gt;read my_pid &lt;BR /&gt;&lt;BR /&gt;for PID in `ps -ef|sed 's/^ *//g'|grep -v \^UID|awk '{print $2}'` &lt;BR /&gt;do &lt;BR /&gt;if [ $my_pid -eq $PID ] &lt;BR /&gt;then &lt;BR /&gt;echo $PID&amp;gt;./tmp_pid&lt;BR /&gt;echo "WE FOUND $my_pid IS $PID" &lt;BR /&gt;glance -adviser_only -syntax adv_cpu &amp;gt;&amp;gt;./result 2&amp;gt;&amp;gt;error&lt;BR /&gt;fi &lt;BR /&gt;done &lt;BR /&gt;&lt;BR /&gt;----&lt;BR /&gt;print "---------", gbl_stattime&lt;BR /&gt;print "process           pid     util"&lt;BR /&gt;print "-------------------------------------------------------"&lt;BR /&gt;process loop {&lt;BR /&gt;if (proc_proc_id == $`{tail ./tmp_pid}` ) then&lt;BR /&gt;print proc_proc_name|12, "  ", proc_proc_id, "  ", proc_cpu_total_util, "       "}&lt;BR /&gt;print "     "&lt;BR /&gt;#</description>
      <pubDate>Fri, 10 May 2002 04:15:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-process-shell/m-p/2721159#M948056</guid>
      <dc:creator>chin hyeon jung</dc:creator>
      <dc:date>2002-05-10T04:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: glance process shell</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/glance-process-shell/m-p/2721160#M948057</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You can find a few  examples in /opt/perf/examples/adviser.  &lt;BR /&gt;Documentation is  /opt/perf/paperdocs/gp/C. &lt;BR /&gt;&lt;BR /&gt;Just to see cpu you can also use top with the&lt;BR /&gt;-f option which is undocumented but writes to a file.&lt;BR /&gt;&lt;BR /&gt;Or ps as&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -e -o pcpu -o ruser -o vsz -opid -o args|head -n1&lt;BR /&gt;UNIX95= ps -e -o pcpu -o ruser -o vsz -opid -o args|grep -v %CPU| sort -nr|tail&lt;BR /&gt;-n +2|head -n 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;             steve Steel</description>
      <pubDate>Fri, 10 May 2002 07:35:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/glance-process-shell/m-p/2721160#M948057</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2002-05-10T07:35:13Z</dc:date>
    </item>
  </channel>
</rss>

