Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TO find CPU and IO bound processes in the system

Posted on 2003-11-21
5
Medium Priority
?
663 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

636 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