Use the AIX Error Notification feature to notify the administrator via email or take action when certain errors are recorded in the AIX error log.
The following example script /home/scrt/enm_1 can be used to record this
information in /tmp/enm_1.out and notify the administrator via email
when certain errors occur.
#!/bin/ksh
PROGNAME=${0##*/}
exec 1>> /tmp/${PROGNAME}.out
exec 2>&1
printf "error notify method\n"
errpt -Al ${1}
errpt -Al ${1} | mail -s Error root
To enable AIX Error Notification for one or more of the Assure MIMIX for AIX errors, you
must add a stanza to the errnotify ODM. When the error is logged, the
error notification daemon will call the notify method specified in the
errnotify ODM stanza. The errnotify ODM is located
in the /etc/objrepos directory.
For example, the following errnotify stanzas are added to file
/tmp/ern_1.add for error labels
SCRT_LFC_READ_ERROR, SCRT_LFC_WRITE_ERROR,
"SCRT_NETWORK_ERROR" and "SCRT_ABORT_ERROR.
errnotify:
en_name = "SCRT_LFC_READ_ERROR"
en_class = "S"
en_type = "PERM"
en_method = "/home/scrt/enm_1 $1"
errnotify:
en_name = "SCRT_LFC_WRITE_ERROR"
en_class = "S"
en_type = "PERM"
en_method = "/home/scrt/enm_1 $1"
errnotify:
en_name = "SCRT_NETWORK_ERROR"
en_class = "S"
en_type = "PERM"
en_method = "/home/scrt/enm_1 $1"
errnotify:
en_name = "SCRT_ABORT_ERROR"
en_class = "S"
en_type = "PERM"
en_method = "/home/scrt/enm_1 $1"