<?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: cpu utilization in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584800#M856293</link>
    <description>Well I suppose you could write a program that makes a system call to the pstat routines, more specificially pstat_getprocessor.&lt;BR /&gt;&lt;BR /&gt;-Santosh&lt;BR /&gt;&lt;BR /&gt;P.S. Hi bob :-)</description>
    <pubDate>Tue, 25 Sep 2001 19:24:59 GMT</pubDate>
    <dc:creator>Santosh Nair_1</dc:creator>
    <dc:date>2001-09-25T19:24:59Z</dc:date>
    <item>
      <title>cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584799#M856292</link>
      <description>I need to determine my cpu utilization without spawning a process.  top, glance, and sar cannot be used.  does anyone know of a system call that will return the cpu utilization?&lt;BR /&gt;&lt;BR /&gt;i have looked at getconf and sysconf but they do not seem to have this variable as a return.&lt;BR /&gt;&lt;BR /&gt;Thanks,  bob giuffre</description>
      <pubDate>Tue, 25 Sep 2001 19:08:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584799#M856292</guid>
      <dc:creator>bob giuffre</dc:creator>
      <dc:date>2001-09-25T19:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584800#M856293</link>
      <description>Well I suppose you could write a program that makes a system call to the pstat routines, more specificially pstat_getprocessor.&lt;BR /&gt;&lt;BR /&gt;-Santosh&lt;BR /&gt;&lt;BR /&gt;P.S. Hi bob :-)</description>
      <pubDate>Tue, 25 Sep 2001 19:24:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584800#M856293</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-09-25T19:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584801#M856294</link>
      <description>Hi Bob:&lt;BR /&gt;&lt;BR /&gt;Take a look at pstat().  See "man 2 pstat".  'ps' uses this interface to gather much of its information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Sep 2001 19:28:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584801#M856294</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-09-25T19:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584802#M856295</link>
      <description>Also, if you have measureware already running on this system you can use PerfView from another system to connect to this system and get performance data.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Tue, 25 Sep 2001 19:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584802#M856295</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-09-25T19:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584803#M856296</link>
      <description>You might want to check pstat_getdynamic routine.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 25 Sep 2001 19:43:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584803#M856296</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-25T19:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584804#M856297</link>
      <description>You can code the 'pstat' function in a C program, but it too will use a process to run.  I don't see how you can get real time monitoring of the CPU without some kind of process running.  You can use MeasureWare or sar to get the CPU usage after the fact.&lt;BR /&gt;&lt;BR /&gt;What exactly are you trying to measure?  Do you have a system that is so loaded that you can't run top/glance/sar?  Or are you trying to just measure the performance of a particular program?  There are some ways to measure things, but you have to give up something to do it.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2001 19:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584804#M856297</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-09-25T19:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584805#M856298</link>
      <description>Hi (again) Bob:&lt;BR /&gt;&lt;BR /&gt;Ah, the Heisenberg Uncertainty Principal... ;-)&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Sep 2001 20:09:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584805#M856298</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-09-25T20:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584806#M856299</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Arggg...flashbacks from high school chemistry :-)&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Tue, 25 Sep 2001 20:11:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584806#M856299</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-09-25T20:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584807#M856300</link>
      <description>Thanks everyone for the fast replies.&lt;BR /&gt;&lt;BR /&gt;However, I cannot afford to kick off another process, program, or SNMP call within my system.&lt;BR /&gt;&lt;BR /&gt;Any ideas for a system call to give me a snapshot of the cpu utilization?</description>
      <pubDate>Tue, 25 Sep 2001 20:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584807#M856300</guid>
      <dc:creator>bob giuffre</dc:creator>
      <dc:date>2001-09-25T20:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584808#M856301</link>
      <description>Please!! I taught high school chemistry for four years.&lt;BR /&gt;&lt;BR /&gt;Remember orbital hybridization?  Well, neither do any of my students!!</description>
      <pubDate>Tue, 25 Sep 2001 20:15:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584808#M856301</guid>
      <dc:creator>bob giuffre</dc:creator>
      <dc:date>2001-09-25T20:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584809#M856302</link>
      <description>Bob, &lt;BR /&gt;&lt;BR /&gt;Unfortunately, I don't believe there's any way to make a system call without spawning another process...again, if you already have measureware running, you can connect to the measureware daemons from another machine using perfview...but short of that, I think you're out of luck.&lt;BR /&gt;&lt;BR /&gt;-Santosh</description>
      <pubDate>Tue, 25 Sep 2001 20:19:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584809#M856302</guid>
      <dc:creator>Santosh Nair_1</dc:creator>
      <dc:date>2001-09-25T20:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584810#M856303</link>
      <description>You wrote you tried getconf. Even if it worked, it's a command again, and is going to spawn a process. You gotta somehow solve the schodinger's equation to get the status of the particle.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Tue, 25 Sep 2001 20:20:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584810#M856303</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2001-09-25T20:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584811#M856304</link>
      <description>Oh no!  Chemistry?  I flunked that my first year in college and had to take it again!  :)&lt;BR /&gt;&lt;BR /&gt;Hmmmm.   If you are running on a K-class or a V-class system, you can look at the LCD display on the side and see the CPU usage in one of the digits displayed.  I'm not sure if you can get similar information from other classes of systems, but if you can, these wizards will know how to do it.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2001 20:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584811#M856304</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2001-09-25T20:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584812#M856305</link>
      <description>Hi Bob,&lt;BR /&gt;&lt;BR /&gt;Do you already have any data collected (sar, measureware) then you can analyze the data on a different machine.&lt;BR /&gt;&lt;BR /&gt;BTW, thanks to my chemistry classes, i still know and love "C2H5OH (ethyl alcohol)" ;-)&lt;BR /&gt;&lt;BR /&gt;Just an atom of thought&lt;BR /&gt;&lt;BR /&gt;-Regards&lt;BR /&gt;Ramesh</description>
      <pubDate>Tue, 25 Sep 2001 20:37:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584812#M856305</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2001-09-25T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584813#M856306</link>
      <description>Hi Folks:&lt;BR /&gt;&lt;BR /&gt;...well, you have to admint that wave theory and electron shells (no pun intended) were interesting!&lt;BR /&gt;&lt;BR /&gt;Regards to all!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 25 Sep 2001 20:40:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584813#M856306</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-09-25T20:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584814#M856307</link>
      <description>Hi Bob,&lt;BR /&gt;&lt;BR /&gt;I know of a way to check the CPU utilization without spawning another process on the running system, TURN the POWER OFF, the CPU utilization will definitely be known ;-)&lt;BR /&gt;&lt;BR /&gt;Disclaimer: If you want the HP's promise of 5 Nines then you wouldn't want to try the above recommendation.&lt;BR /&gt;&lt;BR /&gt;-Regards&lt;BR /&gt;Ramesh</description>
      <pubDate>Tue, 25 Sep 2001 21:08:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584814#M856307</guid>
      <dc:creator>linuxfan</dc:creator>
      <dc:date>2001-09-25T21:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584815#M856308</link>
      <description>Hi Bob,&lt;BR /&gt;&lt;BR /&gt;Have a look at the thread below.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://us-support2.external.hp.com/cki/bin/doc.pl/sid=26e1f7dc1564e535a8/screen=ckiDisplayDocument?docId=200000056493259" target="_blank"&gt;http://us-support2.external.hp.com/cki/bin/doc.pl/sid=26e1f7dc1564e535a8/screen=ckiDisplayDocument?docId=200000056493259&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2001 21:18:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584815#M856308</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2001-09-25T21:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584816#M856309</link>
      <description>Hi Bob&lt;BR /&gt;&lt;BR /&gt;Back to basic principles - you cannot get something for nothing, and you have to balance the equation.&lt;BR /&gt;&lt;BR /&gt;No matter what you do you will have to use a process to get it. If your machine is that loaded that you cannot use another process then you are in deep dodo. (Technical expression meaning in a waterey place without a paddle).&lt;BR /&gt;&lt;BR /&gt;top -q -d 1 - will jump in and out of top and produce just one screen display the -q will force top in at a high priority and get the info.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 26 Sep 2001 06:27:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584816#M856309</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-09-26T06:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584817#M856310</link>
      <description>There seems to be a deep misunderstanding here.&lt;BR /&gt;pstat_getdynamic is just fine.&lt;BR /&gt;It is a system call that does not start another process.&lt;BR /&gt;Folks are just being pedantic trying to point out that your program making the system call is a process.&lt;BR /&gt;A program can call pstat_getproc to find out how much cpu time one particular process is using.&lt;BR /&gt;I have attached one example program that calls pstat_getdynamic to get the load average.  I also included an example program that watches its own behavior and tries to maintain a specific cpu load.&lt;BR /&gt;&lt;BR /&gt;P.S. Watch out for changes to the reported load average that occured in 11i.  They are changed back in patch PHKL_24551.</description>
      <pubDate>Wed, 26 Sep 2001 17:21:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584817#M856310</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2001-09-26T17:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: cpu utilization</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584818#M856311</link>
      <description>Thanks for all the replies....I think we are heading in the right direction.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, the systems in question are pretty much maxed out.  I can't run either 'sar' or 'top' because these will take resources. The current strategy of using an SNMP get from the MIB also takes resources.&lt;BR /&gt;&lt;BR /&gt;I need something like the low level call that 'sar' makes to the system to get the cpu value, then have this process quit.  I can then invoke this as needed.  Any suggestions?</description>
      <pubDate>Wed, 26 Sep 2001 18:35:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cpu-utilization/m-p/2584818#M856311</guid>
      <dc:creator>bob giuffre</dc:creator>
      <dc:date>2001-09-26T18:35:05Z</dc:date>
    </item>
  </channel>
</rss>

