View Single Post

   
  #8 (permalink)  
Old 01-05-2008, 10:47 AM
rmdashrsplat
 
Posts: n/a
Default Re: How to find out if process is in a loop?

Here's method I use on occassion:

1) Get the PID of the process in question (i.e. the process of the
program you are running)

2) truss -p PID > /tmp/truss.out 2>&1

3) sort /tmp/truss.out | uniq -c

The output of last command will be a list of system calls with the
number of times they repeated in the left hand column. If the process
is hung in in a loop, you will generally see a small amount of system
calls repeating over and over. If the output is widely varied, then
you can generally conclude there is no looping.

Brent

Reply With Quote