3.2 eventclient() and eventclient.c - the event generating routines

The subroutine eventclient() and the program eventclient.c are used to generate event messages. As the names imply, they are both TCP/IP clients that provide a simple method of generating an event and connecting to the server notabene.pl for logging.

The client processes generate messages that contain the following information: the name of the client computer, the name of the requesting process, the name of the sub-process, the event level, and the event description. While the names of the computer, process and sub-process are self-explanatory, the event level and event description sections require further comment.

The event level is one of the five levels, 0 to 4, available to describe the severity of the event. The lowest severity level is 0, which is used to designate a notice for information logging only. The next level is 1, which is used to designate a warning that the output of the process may be adversely affected by the cause of the event. Level 2 is used when a benign error has occurred at the function or subroutine level that has caused the process to compensate. The next level, 3, is used when the error is significant enough to cause the process to terminate, but will allow the sub-system to continue operation. The most severe level is 4, which is used when the sub-system itself cannot continue. Some examples of the five event levels are:

The event description is a string (of 120 or fewer characters) that contains enough information to describe the event to a knowledgeable user. As mentioned above, if the MAILTO:user@system tag is found at the beginning of an event description, the entire event will be sent to the specified email address. This mechanism allows background processes that do not have access to a local display to notify someone if a problem occurs.

The only exception to the format shown above is a directive to notabene.pl to update the disk file. If the first element of the message is a SYNC tag, the pending event list will be written to the current log file immediately.


Previous Page   Title Page   Next page