Home » RDBMS Server » Server Administration » Resource Usage Calculation.
Resource Usage Calculation. [message #64427] Thu, 27 January 2005 20:46 Go to next message
V
Messages: 12
Registered: October 2001
Junior Member
Hi,

I am trying to calculate the resource used by a group of Database users for charge back purpose. I understand oracle resource manager does a resource allocation but does not keep track of actual consumed resource.

Can someone tell me on how to do this?

Thanks in advance,
V.
Re: Resource Usage Calculation. [message #64485 is a reply to message #64427] Tue, 01 February 2005 20:18 Go to previous message
Sreedhar Reddy
Messages: 55
Registered: January 2002
Member
the below query give you the CPU usage of each user.

select p.spid thread, s.username,
decode(nvl(p.background,0),1,bg.description,
s.program ) program,
ss.value/100 CPU,physical_reads disk_io,s.machine,to_char(logon_time,'dd-mon-yyyy hh:mi') LOGT
from v$process p,
v$session s,
v$sesstat ss,
v$sess_io si,
v$bgprocess bg
where s.paddr=p.addr
and ss.sid=s.sid
and ss.statistic#=12
and si.sid=s.sid
and bg.paddr(+)=p.addr
order by ss.value desc
Previous Topic: how to find out table names from the given datafile?
Next Topic: SOS : ORA-01578 error
Goto Forum:
  


Current Time: Fri Sep 27 04:19:58 CDT 2024