Solved

How to effectively measure CPU utilization in Unix?

Posted on 2015-02-15
4
139 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
4 Comments
 
LVL 19

Assisted Solution

by:simon3270
simon3270 earned 167 total points
Comment Utility
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 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 166 total points
Comment Utility
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
Comment Utility
Hi,

Monit is a decent option so is Htop;

http://mmonit.com/monit/
0
 

Author Closing Comment

by:Errang Genevre
Comment Utility
Thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now