Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Thursday, 12 July 2012

Script: To find shared server Average Wait time & Busy Report

--Show Average Wait Time per Request
SELECT DECODE ( totalq,  0, 'No Requests',
             (wait / totalq) * 100 || 'Seconds Request Wait'
       ) awt
  FROM v$queue
 WHERE TYPE = 'COMMON';
 --Show Average Wait Time per Response
 SELECT   network "Protocol",
         DECODE ( SUM (totalq), 0, 'No Responses',
               SUM (wait) / SUM (totalq) || ' hundredths of seconds' ) "Average Wait Time per Response"
    FROM v$queue q, v$dispatcher d
   WHERE q.TYPE = 'DISPATCHER' AND q.paddr = d.paddr
GROUP BY network
/
--Show dispatchers Percent Busy
SELECT   network protocol,
           (SUM (busy) / (  SUM (busy) + SUM (idle)
                         )
           )  * 100 busy
    FROM v$dispatcher
GROUP BY network;
--Show Dispatcher Wait Time
SELECT   network,
         DECODE ( SUM (totalq),  0, 'No responses',
               SUM (wait) / SUM (totalq) * 100 || 'Seconds Wait Per response'
         ) aw
    FROM v$queue q, v$dispatcher d
   WHERE q.TYPE = 'DISPATCHER' AND q.paddr = d.paddr
GROUP BY network;

1 comments:

  1. DreamHost is ultimately the best website hosting company with plans for any hosting needs.

    ReplyDelete