<?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: track CPU usage for specific process? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035893#M431933</link>
    <description>Dave,&lt;BR /&gt;&lt;BR /&gt;On 11.11 you absolutely do have the XPG4 options.  You need to cut and paste this line exactly as it stands:&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o pid,ppid,pcpu,args&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Fri, 23 Mar 2007 10:18:12 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2007-03-23T10:18:12Z</dc:date>
    <item>
      <title>track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035887#M431927</link>
      <description>Greetings,&lt;BR /&gt;   I commonly use top to view high resource consumers on my rp8400 (HPUX 11.11). I am interested though in watching some specific jobs (by name) and periodically saving their weighted CPU usage over time. Is there a ps command (or another method) I could use to show the weighted CPU usage for those processes? Thanks</description>
      <pubDate>Fri, 23 Mar 2007 09:08:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035887#M431927</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T09:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035888#M431928</link>
      <description>You need to look at the XPG4 options available for "ps", particularly "-o pcpu".&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -ef -o pid,ppid,pcpu,args | sort -nbk 3 | tail -10&lt;BR /&gt;&lt;BR /&gt;would give you the top 10, you would probably want to pipe to grep to select particular processes.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;P.S.  Note the space after "UNIX95= "</description>
      <pubDate>Fri, 23 Mar 2007 09:29:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035888#M431928</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-03-23T09:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035889#M431929</link>
      <description>Hey&lt;BR /&gt;&lt;BR /&gt;here is an example script with 9869 as pid&lt;BR /&gt;&lt;BR /&gt;UNIX95=1 /usr/bin/ps -e -o pcpu,pid,args | grep 9869 | grep -v grep | sed -e 's/\.[0-9][0-9]/&amp;amp;\%/g' |awk '{ print $1 } '&lt;BR /&gt;&lt;BR /&gt;hope this helps&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Fri, 23 Mar 2007 09:29:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035889#M431929</guid>
      <dc:creator>Oviwan</dc:creator>
      <dc:date>2007-03-23T09:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035890#M431930</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;Glance is always a good option, remember if you do not have it you could always get a trial version,&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jaime.</description>
      <pubDate>Fri, 23 Mar 2007 09:39:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035890#M431930</guid>
      <dc:creator>Jaime Bolanos Rojas.</dc:creator>
      <dc:date>2007-03-23T09:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035891#M431931</link>
      <description>Thanks for the suggestions. I do have the -o options (XPG4) on my system (...illegal option -o...). I have glance and can drill down to the procs I am monitoring - but want to get a snapshot of their CPU with an automated script every 10 minutes. Thanks</description>
      <pubDate>Fri, 23 Mar 2007 09:46:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035891#M431931</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035892#M431932</link>
      <description>oops - correction - I DO NOT have the -o options for ps. thanks</description>
      <pubDate>Fri, 23 Mar 2007 10:10:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035892#M431932</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T10:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035893#M431933</link>
      <description>Dave,&lt;BR /&gt;&lt;BR /&gt;On 11.11 you absolutely do have the XPG4 options.  You need to cut and paste this line exactly as it stands:&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o pid,ppid,pcpu,args&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 23 Mar 2007 10:18:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035893#M431933</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-03-23T10:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035894#M431934</link>
      <description>Yes, you do have those options for ps. The -o options work when the XPG4 behavior od ps is triggered. That is accomplished by setting and exporting the UNIX95 environment variable. (It only matters if UNIX95 is defined or not; the value UNIX95 is set to is ignored)&lt;BR /&gt;&lt;BR /&gt;so:&lt;BR /&gt;export UNIX95=1&lt;BR /&gt;ps -o pid,...&lt;BR /&gt;-- will work or you can define UNIX95 for a single command:&lt;BR /&gt;UNIX95=1 ps -o pid,...&lt;BR /&gt;works as well.</description>
      <pubDate>Fri, 23 Mar 2007 10:22:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035894#M431934</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-23T10:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035895#M431935</link>
      <description>well alrighty then - I guess I do. I am not familiar with that syntax UNIX95= --can you elaborate on that? Thanks - that works fine.</description>
      <pubDate>Fri, 23 Mar 2007 10:23:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035895#M431935</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T10:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035896#M431936</link>
      <description>well alrighty then - I guess I do! :) I am not familiar with that syntax UNIX95= --can you elaborate on that? Thanks - that command works great.</description>
      <pubDate>Fri, 23 Mar 2007 10:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035896#M431936</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T10:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035897#M431937</link>
      <description>Setting the UNIX95 variable invokes the XPG4 standards, which make additional options available to the ps command.  See man ps and look for XPG4, UNIX95 and EXTERNAL INFLUENCES.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 23 Mar 2007 10:27:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035897#M431937</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2007-03-23T10:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035898#M431938</link>
      <description>ok - that makes sense - I didn't realize we were setting an env var - thought it was some new command...Learn something new every day....</description>
      <pubDate>Fri, 23 Mar 2007 10:31:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035898#M431938</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2007-03-23T10:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035899#M431939</link>
      <description>Answer the question yourself:&lt;BR /&gt;&lt;BR /&gt;try this from a shell prompt:&lt;BR /&gt;unset X # make sure that X is not already defined&lt;BR /&gt;X=1 sh 'echo ${X}' # Note that sh is a separate process&lt;BR /&gt;echo ${X} # back in parent&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Mar 2007 10:32:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035899#M431939</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-03-23T10:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: track CPU usage for specific process?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035900#M431940</link>
      <description>&amp;gt;Clay: export UNIX95=1&lt;BR /&gt;&lt;BR /&gt;It may be dangerous to set this variable, rather than invoke it just on ps(1).&lt;BR /&gt;&lt;BR /&gt;Patches may fail to unshar due to bugs/fixes in shar(1) and wc(1).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Clay: X=1 sh 'echo ${X}'&lt;BR /&gt;&lt;BR /&gt;Note this is completely different (in most cases if X isn't exported) than:&lt;BR /&gt;$ X=1; sh 'echo ${X}'</description>
      <pubDate>Sat, 24 Mar 2007 00:04:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/track-cpu-usage-for-specific-process/m-p/5035900#M431940</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-03-24T00:04:23Z</dc:date>
    </item>
  </channel>
</rss>

