Home » Infrastructure » Unix » shell script to check the lsitener (oracle 10g unix)  () 1 Vote
shell script to check the lsitener [message #301096] Tue, 19 February 2008 03:30 Go to previous message
daniesh.shaikh@gmail.com
Messages: 62
Registered: February 2008
Location: india
Member
Hi gurus,
I am writing a script for one of the clients.
i got stuck could anybody help me out.

dbalist="daniesh.shaikh@gmail.com";export dbalist
ps -ef|grep pmon >database.txt
if (grep "PROD" database.txt)
then
touch "no file"
else
echo "database is down"| mailx -s $dbalist
fi
i am getting an error. i am not getting my mail to my id.
i am redirecting the o/p of ps -ef|grep to database.txt
then alse the o/p of that command get displayed on my screen
i want only database is down to my id .
could anyone explain me the better way to write the script.

Thanks,
Daniesh
 
Read Message
Read Message
Read Message
Previous Topic: Invoking Oracle stored procedure in unix shell script
Next Topic: Error while attempting to create database on Solaris 10
Goto Forum:
  


Current Time: Fri Mar 29 07:52:04 CDT 2024