<?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: How to retrieve cpu usage for all processes in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607812#M233979</link>
    <description>Charles,&lt;BR /&gt;&lt;BR /&gt;I'll have to agree with some of my other parnters in this post... it'll be down right hard to get it down to an exact amount. However, I have some good news.. there are some programs out there that can help with your graphs/measurements. One good one I've used in the past is called sarcheck. I also saved a bunch of money on my car insurance... jk. Check it out partner.&lt;BR /&gt;&lt;BR /&gt;Into the sunset,&lt;BR /&gt;&lt;BR /&gt;John E. Ophious</description>
    <pubDate>Tue, 23 Aug 2005 20:01:25 GMT</pubDate>
    <dc:creator>John E.Ophious</dc:creator>
    <dc:date>2005-08-23T20:01:25Z</dc:date>
    <item>
      <title>How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607803#M233970</link>
      <description>Hi,&lt;BR /&gt;I would to retrieve cpu usage for all processes.  I have try TOP and PS, but after adding up the cpu usage percentage for all the processes, it did not equal or come close to the total CPU usage reported by TOP.&lt;BR /&gt;&lt;BR /&gt;This is what I used:&lt;BR /&gt;# to get all process with top&lt;BR /&gt;top -n 300 -f top_list.file&lt;BR /&gt;# to get all process with ps&lt;BR /&gt;ps -elfo pcpu,args&lt;BR /&gt;# I get the total CPU usage from vmstat&lt;BR /&gt;vmstat 1 5&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Charles Li</description>
      <pubDate>Fri, 19 Aug 2005 14:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607803#M233970</guid>
      <dc:creator>Charles Li_2</dc:creator>
      <dc:date>2005-08-19T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607804#M233971</link>
      <description>UNIx95= ps -ef -o "pcpu" | awk '(s+=41) END {printf "%d\n", s}'&lt;BR /&gt;&lt;BR /&gt;say sd1&lt;BR /&gt;&lt;BR /&gt;How many cpus you have??. check the value you got from above to "no of cpus*valus_above" (sat sd)&lt;BR /&gt;&lt;BR /&gt;The value sd should match sd1 (roughly and not exactly.)&lt;BR /&gt;&lt;BR /&gt;glance/sar is better tool for this and not top.</description>
      <pubDate>Fri, 19 Aug 2005 15:05:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607804#M233971</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-08-19T15:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607805#M233972</link>
      <description>Some corrections.&lt;BR /&gt;&lt;BR /&gt;UNIX95= ps -ef -o "pcpu" | awk '(s+=41) END {printf "%d\n", s}'&lt;BR /&gt;&lt;BR /&gt;This value should match with what you see in top/glance</description>
      <pubDate>Fri, 19 Aug 2005 15:20:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607805#M233972</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-08-19T15:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607806#M233973</link>
      <description>Hi Charles ,&lt;BR /&gt;&lt;BR /&gt;for all the CPU usage details :&lt;BR /&gt;&lt;BR /&gt;# sar -u -M 5 5   ( For 5 instance)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for all top processes:&lt;BR /&gt;&lt;BR /&gt;# ps -elf pcpu | sort -r -k4 | more  ( 4rth column is cpu usage).&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.D.&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Aug 2005 16:36:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607806#M233973</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2005-08-20T16:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607807#M233974</link>
      <description>It's very important to understand that top, Glance, sar and vmstat cannot possibly give you an exact picture of CPU usage. You and I are far too slow to keep up with the hundreds of program changes that take place every second on a busy system. Combine the slow nature of human comprehension with multiple processors (and possibly threaded applcations), about all these tools can do is to approximate long term usage. These tools try to make measurements while the the very processes they are measuring disappear during the measurement period.&lt;BR /&gt; &lt;BR /&gt;It doesn't make any sense to track all the programs and add up the usage. Instead, you look at the 'interesting' processes, those which consume more than 5-10% of total CPU for the system. top is a good start, but keep in mind that there is nothing wrong with your system is these processes are supposed to consume large amounts of CPU. Of course, the trick is how to determine 'normal' application behavior.</description>
      <pubDate>Sat, 20 Aug 2005 17:00:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607807#M233974</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-08-20T17:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607808#M233975</link>
      <description>This is part of our performance monitoring process.  I will plot the total CPU usage as well as CPU usage of groups of processes that are related.  When I plot these graphs, I would like to see them add up.</description>
      <pubDate>Mon, 22 Aug 2005 07:29:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607808#M233975</guid>
      <dc:creator>Charles Li_1</dc:creator>
      <dc:date>2005-08-22T07:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607809#M233976</link>
      <description>We do not have sar or sat.&lt;BR /&gt;All I got is ps, top and vmstat.&lt;BR /&gt;&lt;BR /&gt;Anyways, I am using the same ps parameters to get the CPU usage, and its not adding up to what top and vmstat is displaying.&lt;BR /&gt;Even when I add up %CPU from top, it does not match top's cpu usage.</description>
      <pubDate>Mon, 22 Aug 2005 11:26:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607809#M233976</guid>
      <dc:creator>Charles Li_1</dc:creator>
      <dc:date>2005-08-22T11:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607810#M233977</link>
      <description>As Bill has explained in his post, any tool that you are going to run is going to be too slow to capture every instant of the cpu usage. Otherwise your cpu should do nothing but monitoring itself, which is quite oxymoron if you think about it.&lt;BR /&gt;&lt;BR /&gt;So, if you collec the cpu utilization data in a long term, and be content with some inaccuracies, you already have your answer above. If your are trying to get a 100% match between the decomposition of process cpu utilizations adding up to the total cpu utilization, you will never get there. There will always be a discrepancy regardless how small it is.</description>
      <pubDate>Mon, 22 Aug 2005 11:33:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607810#M233977</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2005-08-22T11:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607811#M233978</link>
      <description>sar is standard on all version of HP-UX. There is no sat program. You always run sar with an option and at least the interval as in:&lt;BR /&gt; &lt;BR /&gt;sar -u 1&lt;BR /&gt;HP-UX yoda B.11.11 U 9000/831    08/22/05&lt;BR /&gt;&lt;BR /&gt;12:39:33    %usr    %sys    %wio   %idle&lt;BR /&gt;12:39:34      47       4       0      50&lt;BR /&gt; &lt;BR /&gt;Note that to do all the graphs, HP has a very extensive program set in the GlancePlus product line which offers PerfView to create graphs of every metric (about 200+) measure by Glance.</description>
      <pubDate>Mon, 22 Aug 2005 11:45:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607811#M233978</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-08-22T11:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve cpu usage for all processes</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607812#M233979</link>
      <description>Charles,&lt;BR /&gt;&lt;BR /&gt;I'll have to agree with some of my other parnters in this post... it'll be down right hard to get it down to an exact amount. However, I have some good news.. there are some programs out there that can help with your graphs/measurements. One good one I've used in the past is called sarcheck. I also saved a bunch of money on my car insurance... jk. Check it out partner.&lt;BR /&gt;&lt;BR /&gt;Into the sunset,&lt;BR /&gt;&lt;BR /&gt;John E. Ophious</description>
      <pubDate>Tue, 23 Aug 2005 20:01:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-retrieve-cpu-usage-for-all-processes/m-p/3607812#M233979</guid>
      <dc:creator>John E.Ophious</dc:creator>
      <dc:date>2005-08-23T20:01:25Z</dc:date>
    </item>
  </channel>
</rss>

