| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Script to be notified by email if db is down
#!/bin/sh
#
ps -eu genesys | grep ora_pmon_"SID" > /dev/null
if [ $? -ne 0 ]; then
echo "Attention DB is down !!!" > /tmp/ccon_alert.err$$
mail chse30_at_hotmail.com < /tmp/ccon_alert.err$$
rm /tmp/ccon_alert.err$$
else
echo " " > /dev/null
fi
Script was writen unde HP so mayby you will nead to corect some details. If something goes wrong write to me.
"Christian Svensson" <chse30_at_hotmail.com> wrote in message
news:ccc2a7eb.0112280229.7be85466_at_posting.google.com...
> Greetings all,
>
> We dont run Enterprise Manager (Intelligent Agents) at our site, so we
> want to have a script that runs periodically to check if the database
> is up and if not, then it should e-mail me.
>
> I guess this is not so hard if you know unix (Solaris) scripting, but
> I dont (yet).
>
> Does anyone have a script that can accomplish this ?
>
> I would be very thankful if so.
>
> Regards
>
>
> /Christian
Received on Fri Dec 28 2001 - 06:37:18 CST
![]() |
![]() |