The Error Notification object class specifies the conditions and actions to be taken when errors are recorded in the system error log. The user specifies these conditions and actions in an Error Notification object.
Each time an error is logged, the error notification daemon determines if the error log entry matches the selection criteria of any of the Error Notification objects. If matches exist, the daemon runs the programmed action, also called a notify method, for each matched object.
The Error Notification object
class is located in the /etc/objrepos/errnotify file. Error
Notification objects are added to the object class by using Object Data
Manager (ODM) commands. Error Notification objects contain the
|Identifies whether the error is alertable. This descriptor is provided for use by alert agents associated with network management applications. The valid alert descriptor values are:
|Identifies the class of the error log entries to match. The valid
en_class descriptor values are:
|Specifies the error identifier associated with a particular error.
|Specifies the label associated with a particular error identifier as defined in the output of the errpt -t command.
|Specifies a user-programmable action, such as a shell script or command
string, to be run when an error matching the selection criteria of this Error
Notification object is logged. The error notification daemon uses the
sh -c command to execute the notify
|Uniquely identifies the object. The creator uses this unique name when removing the object.
|Designates whether the Error Notification object should be automatically
removed when the system is restarted. For example, to avoid erroneous
signaling, Error Notification objects containing methods which send a signal
to another process should not persist across system restarts. This is
because the receiving process and its process ID do not persist across system
The creator of the Error Notification object is responsible for removing the Error Notification object at the appropriate time. In the event that the process terminates and fails to remove the Error Notification object, the en_persistenceflg descriptor ensures that obsolete Error Notification objects are removed when the system is restarted.
|Specifies a process ID (PID) for use in identifying the Error Notification object. Objects that have a PID specified should have the en_persistenceflg descriptor set to 0.
|Identifies the class of the failing resource. For the hardware error class, the resource class is the device class. The resource error class is not applicable for the software error class.
|Identifies the name of the failing resource. For the hardware error class, a resource name is the device name.
|Identifies the type of the failing resource. For the hardware error class, a resource type is the device type a resource is known by in the devices object class.
|Enables notification of an error accompanied by a symptom string when set to TRUE.
|Identifies the severity of error log entries to match. The valid
en_type descriptor values are:
Only processes running with the root user authority can add objects to the Error Notification object class.
errnotify: en_name = "sample" en_persistenceflg = 0 en_class = "H" en_type = "PERM" en_rclass = "disk" en_method = "errpt -a -l $1 | mail -s 'Disk Error' root"
To add the object to the Error Notification object class, enter:
The odmadd command adds the Error Notification object contained in /tmp/en_sample.add to the errnotify file.
odmget -q"en_name='sample'" errnotify
The odmget command locates the Error Notification object within the errnotify file that has an en_name value of "sample" and displays the object. The following output is returned:
errnotify: en_pid = 0 en_name = "sample" en_persistenceflg = 0 en_label = "" en_crcid = 0 en_class = "H" en_type = "PERM" en_alertflg = "" en_resource = "" en_rtype = "" en_rclass = "disk" en_method = "errpt -a -l $1 | mail -s 'Disk Error' root"
odmdelete -q"en_name='sample'" -o errnotify
The odmdelete command locates the Error Notification object within the errnotify file that has an en_name value of "sample" and removes it from the Error Notification object class.
Error Logging Special Files in AIX 5L Version 5.1 Files Reference.
The errdemon daemon in AIX 5L Version 5.1 Commands Reference.
The errclear command, errdead command, errinstall command, errlogger command, errmsg command, errpt command, errstop command, errupdate command, odmadd command, odmdelete command, odmget command in AIX 5L Version 5.1 Commands Reference.
The errlog subroutine in AIX 5L Version 5.1 Technical Reference: Base Operating System and Extensions Volume 1.
The errsave kernel service in AIX 5L Version 5.1 Technical Reference: Kernel and Subsystems Volume 1.