Solved

TO find CPU and IO bound processes in the system

Posted on 2003-11-21
5
660 Views
Last Modified: 2013-12-16
Hello.

The defination of load average says that it is the total number of ready-to-run processes and waiting-for-io processes averaged over 1 minute.
how do I find only the ready-to-run processes or only the waiting-for-io processes using this value and the cpu-utilized value.
(any information from sar,vmstat,iostat can be of help?)

Thank you.
0
Comment
Question by:tuxrhl
[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
5 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 43 total points
ID: 9802405
see STATE codes in "ps ax" output
man ps
0
 
LVL 24

Assisted Solution

by:shivsa
shivsa earned 41 total points
ID: 9804431
Also check utility TOP.(http://www.groupsys.com/top/
in the state field u find more information about processes whether they are sleeping(waiting for io),run( ready to  run), and cpu(currently running on this cpu).
in the header u can get the fair idea about the system, how many processes are there and all.
the webpage give u lot of information how to understand the output and all. in my opinion this is the best.

top
------------------
last pid: 20676;  load averages:  0.02,  0.05,  0.07             20:59:46
69 processes:  67 sleeping, 1 running, 1 on cpu
CPU states: 0.0% idle,  98.3% user,  1.6% kernel,  0.0% iowait,  0.0% swap
Memory: 512M real, 413M swap in use, 934M swap free

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
 6160 root       1  59    0 6016K 2592K run     9:06 98.06% pcgateway
14906 nobody     1  48    0   19M 5184K sleep 174:02  0.95% Collector_prog1
20673 dtucker    1  58    0 2592K 1792K cpu     0:03  0.66% top
  373 root       1  58    0   76M   13M sleep  21.4H  0.55% oserv
29562 root       1  58    0 2600K 1264K sleep   3:53  0.30% sshd
---------------------------

0
 
LVL 2

Assisted Solution

by:TheWeakestLink
TheWeakestLink earned 41 total points
ID: 9809541
Most (all?) of these utilities like vmstat, top etc. just read files in /proc to look at the kernel's various status snapshots.
I agree with shivsa about the "top" program, but be aware that top can give different info depending on how you set it up.  This applies particularly to the update frequency, and the "niceness" of various programs. Top itself can distort the figures it presents.  

Here's a small excerpt from the top man page on the area you're interested in.........

w: S  --  Process Status
          The status of the task which can be one of:
             'D' = uninterruptible sleep
             'R' = running
             'S' = sleeping
             'T' = traced or stopped
             'Z' = zombie

          Tasks  shown  as  running should be more properly thought of as 'ready to run'  --  their task_struct is simply represented on the Linux run-queue.  Even without a true SMP machine, you may see numerous tasks in this state depending on top's delay interval and nice  value.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.

705 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