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
Messages: 62
Registered: February 2008
Location: india
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)
touch "no file"
echo "database is down"| mailx -s $dbalist
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.

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 Feb 28 05:54:50 CST 2020