How to trace a running process?

Using strace one can trace the system calls being executed by a running process. To stop the strace press control-C To display the system calls being executed $ strace -p <pid> or To display a summary of system calls being executed $ strace -cfo <logfile> -p <pid> Example: In this example smon process was being…

How to generate systemdump when the instance is hung?

Using oradebug one can analyze if an instance is hung $ sqlplus “/as sysdba” SQL> oradebug mysetpid Statement processed. — no limit on trace file SQL> oradebug unlimit Statement processed. SQL> oradebug hanganalyze 3 Hang Analysis in /u01/oradata/admin/TEST/udump/test_ora_11852.trc — Wait for couple of minutes SQL> oradebug hanganalyze 3 Hang Analysis in /u01/oradata/admin/TEST/udump/test_ora_11852.trc — Wait for…