Hi... If I want to know which particular user is really hogging the system, can I know that ?? I am not really looking for which datafile has most disk reads, or IO but something similar to this..
I did a top command in unix and it shows these results..
oracle@CG_JDA1:/home/oracle/admin/ODBMSPRD/bdump_> top
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
wccprod 139834 27.1 0.0 7272 6212 - A 14:51:34 2:02 /home/wcc/app_sh
oracle 123160 16.3 1.0 48204 33448 - A 14:50:09 1:41 oracleODBMSPRD
Hoping that I can trace the oracle process further I did..
oracle@CG_JDA1:/home/oracle/admin/ODBMSPRD/bdump_> ps -ef|grep 123160
oracle 96892 138284 0 14:56:48 pts/10 0:00 grep 123160
oracle 123160 1 0 14:50:09 - 1:41 oracleODBMSPRD (LOCAL=NO)
SQL> l
1 select substr(username,1,8) username, substr(osuser,1,10) osuser, process osprocess,
2 substr(machine,1,20) host,substr(terminal,1,10) terminal, type, sid, serial#,
3 substr(program ,1,25) program
4* from v$session where process = '123160'
SQL> /
no rows selected
Why would I get "no rows" ..
I basically want to find the user who is responsible for close to 16% of cpu-usage by having the Unix PID, (in v$session it is process)..
Please advise.. what am I missing here or where should I be looking at?
select substr(S.username,1,8) username, substr(osuser,1,10) osuser, process osprocess,
substr(machine,1,20) host,substr(P.terminal,1,10) terminal, type, sid, S.serial#,
substr(S.program ,1,25) program
from v$session S, V$PROCESS P
where P.pid = '123160'
and S.paddr=P.addr
OS process id is basically stored in pid column of V$PROCESS.
select P.spid "OS Thread", S.username "Name-User", S.osuser, S.program
from V$PROCESS P, V$SESSION S
where P.addr = S.paddr
and S.username is not null;
Bookmarks