Cory Petkovsek wrote:

> What does 'select' mean?   What about unix_stream_data_wait, wait4,
> read_chan, nanosleep.  That is what is the process waiting on.
> Selecting what? polling what? 
> 
> unix_stream_data_wait?  Where can I learn about which data stream it is
> waiting on?  Will lsof tell me? (I guess I can look there.)

If there's a specific process you want info on, try strace.  Strace
will print all the system calls a process uses.  If a process is
hanging, waiting on something, select will just print one syscall.

For example, I have an xterm process, PID 1785.

> > ps l 1785
>   F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND
> 000 13935  1785  1738   9   0  5292 3052 do_sel S    ?          0:00 xterm
> > strace -p 1785
> select(5, [3 4], [], NULL, NULL <unfinished ...>
> > ls -l /proc/1785/fd
> total 0
> lr-x------    1 bmiller  engr           64 Oct  7 16:47 0 -> /dev/null
> l-wx------    1 bmiller  engr           64 Oct  7 16:47 1 -> /dev/null
> l-wx------    1 bmiller  engr           64 Oct  7 16:47 2 -> /dev/null
> lrwx------    1 bmiller  engr           64 Oct  7 16:47 3 -> socket:[2537]
> lrwx------    1 bmiller  engr           64 Oct  7 16:47 4 -> /dev/ptmx

I see that it's currently selecting for read on descriptor 3, a
socket, and descriptor 4, /dev/ptmx.  (I happen to know that
descriptor 3 is its connection to the X server.)

I haven't figured out how to map the socket numbers in /proc/*/fd into
anything meaningful.

Does that help you?

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to