If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Server Crashed - How can I know?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-30-04, 14:03
sdw sdw is offline
Registered User
 
Join Date: Jan 2002
Location: FL
Posts: 3
Angry Server Crashed - How can I know?

I have an Informix Server which is periodically crashing the instance due to a known bug. I am not able to upgrade to the version which the bug is fixed due to the application compatibility. I would like to know if and how I can set up an automatic notification when this occurs either via pager or email, rather than having application users call and reporting that they are getting database errors because it is down.


Thanks!
Reply With Quote
  #2 (permalink)  
Old 04-30-04, 14:25
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
I'd set up a cron job (assuming UNIX/AIX) which runs once a minute. Example below is what we use at the fron of scripts so we don't proceed if engine is down.

I'd add something to check for a status file so that if you send email, you do it only once.
__________________
Fred Prose
Reply With Quote
  #3 (permalink)  
Old 04-30-04, 14:38
sdw sdw is offline
Registered User
 
Join Date: Jan 2002
Location: FL
Posts: 3
We currently monitor on AIX to see if the oninit process is running using grep, but the problem is that we have two informix instances running on the machine, so one could be down and the other still running which means an oninit is still running. I need to know if either goes down.

Your example is missing.
Reply With Quote
  #4 (permalink)  
Old 05-01-04, 14:15
RobP RobP is offline
Registered User
 
Join Date: Mar 2004
Location: Netherlands
Posts: 183
Smile

Two possibilities I know:

Use the alarmprogram, normally this is triggered. Check in this script for a severity of 5 (Panic, IDS crash). This is the first incoming parameter. Of course this only works if IDS still calls the alarmprogram. Most of the time this will work.

To monitor specific instances there is a dirty way to do yhe job. Create two symbolic links that point to the oninit process (for exampe oninit_inst1 and oninit_inst2). Now start instance 1 with oninit_inst1 (and instance 2 with ....).
Now you will see serveral ononit_inst1 processes en aseveral oninit_inst2 processes. With this you can monitor a specific engine.

Hope this helps,

Rob Prop
Reply With Quote
  #5 (permalink)  
Old 05-03-04, 09:52
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
Sorry about the missing post. See below:


# check if online is up
if [ -n "`$INFORMIXDIR/bin/onstat - | grep -i on-line`" ]
then
:
else
mail who_you_want_to <<-!EOF!
The sky is falling the Informix Engine is OFF-LINE
!EOF!
exit
fi

Since you have two instances, the cron script would need to run in both of them by including the appropriate values for INFORMIXDIR, INFORMIXSERVER, and ONCONFIG. You could code both checks into one script.
__________________
Fred Prose
Reply With Quote
  #6 (permalink)  
Old 05-03-04, 12:28
Asylzhan Asylzhan is offline
Registered User
 
Join Date: Apr 2004
Posts: 5
Wink Aseke

You can use the script /home/informix/etc/evidence.sh
check in oncofig file row
SYSALARMPROGRAM /home/informix/etc/evidence.sh # System Alarm program path

if in your server can send mail to outside you can set in script next parametrs
the default setings
SEND_RAS_MAIL=off
RAS=rasnotice@informix.com
you can chage to your address parametr RAS and set on the parametrs SEND_RAS_MAIL

or
can put your script in the /home/informix/etc/evidence.sh
and you not need to every second to check Online your database or not
Reply With Quote
  #7 (permalink)  
Old 05-03-04, 14:40
fprose fprose is offline
Registered User
 
Join Date: Apr 2003
Location: Phoenix, AZ
Posts: 177
Exclamation

ALARMPROGRAM is not called 100% of the time - especially a hard fault at the operating system level. You are assuming the the engine knows enough that it's going down to even call ALARMPROGRAM - and - it's not the VP that call's ALARMPROGRAM that has died.
__________________
Fred Prose
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On