When I do 'top', I learn that there are many processes running out of which many are in sleep state. I need to see complete snapshot of all processes at that point. the 'top' is able to show listing of processes, which fit in one screen.How do I get complete listing?

Among other things, I am interested in seeing list of all processes, which are in "sleeping" state. I don't think, I can get process state in output of "ps" command

  • 1
    See if you have htop. Its process list is scrollable.
    – manatwork
    Apr 11, 2012 at 12:13

2 Answers 2


top -b seems to be doing the trick.

  • 2
    Adding -n1 option will gives one full page then exit.
    – enzotib
    Apr 11, 2012 at 13:03
  • 2
    Unfortunately this does not allow interactive operation. Jul 14, 2014 at 11:42
  • 1
    Note: although the question was tagged linux, top -l1 works in OS X/macOS to list all processes with states, although %CPU will be incorrect for a single sample with -l, as it is calculated using the delta between samples. Nov 29, 2016 at 14:25
  • @GaryS.Weaver thanks! Jul 23, 2019 at 23:56

You can get process states with coreutils ps

$ ps aux

will list all that, and more. Here's how you can decode them, from the man page:


Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:

   D    uninterruptible sleep (usually IO)
   R    running or runnable (on run queue)
   S    interruptible sleep (waiting for an event to complete)
   T    stopped, either by a job control signal or because it is being traced.
   W    paging (not valid since the 2.6.xx kernel)
   X    dead (should never be seen)
   Z    defunct ("zombie") process, terminated but not reaped by its parent.

For BSD formats and when the stat keyword is used, additional characters may be displayed:

   <    high-priority (not nice to other users)
   N    low-priority (nice to other users)
   L    has pages locked into memory (for real-time and custom IO)
   s    is a session leader
   l    is multi-threaded (using CLONE_THREAD, like NPTL pthreads do)
   +    is in the foreground process group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.