Solved

How to effectively measure CPU utilization in Unix?

Posted on 2015-02-15
4
148 Views
Last Modified: 2015-02-18
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
Comment
Question by:Errang Genevre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 19

Assisted Solution

by:simon3270
simon3270 earned 167 total points
ID: 40610694
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
 
LVL 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 166 total points
ID: 40611380
You could try htop (if you have that installed), it's more advanced than top and has a more friendly interface.
0
 
LVL 32

Accepted Solution

by:
Kamran Arshad earned 167 total points
ID: 40613581
Hi,

Monit is a decent option so is Htop;

http://mmonit.com/monit/
0
 

Author Closing Comment

by:Errang Genevre
ID: 40616093
Thanks!
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question