Tuesday, November 16, 2010

Process states in linux systems

Advertisements

There are many states for processes in linux environment. You can see the process states using the following commands.

#ps
#ps -ax       -From all users and terminals.
#ps -aux     -Shows Process owner also.

For the dynamic details:

#top
#top -c      -Sorts according to CPU usage.
#top   and pressing M(shift+m)  - sorts according to memory usage.

Main process states are as follows:


             D       Marks a process in disk (or other short term, uninterruptible) wait.
             I       Marks a process that is idle (sleeping for longer than about 20 seconds).
             R       Marks a runnable process.
             S       Marks a process that is sleeping for less than about 20 seconds.

             T       Marks a stopped process.
             Z       Marks a dead process (a ``zombie'').

Additional characters after these, indicates additional state information:

             +       The process is in the foreground process group of its control terminal.
             <       The process has raised CPU scheduling priority.
             >       The process has specified a soft limit on memory requirements and is currently exceeding that limit; such a process is (necessarily) not swapped.
             E       The process is trying to exit.
             L       The process has pages locked in core (for example, for raw I/O).
             N       The process has reduced CPU scheduling priority (see setpriority(2)).
             s       The process is a session leader.
             V       The process is suspended during a vfork(2).
             W       The process is swapped out.
             X       The process is being traced or debugged.

No comments:

Post a Comment

Be nice. That's all.