Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

How to effectively measure CPU utilization in Unix?

Hello,

I'm trying to determine how much stress a process puts on the CPU in GNU/Linux.

I've tried the 'top' command; but that doesn't save the details I need; and also it shows percentages that are greater than 100% on multiple processes, so I'm not sure how to utilize it properly.

Are there any shell/python scripts I could use to accomplish this?

Appreciate any help on this!
0
Errang Genevre
Asked:
Errang Genevre
3 Solutions
 
simon3270Commented:
Depending on your Linux version you may be able to use "top -b" to run top repeatedly but just stream the output rather than do it page by page.  You redirect that to a file for later analysis.

As for the cpu percentage,  just divide by the number of cpus to get it to a 0-100% range.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
You could try htop (if you have that installed), it's more advanced than top and has a more friendly interface.
0
 
Kamran ArshadIT AssociateCommented:
Hi,

Monit is a decent option so is Htop;

http://mmonit.com/monit/
0
 
Errang GenevreAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now