Home | Previous Page | Next Page   Appendix C. Event Alarms >

Using ALARMPROGRAM to Capture Events

To use the event-alarm feature, set the ALARMPROGRAM configuration parameter to the full pathname of an executable file that performs the necessary administrative actions. You must provide this executable file. It can be a shell script or binary program. When any of the events in a predefined set occur, the database server invokes this executable file and passes it the event-alarm parameters (see Table 5). The executable file must be written to accept these parameters.

Some of the events that the database server reports to the message log cause it to invoke the alarm program. The class messages indicate the events that the database server reports.

The database server reports a nonzero exit code in the message log. In the alarm program, set the EXIT_STATUS variable to 0 for successful completion and to another number for a failure.

For example, if a thread attempts to acquire a lock, but the maximum number of locks that LOCKS specifies has already been reached, the database server writes the following message to the message log:

10:37:22  Checkpoint Completed:  duration was 0 seconds.
10:51:08  Lock table overflow - user id 30032, rstcb 10132264
10:51:10  Lock table overflow - user id 30032, rstcb 10132264
10:51:12  Checkpoint Completed:  duration was 1 seconds.

If you set ALARMPROGRAM to the pathname of an alarm program, the database server passes the following arguments to your alarm program:

3
21
Database server resource overflow: 'Locks'.
Lock table overflow - user id 30032, rstcb 10132264 

In this example, the database server does not pass a value for a see-also file.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]