On Thu, Mar 27, 2008 at 12:14:56PM +0100, Piotr Jasiukajtis wrote:
> Hi,
> 
> Is there any way to enable symbols of WCHAN output from 'ps -l' ?
> 
> # ps -al
>  F S    UID   PID  PPID   C PRI NI     ADDR     SZ    WCHAN TTY         TIME 
> CMD
>  0 S   1500   627   615   0  40 20 d72658a8    793 d7265914 pts/2
>  0:00 Xsession
>  0 S   1500   615   613   0  40 20 d725c9c8   1265 d725ca34 pts/2
>  0:00 ksh93
>  0 S   1500   629   627   0  40 20 d725b8b8  14408 d7b080f2 pts/2
>  0:01 gnome-se
>  0 S   1500   645     1   0  40 20 d725b030   1351 d80ca872 pts/2
>  0:00 gnome-ke

The ps wchan stuff is an unfortunate legacy: wchan is more complex than a
single address in Solaris in some cases, and also we don't want ps to
become a user+kernel debugger, which is what is required to properly
decode all of the cases.  Also the notion of a single WCHAN for a single
PID is an entirely antiquated notion because my process can have 100
threads, each waiting on something different, simultaneously.  WCHAN
dates from the days of 1 process = 1 thread.  In general if you want to
see what something is waiting on use pstack or a debugger like mdb.

-Mike

-- 
Mike Shapiro, Sun Microsystems Fishworks. blogs.sun.com/mws/

Reply via email to