[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

TO find CPU and IO bound processes in the system

Posted on 2003-11-21
5
Medium Priority
?
669 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
3 Comments
 
LVL 51

Accepted Solution

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

Assisted Solution

by:shivsa
shivsa earned 164 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 164 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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 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