Call (800) 766-1884 for Oracle support & training
Free Oracle Tips


Oracle Consulting Support
Oracle Upgrades
Use New Oracle Features
Oracle Replication Support
Oracle Training
Remote Oracle DBA
System Documentation
Oracle Tips
Oracle Performance
 

Free Oracle Tips


 

HTML Text

BC Oracle tuning

Oracle training

Oracle support

Remote Oracle

Redneck
 

 

Oracle file system alert scripting

Donald K. Burleson

 

    

If you are using Oracle data files with the AUTOEXTEND ON option, you must carefully monitor the file system to make sure that an Oracle file system does not become full.

Oracle data files will continue to extend until they reach the end of the file system, and if the file system becomes full, the Oracle database will freeze-up.

Here is a simple Korn shell script that can be used to monitor UNIX file system and send you an e-mail whenever any file system has less than 10,000 bytes of free space.

If you check your e-mail frequently, you can avert disaster by adding space to the file system before it becomes 100% full.

#*********************************************

# File system alert monitor for HP/UX

#  (c) 2002 by Donald K. Burleson

#*********************************************

 

kb_free_num=10000

 

 

for free_space in `bdf|grep -v home|grep -v kbytes|awk '{ print $4 }'`

do

    free_space_num=`expr ${free_space}`

    if [ $free_space_num -lt ${kb_free_num} ]

    then

        bdf|grep $free_space

        bdf|grep $free_space|mailx -s "Filesystem < 10m Alert" \

        dburleson@online.com \

        Glinger@online.com \

        shring@mwconline.com

    fi

done

One this script is tested you can place it in a crontab file to execute every hour.  If we name the script mount_point.ksh, this would be the cron entry for hourly execution:

#**********************************************************

# This is the file system alert

#**********************************************************

00 * * * * /home/oracle/mon/mount_point.ksh > /home/oracle/mon/al.lst

If you like Oracle tuning, check out my latest book "Oracle Tuning: The Definitive Reference". 

It's 980 pages of hard-core tuning insights, tips and scripts, and you can buy it direct from the publisher for 30%-off.

Best of all, you get instant access to the code depot of Oracle tuning scripts.

”call

  
 

Oracle performance tuning software 
 
 
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 
   

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.