|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 1996 - 2009 by
Burleson Enterprises, Inc. All rights reserved.
Oracle® is the registered trademark
of Oracle Corporation. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||