Home » Infrastructure » Unix » scripts for monitoring UNIX space
scripts for monitoring UNIX space [message #246685] Thu, 21 June 2007 11:28 Go to next message
swami_tvk
Messages: 5
Registered: June 2007
Junior Member
Sir


I am new to oracle DBA. I would like to know the script to monitor unix space in oracle. Would you please help me?


Thanx

swami
Re: scripts for monitoring UNIX space [message #246687 is a reply to message #246685] Thu, 21 June 2007 11:30 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
GOOGLE is your friend, but only when you USE it!
Results 1 - 10 of about 1,420,000 for oracle monitor disk space unix. (0.1
Re: scripts for monitoring UNIX space [message #246695 is a reply to message #246685] Thu, 21 June 2007 11:35 Go to previous messageGo to next message
swami_tvk
Messages: 5
Registered: June 2007
Junior Member


Thank you for your reply
Re: scripts for monitoring UNIX space [message #246728 is a reply to message #246695] Thu, 21 June 2007 12:59 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
some thing like this>>> CUstomize it
#!/bin/ksh -x
. $HOME/.profile_DB
$ORACLE_HOME/bin/sqlplus /NOLOG <<HERE
-- Exit with failure, if SQL, PL/SQL or OS error is raised in top level proc
WHENEVER SQLERROR EXIT FAILURE;
WHENEVER OSERROR EXIT FAILURE;
CONNECT oracle/DREAMZ
#----------------------------------------------------------------------------------------------------------------
print    "\n---  Reporting FREE Space in Tablespaces  ---  \n">>$STATS_LOG

$ORACLE_HOME/bin/sqlplus /NOLOG <<HERE
-- Exit with failure, if SQL, PL/SQL or OS error is raised in top level proc
WHENEVER SQLERROR EXIT FAILURE;
 WHENEVER OSERROR EXIT FAILURE;
--
#-----------------------------------------------------------------------------------------------------------------
print    "\n--- Reporting MOUNT POINT Disk Space Usage (df -lk)  ---  \n">>$STATS_LOG

df -lk >> $STATS_LOG

retcode=$?
if [ $retcode != '0' ]; then
   print "FATAL ERROR: Reporting MOUNT POINT Disk Space Usage... failed: status $retcode; ERRNO $ERRNO \n">>$STATS_LOG
   ERROR_FLG='1'
else
   print "\n---  Reporting MOUNT POINT Disk Space Usage (df -lk)... COMPLETED!  ---  \n">>$STATS_LOG
fi

[Updated on: Thu, 21 June 2007 12:59]

Report message to a moderator

Re: scripts for monitoring UNIX space [message #246739 is a reply to message #246728] Thu, 21 June 2007 13:22 Go to previous messageGo to next message
swami_tvk
Messages: 5
Registered: June 2007
Junior Member


There is no words to praise You.
Re: scripts for monitoring UNIX space [message #246748 is a reply to message #246739] Thu, 21 June 2007 14:16 Go to previous message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
dont praise me Wink
Previous Topic: Check Crontab is Succesful or Not.
Next Topic: Badrecord Check in korn shell script
Goto Forum:
  


Current Time: Sat Dec 10 14:36:17 CST 2016

Total time taken to generate the page: 0.07520 seconds