- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cpu utilization
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:08 PM
09-25-2001 12:08 PM
cpu utilization
i have looked at getconf and sysconf but they do not seem to have this variable as a return.
Thanks, bob giuffre
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:24 PM
09-25-2001 12:24 PM
Re: cpu utilization
-Santosh
P.S. Hi bob :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:28 PM
09-25-2001 12:28 PM
Re: cpu utilization
Take a look at pstat(). See "man 2 pstat". 'ps' uses this interface to gather much of its information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:29 PM
09-25-2001 12:29 PM
Re: cpu utilization
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:43 PM
09-25-2001 12:43 PM
Re: cpu utilization
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 12:53 PM
09-25-2001 12:53 PM
Re: cpu utilization
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.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:09 PM
09-25-2001 01:09 PM
Re: cpu utilization
Ah, the Heisenberg Uncertainty Principal... ;-)
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:11 PM
09-25-2001 01:11 PM
Re: cpu utilization
Arggg...flashbacks from high school chemistry :-)
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:12 PM
09-25-2001 01:12 PM
Re: cpu utilization
However, I cannot afford to kick off another process, program, or SNMP call within my system.
Any ideas for a system call to give me a snapshot of the cpu utilization?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:15 PM
09-25-2001 01:15 PM
Re: cpu utilization
Remember orbital hybridization? Well, neither do any of my students!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:19 PM
09-25-2001 01:19 PM
Re: cpu utilization
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.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:20 PM
09-25-2001 01:20 PM
Re: cpu utilization
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:24 PM
09-25-2001 01:24 PM
Re: cpu utilization
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.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:37 PM
09-25-2001 01:37 PM
Re: cpu utilization
Do you already have any data collected (sar, measureware) then you can analyze the data on a different machine.
BTW, thanks to my chemistry classes, i still know and love "C2H5OH (ethyl alcohol)" ;-)
Just an atom of thought
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 01:40 PM
09-25-2001 01:40 PM
Re: cpu utilization
...well, you have to admint that wave theory and electron shells (no pun intended) were interesting!
Regards to all!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 02:08 PM
09-25-2001 02:08 PM
Re: cpu utilization
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 ;-)
Disclaimer: If you want the HP's promise of 5 Nines then you wouldn't want to try the above recommendation.
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 02:18 PM
09-25-2001 02:18 PM
Re: cpu utilization
Have a look at the thread below.
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=26e1f7dc1564e535a8/screen=ckiDisplayDocument?docId=200000056493259
Hope this helps.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2001 11:27 PM
09-25-2001 11:27 PM
Re: cpu utilization
Back to basic principles - you cannot get something for nothing, and you have to balance the equation.
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).
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.
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2001 10:21 AM
09-26-2001 10:21 AM
Re: cpu utilization
pstat_getdynamic is just fine.
It is a system call that does not start another process.
Folks are just being pedantic trying to point out that your program making the system call is a process.
A program can call pstat_getproc to find out how much cpu time one particular process is using.
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.
P.S. Watch out for changes to the reported load average that occured in 11i. They are changed back in patch PHKL_24551.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2001 11:35 AM
09-26-2001 11:35 AM
Re: cpu utilization
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.
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2001 12:15 PM
09-26-2001 12:15 PM
Re: cpu utilization
If you do a strings on sadc, you can clearly see all the pstat routines. The problem here is, either you need to write a program or embed these routines in the C programs that are already running. You cannot simply run them at the command prompt and get the CPU utilization. Even if you write a small C program, it will become a process. This is the reason why all the Quantum Mechanics has been brought up.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2001 12:26 PM
09-26-2001 12:26 PM
Re: cpu utilization
Here is the real question: Do you have access to the source code of the programs running on these machines? If so, you can add in the function discussed above. If not, there is not much you can do.
Pedantically yours,
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2001 04:43 PM
09-26-2001 04:43 PM
Re: cpu utilization
You should be looking at the output of glance, top,
sar, or something for a few minutes to get a feel
for where your resources are being maxed out.
If you have idle cpu or excessive sys load then
you may be able to tune your way of the the corner.
See if you can find five or ten minutes a day at near
peek load to identify the bottlenecks. Then you can
move the bottleneck towards a resource that isn't
overloaded.
If you have no idle time, you may have some processes
you can nice down or move elsewhere to free up
some cpu.