Hi,
You should list all User sessions ( Active and inactive ) in the Oracle database in case of Performance problem.
To list all User Sessions not Background, use following scripts. This script will list you just only User type sessions and their detais.
select * FROM gv$session s, gv$process p WHERE s.paddr = p.addr(+) and s.TYPE ='USER' and s.username!='SYS';
You can list how many Active and Inactive User sessions are in the Oracle database with following script.
select count(*) FROM gv$session s, gv$process p WHERE s.paddr = p.addr(+) and s.TYPE ='USER' and s.username!='SYS';
You can list only Active User sessions without sys user with following script
select count(*) FROM gv$session s, gv$process p WHERE s.paddr = p.addr(+) and s.TYPE ='USER' and s.username!='SYS' and status='ACTIVE';
You can list only Inactive User sessions without sys user with following script
select count(*) FROM gv$session s, gv$process p WHERE s.paddr = p.addr(+) and s.TYPE ='USER' and s.username!='SYS' and status='INACTIVE';
You can list all user sessions which are ACTIVE state more than 600 Second with following script.
select count(*) FROM gv$session s, gv$process p WHERE s.paddr = p.addr(+) and s.TYPE ='USER' and s.username!='SYS' and status='ACTIVE' and last_call_et > 600;