[ACCEPTED]-How do I tell what a Linux process is waiting for?-process

Accepted answer
Score: 16

Whatever process it is, you use top to check 5 the state. Then you could run it through 4 truss or strace. That should detail what is going on. If 3 that is not possible, hook it up to gdb. Tools 2 like iostat might show you in general what is 1 going on (e.g. if disk is bottleneck).

Score: 9

You could use the strace command to see what your 3 process is up to. You might also find it 2 useful to run lsof on your process to see what 1 files and sockets it is using.

Score: 8

strace is your friend, because you can get 5 the time spent into each system call, plus 4 you can select the file descriptors and 3 system call you are interested in. But you 2 also can get support from the kernel : have 1 a look at latencytop

More Related questions