Error logging involves getting error reports from the kernel and from various domains that hold the DEVIO key. There are two ERRORWAIT keys. The KERRORWAIT key (a primary key) waits on an error log message (usually in OBR (an OS term ) format) from the kernel. A similar key exists for domains, DERRORWAIT. In addition there is a DERRORLOG key that logs messages for the DERRORWAIT key to report. One domain will wait on the KERRORWAIT and use the DERRORLOG key to transfer those messages to the DERRORWAIT key. Several domains can wait on the DERRORWAIT key simultaneously each processing them differently (one may write action messages to the console, one may write all messages to a log, and one may send all OBR records to a file destined to be sent to VM for processing by EREP).
The disposition of old messages is restricted by practical matters of implementation and old messages will be forgotten after some lengthy period dependent on the volume of messages as a function of time. A given message will be delivered to all waiting domains and may be delivered to domains not yet waiting if they call the ERRORWAIT key with a sequence number lower than a message previously given to waiting domains (unless a sufficient time has passed and the message is subsequently forgotten - this time should be measured in days for DERRORWAIT and hours for KERRORWAIT given a healthy system).
Preservation of kernel error messages across crashes can be assured by journalling the calls to DERRORLOG made by the domain that holds the KERRORWAIT key.
These keys are located as follows {after the command file FIRST has been run}:
DERRORWAIT - SYS.DERRORWAIT
DERRORLOG - SYS.DERRORLOG
See (p2,kerrorwait) for definition of KERRORWAIT key.
DERRORF(0;sb,m,sb ==> rc;DERRORWAIT,DERRORLOG)
DERRORWAIT(oc,((8,sequence),(2,class mask)) ==> c, ((8,sequence), (2,message class), (ml,message))
oc = 1 - Return selected message or "no message found".
The selected message is the message with the lowest sequence higher than the one presented where (class mask & message class) ~= 0. Sequence is the TOD of the entry. The returned sequence may be presented on the next DERRORWAIT call to insure that all messages are received.
Up to 16 domains may wait on this key at one time.
Return Codes
1 = message presented and other messages meeting the selection criteria are available
2 = No selected messages and order code one
3 = class specification is 0 or is missing
4 = 16 domains are already waiting on this key
Each message has a 16 bit class with one and only one bit on. They are assigned as follows:
0002 indicating an urgent message (one requiring operator action such as a disk going offline).
Other classes of message may be introduced at a later time.
DERRORLOG(0,(2,message class)(ml,message) ==> c)
The message may be up to 3836 bytes. Old messages will be deleted after about 1 megabyte of storage has been used.
A message with the message class indicated is entered in the message queue. Any domain that is waiting for a message of the of the same class will be sent the message.
Message class is a 16 bit value used to selectively return messages.
Return Codes
1 = Message class not present
2 = class specification is zero