Error Logging
The error facility records device-driver entries in the system error log. These error log entries record any software or hardware failures that need to be available either for informational purposes or for fault detection and corrective action.
The device driver, using the errsave kernel service, adds error records to the /dev/error special file.
The errdemon daemon picks up the error record and creates an error log entry. When you access the error log either through SMIT (System Management Interface Tool) or with the errpt command, the error record is formatted according to the error template in the error template repository and presented in either a summary or detailed report.
- Determine the Importance of the Error: Use system resources for logging only information that is important or helpful to the intended audience. Work with the hardware developer, if possible, to identify detectable errors and the information that should be relayed concerning those errors.
- Determine the Text of the Message: Use regular national language support (NLS) XPG/4 messages instead of the codepoints. For more information about NLS messages, see Message Facility.
- Determine the Correct Level of Thresholding: Each software or hardware
error to be logged, can be limited by thresholding to avoid filling the error log with duplicate
information. Side effects of runaway error logging include overwriting existing error log entries
and unduly alarming the user. The error log is limited in size. When its size limit is reached, the
log wraps. If a particular error is repeated needlessly, existing information is overwritten, which
might cause inaccurate diagnostic analysis. The end user or service person can perceive a situation
as more serious or pervasive than it is if they see hundreds of identical or nearly identical error
entries.
You are responsible for implementing the proper level of thresholding in the device driver code.