set pages 100
set lines 80
set heading off
break on wait_details skip 1
set linesize 132
select OSUSER||' ('||VS.USERNAME||') '||MACHINE||'  SID='||VS.SID
       ||'  Serial#='||VS.SERIAL#||'  Sequence='||SEQ#
       ||'  Shadow PID='||SPID wait_details, 
       'Event = '||EVENT, 
       'Wait time = '||wait_time,
       P1TEXT||' -- '||P1||chr(10)||
       P2TEXT||' -- '||P2||chr(10)||
       P3TEXT||' -- '||P3 text 
from v$session_wait vsw, v$session vs, v$process vp
where wait_time > 0
and   vsw.sid > 5
and   vsw.sid = vs.sid
and   vs.paddr = vp.addr
/
set heading on
