Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB   


 

 

 


 

 

 Click here to order the book online!

Oracle9i UNIX Administration Handbook
Donald K. Burleson

Administer Oracle9i on all of the major UNIX platforms, including Solaris, HP-UNIX and IBM-UNIX, and Linux.

 

Descriptions of useful Oracle scripts from Oracle9i UNIX Administration Handbook by Oracle Press.

This is a collection if references to useful scripts that can be found in the Oracle9i UNIX Administration Handbook, (c) 2002 by Oracle Press.

Trend-based vmstat alert scripts for UNIX

The SQL script  vmstat_alert.sql can quickly give a complete exception report on all of the servers in our Oracle environment. This report will display times when the CPU and RAM memory exceed your predefined thresholds.

The standard vmstat alert report is used to alert the Oracle DBA and systems administrator to out-of-bounds conditions on each Oracle server. These conditions include:

·        CPU waits > 40% (AIX version only)This may indicate I/O-based contention. The solution is to spread files across more disks or add buffer memory.

·        Runqueue > xxx – (where xxx is the number of CPUs on the server, 2 in this example)This indicates an overloaded CPU. The solution is to add additional processors to the server.

·        Page_in > 2Page-in operations indicate overloaded memory. The solution is to reduce the size of the Oracle SGA, PGA, or add additional RAM memory to the server.

·        User CPU + System CPU > 90%This indicates periods where the CPU is highly utilized.

While the SQL here is self-explanatory, let’s look at a sample report and see how it will help our systems administrator monitor the server’s behavior:

SQL> @vmstat_alert 7

Wed Dec 20                                                             page    1
                                 run queue > 2
                         May indicate an overloaded CPU.
                    When runqueue exceeds the number of CPUs
                  on the server, tasks are waiting for service.
 

SERVER_NAME     date       hour      runq pg_in pg_ot  usr  sys  idl      
--------------- -------------------- ---- ----- ----- ---- ---- ----      
AD-01           00/12/13    17          3     0     0   87    5    8      


Wed Dec 20                                                             page    1
                                  page_in > 1
                         May indicate overloaded memory.

               Whenever Unix performs a page-in, the RAM memory
         on the server has been exhausted and swap pages are being used.

SERVER_NAME       date       hour      runq pg_in pg_ot  usr  sys  idl      
----------------- -------------------- ---- ----- ----- ---- ---- ----      
AD-01             00/12/13    16          0     5     0    1    1   98      
AD-01             00/12/14    09          0     5     0   10    2   88      
AD-01             00/12/15    16          0     6     0    0    0  100      
AD-01             00/12/19    20          0    29     2    1    2   98      
PROD1DB           00/12/13    14          0     3    43    4    4   93      
PROD1DB           00/12/19    07          0     2     0    1    3   96      


 

One of the jobs of the Oracle tuning expert is to monitor the database and the server for regular trends. This is not just an exercise in searching for trends because every database will exhibit regular patterns of CPU and memory consumption.

Using the stats$vmstat table, it is very easy to write a query that will aggregate the CPU and memory. Below is a sample SQL script that aggregates server values:

 

To get details on this technique, Click here to order the book online!


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2011 by Burleson Enterprises

All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.