strace (or tools like strace) can be used to monitor the low level system operations of a process.
Example of common command line to investigate if a process is hung: strace -f -o <output file name> -p <process ID of suspect process> After 5 seconds enter control-C to stop the capture of data.
Review the output file generated. Look to see if there is any thing written to the file. If nothing is written to the file the process is likely blocked or hung by something outside the process.
If the data shows activity, look to see if the data within the output file is repeating the same information. If the data shows repetition (either in a single line or multiple groups of lines repeating) the process may be stuck in some loop.
If the data is not repeating leave the process alone as it is performing some activity which will likely complete given sufficient time.
NOTE: If the investigation is to determine whether the process is caught in an endless loop and potentially causing the database BI to grow out of control the above conditions may warrant termination of the process to stop a possible endless loop. |