select s.inst_id inst, s.sid,','||s.serial# serial, s.username, osuser, logon_time,
       s.module, replace(s.machine,'.uk.fid-intl.com') machine, s.event --,p.spid
from gv$session s, gv$process p
where s.inst_id = p.inst_id
  and s.paddr = p.addr
  and s.username is not null and s.status <> 'INACTIVE'
order by logon_time
/
