Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Location
    Barcelona
    Posts
    42

    Question Unanswered: informix onstat equivalent in oracle

    As I'm newbie in Oracle I would like to know how
    to monitor using onstat like comands from informix.

    For example.

    how can I monitor active statemens ?
    onstat -g sql

    how can I kill an active statement ?
    onmode -z PID

    how can I monitor disk space ?
    onstat -d

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Use the Enterprise Manager Console.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Feb 2005
    Location
    Barcelona
    Posts
    42
    Thanks, but I would like to know if it is possible to monitor that info
    from line command, in order to write shellscripts (Oracle on Linux)...

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    To do from shell script, you write SQL statements and execute with sqlplus, for example to monitor tablespace usage:
    Code:
    Col "Total Mb" Format 999,999,999,999.9
    Col "Total Used" Format 999,999,999,999.9
    Col "Total Free" Format 999,999,999,999.9
    Col "Pct Free" Format 999.9
    
    Select B.Tablespace_Name, B.Total/1048576 "Total Mb",
           Nvl((B.Total-A.Total_Free)/1048576, 100) "Total Used",
           Nvl(A.Total_Free/1048576, 0) "Total Free",
           Nvl((A.Total_Free/B.Total) * 100, 0) "Pct Free"
    From (
            Select Tablespace_Name, Sum(Bytes) Total_Free
            From Sys.Dba_Free_Space
            Group By Tablespace_Name
          ) A
        , (
            Select Tablespace_Name, Sum(Bytes) Total
            From Sys.Dba_Data_Files
            Group By Tablespace_Name
          ) B
    Where A.Tablespace_Name(+) = B.Tablespace_Name
    Order By 5,1
    /

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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