1752781 Members
6545 Online
108789 Solutions
New Discussion юеВ

Re: ps Question

 
George Nikoloudis_1
Frequent Advisor

ps Question

Hello
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
George
5 REPLIES 5
Sanjay_6
Honored Contributor

Re: ps Question

Hi,

Do a "man ps".

Hope this helps.

regds
Helen French
Honored Contributor

Re: ps Question

hey,

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:

http://www.docs.hp.com/hpux/onlinedocs/B2355-90680/B2355-90680.html

Shiju
Life is a promise, fulfill it!
Wodisch
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 :-(

HTH,
Wodisc
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,
Rita
Romeo_Lou
Advisor

Re: ps Question

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