DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Tracing processes on OS

  1. #1
    Join Date
    Aug 2001
    Posts
    390
    If I have 8 databases running on the same machine and it's windows 2000 server, obviously, I will have 8 Oracle.exe running on this machine. The question is how do I know which process belongs to which database.

    Once I know which processes belongs to which database on the OS, does anyone have any query to find out which processes in the database uses the most resource of the database

    Thanks

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    if you have MKS Toolkit you can use PS in Windows such as

    Code:
    ps -ef grep ORA
    
    UID      PID   PPID C    STIME TTY     TIME CMD
    SYSTEM  2008   576  0 21:53:40 CONIN$  2:30 d:\oracle\ora81\bin\ORACLE.EXE DEV817
    SYSTEM   792   576  0 22:13:35 CONIN$  0:03 d:\oracle\ora90\bin\ORACLE.EXE DEV901
    where as process resource consumption in Windows check task manager (but here you dont know which oracle.exe is which) or do

    alter system set timed_statistics=true;

    and check v$sesstat for statistic# 11 and 12

    Now, that checks for CPU consumption, if you mean other consumption probably need to check other v$


  3. #3
    Join Date
    Jan 2002
    Posts
    1

    Red face tracing oracle processes in Unix

    I use this script which joins v$session to v$process to give you the os pid of all processes to the database and then allows you to select one PID to get more info about it from the database
    Usage is : findsession
    It is however for unix but you should be able to use the Oracle query part even if you can't adapt the rest.

    #!/bin/ksh
    if [ "$1" = "" ];then
    echo "Gimme a SID "
    exit 1
    else
    . /apps/oracle/env/$1
    ps -u oracle -o time -o stime -o pid -o comm | grep -i "oracle${ORACLE_SID}" | s
    ort |more
    echo ""
    echo "Please enter a PID: "
    read UnixPID
    sqlplus -s / << EOF
    select s.username , s.osuser , s.sid, s.serial# ,s.status from v\$session s, v\$process
    p
    where p.spid=${UnixPID} and s.paddr = p.addr
    /
    exit
    EOF
    fi


  4. #4
    Join Date
    Aug 2001
    Posts
    390
    Thanks for all the advise. I am running windows 2000 server, anyone else who had advises ???


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width