Error Logging Special Files

Purpose

Support error logging.

Description

The error and errorctl special files support the logging of error events. Minor device 0 (zero) of the error special file is the interface between processes that log error events and the errdemon (error daemon). Error records are written to the error special file by the errlog library routine and the errsave and errlast kernel services. The error special file timestamps each error record entry.

The error daemon opens error file for reading. Each read retrieves an entire error record. The format of error records is described in the erec.h header file.

Each time an error is logged, the error ID, the resource name, and the time stamp are recorded in nonvolatile random access memory (NVRAM). Therefore, in the event of a system crash, the last logged error is not lost. When the error file is restarted, the last error entry is retrieved from NVRAM.

The standard device driver interfaces (open, close, read, and write) are provided for the error file. The error file has no ioctl functions.

The ioctl function interface for the error special file is provided by the errorctl special file. This interface supports stopping the error logging system, synchronizing the error logging system, and querying the status of the error special file.