How to capture CPU utilization efficiently in various Unix m/c’s?

455 pts.
Tags:
AIX
CPU usage
CPU Utilization
Linux
Solaris
Unix
We need to capture CPU utilization while load run of our testing in different environments (solaris, Linux, AIX) with single or multi cpu's. In Solaris, presently we are capturing CPU utlization using prstat. In Linux there are many commands like vmstat, mpstat, top, sar etc. Which is the best and reliable command?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Let me be specific in the above question.
I need capture CPU utlization for a <b>process</b> in various env’s.

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    On linux, we use "top", and it has been very useful and reliable, And for Solaris, we use prstat too. Regards,
    69,045 pointsBadges:
    report
  • Saimadhu
    In linux, i used the followin command for CPU utilization. ps -eo pid,pcpu,args |grep <process name> But many people think that this will not give correct CPU utilization. Any reason for this ?
    455 pointsBadges:
    report
  • carlosdl
    I think that is because the CPU usage from ps is not the "current" CPU usage, but an average. This is from an Ubuntu man page: "CPU usage is currently expressed as the percentage of time spent running during the entire lifetime of a process. This is not ideal, and it does not conform to the standards that ps otherwise conforms to. CPU usage is unlikely to add up to exactly 100%." and this from other linux man page: "%CPU shows the cputime/realtime percentage. It will not add up to 100% unless you are lucky. It is time used divided by the time the process has been running. "
    69,045 pointsBadges:
    report
  • Saimadhu
    In Intel Core Duo, the percentage of CPU utilization by top command shown as more than 100% (200%, etc). Why?
    455 pointsBadges:
    report
  • carlosdl
    I think it is because it sees the core duo as if it has two processors. How does it show CPU usage if you turn off the "single cpu" mode, by pressing the "1" key ?
    69,045 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following