Plotting the sleep/wait chain of a process

view story

http://unix.stackexchange.com – I often want to know why a process in the middle of a pipeline is sleeping and not busy processing data. My current method is: find the pid of interest sudo strace -pt pid to get the blocking syscall and object (fd, child, futex, etc.) hit ctrl+c to detach strace look up the appropriate object in /proc/pid grep /proc/ or use lsof to find the other end of the pipe or process being waited on repeat from #1 with the new pid This is a pretty slow process that combines a lot of tools that don't play well together (strace in particular is hard to automate). Is there a tool that will do this l (HowTos)