Search notes:

oradebug hanganalyze

MOS Note 215858.1 says that hanganalyze users internal kernel calls to determine if a session is waiting for a resource and reports the relationships between waiters and blockers.
Apparently, it only dumps «interesting» processes.
$ sqlplus / as sysdba
…
oradebug setmypid
oradebug unlimit
oradebug hanganalyze
  … [ wait a minute or so, see MOS Note 4523581.1 ]
oradebug hanganalyze
oradebug tracefile_nameexit
10g and above (MOS Note 4523581.1)
oradebug setmypid
oradebug unlimit
oradebug -g all hanganalyze 3
oradebug -g all hanganalyze 3
oradebug -g all dump systemstate 258
oradebug -g all dump systemstate 258

Hanganalyze levels

1-2 Hanganalyze output only without process dump
3 In 11g onwards, level 3 also collects a short stack for relevant processes (i. e. processes thought to be) in hang chain (IN_HANG state)
4 Collects everything from level 3 and dumps leaf nodes (blockers) in wait chains
5 Collects everything from level 4 and dumps all processes involved in wait chains (NLEAF state)
10 Dumps all processes (IGN state)
Level 5 and 10 are generate huge amounts of data but are otherwise usually useless.

See also

A hanganalyze can alternatively also triggered with
alter session set events 'immediate trace name hanganalyze level <level>';
A cluster wide hanganalyze can be initiated with
oradebug setmypid
oradebug setinst all
oradebug -g def hanganalyze <level>
$ORACLE_HOME/rdbms/admin/hangdiag.sql

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758199020, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/tools/oradebug/hanganalyze/index(85): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78