Solved

TO find CPU and IO bound processes in the system

Posted on 2003-11-21
5
653 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
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

895 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

19 Experts available now in Live!

Get 1:1 Help Now