Showing results for 
Search instead for 
Did you mean: 

ps Question

George Nikoloudis_1
Frequent Advisor

ps Question

I have attached a file for the process output from ps. Can somebody exaplain the output header.
e.g. what does it mean F,WCHAN etc

Thanks a lot
Honored Contributor

Re: ps Question


Do a "man ps".

Hope this helps.

Helen French
Honored Contributor

Re: ps Question


wchan - The event for which the process is waiting or sleeping; if there is none, a hyphen (-) is displayed !

See man ps for all details.

or see this:

Life is a promise, fulfill it!
Honored Contributor

Re: ps Question

Hello George,

guess what, the man page is not that helpful, is it? ;-)
Well, "F" is the easier one, since there are only a few values possible states:
0=Nonexistent, S=Sleeping, W=Waiting, R=Running, I=Intermediate, Z=Zombie=Terminated, T=Traced, X=Growing
The states "S" and "W" are the ones where you are interested in the "WCHAN", which is the "Wait CHANnel". Take a file I/O, for example: your process reads or writes to/from a file. Of course, this means a buffer in the UNIX buffer cache is used in between your process and the real hardware to buffer that I/O. So on reading your process "waits" on that buffer to become available - then "WCHAN" is the address of that buffer in kernel memory (well, it is that buffer's "hash bucket", but that does not really matter). The important fact is, that two processes waiting on the same WCHAN do actually wait for the same thing to happen.

BTW, do not worry about that state "Z" as "zombie" AND as "terminated" - every process, when dieing, send a signal (SIGCHLD = Death of a Child) to its parent process and then stays in state "Z" until that signal has been processed by the parent process. Then the child dies and rots away immediately. That's just how processes die in UN*X! Only if the parent process CANNOT process the signal, the child STAYS as a zombie (due to errors) and these nobody likes :-(

Rita C Workman
Honored Contributor

Re: ps Question

wchan = the event for which the process is sleeping or waiting. If there is none than a hyphen is displayed.

Hope that helps,

Re: ps Question

Dear Wodisc :
Is "Wait CHANnel" = Take a file I/O ?