Enter your email address:

Delivered by FeedBurner

CPU load


StumbleUpon Toolbar

One important thing to check on your Linux box, is the CPU utilization, specially if usually compile software, or if you have server applications running on your PC.

One good tool to check this is: htop, which will show you a lot of useful information, the important data is the load average, that will show you if you are having processes waiting for the CPU or not.

the three numbers shows your the load average in the last 1 minute, 5 minutes and 15 minutes, so you will also see the trend of the CPU usage, and now how much is good and how much is overloaded?

Well it depends on how many CPUs your system have, one good explanation I have found about at: Linux Journal says:

The point of perfect utilization, meaning that the CPUs are always busy and, yet, no process ever waits for one, is the average matching the number of CPUs. If there are four CPUs on a machine and the reported one-minute load average is 4.00, the machine has been utilizing its processors perfectly for the last 60 seconds. This understanding can be extrapolated to the 5- and 15-minute averages.

Another important data shown here is the CPU percentage, which shows you the percentage of time your CPU was utilized by a process, if you need more detailed information, you can use: mpstat, to use this command you will have to install sysstat

apt-get install sysstat

or, if using Fedora or Centos

yum install sysstat

then you just need to run

mpstat

the output will be something like this:

01:06:46 AM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
01:06:46 AM  all    8.87    0.07   29.37    7.40    0.39    0.03    0.00   53.87   1523.97

If the command is given like this, with no parameters, it will shows you the percentages since the boot of the machine, read the mpstat man page for more details.

mpstat Focus on the CPU percentage and not on the CPU load average, if you want a tool that focus on that use: uptime and you will see something like this:

 01:16:19 up  3:09,  4 users,  load average: 0.69, 0.53, 0.42

You can always use top, to have all this and more information on the screen and on real time.

Trackback URL for this post:

http://www.go2linux.org/trackback/421
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting