Skip to topic | Skip to bottom
Home
AIS
AIS.AixErrorLogCustomizationr1.1 - 13 Dec 2007 - 06:07 - RussellAdamstopic end

Start of topic | Skip to actions

AIX Error Log Customization

AIX has a very flexible error logging daemon to log hardware and software errors. The log is typically accessed with the errpt command.

Unfortunately, checking the log is a manual process. Using some custom ODM entries, we can cause AIX to run commands in response to errors, which can then be used for notification.

Below I document a simple configuration which uses the ODM to log each error entry to syslog, and forward the complete entry via email.

Basic ODM Commands

  • To check whats already there:

odmget -q"en_name LIKE 'ZZZ_*'" errnotify

  • To backup the current contents of the errnotify ODM:

odmget errnotify > errnotify.backup

A restore would involve a deletion of all entries, and then adding back the backup file contents.

  • To add the error notify customizations, where stanzas are in file custom_odm_additions:

odmadd custom_odm_additions

  • To remove all customizations (ZZZ_*):

odmdelete -o errnotify -q"en_name LIKE 'ZZZ_*'"

  • To test a given error label:

echo "ERROR_LABEL\nTESTING" | /usr/lib/ras/ras_logger

  • To update the customizations:

First, remove all customizations. Then, repeat customization.

ODM Entries

  • Make Errdaemon log entry type and number to syslog


errnotify:
        en_pid = 0
        en_name = "ZZZ_syslog_err"
        en_persistenceflg = 1
        en_method = "/usr/bin/logger AIX Error $1 $4 $3 $9"

  • Mail each error entry to root, ideally where root's email is forwarded to the administrator.


errnotify:
        en_pid = 0
        en_name = "ZZZ_mail_err"
        en_persistenceflg = 1
        en_method = "errpt -a -l $1 | mail -s \"Errpt $1 $4 $3 $9\" root"

Command line arguments to ODM methods

Quoted from: http://inetsd01.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/genprogc/error_notice.htm

Argument Value
$1 Sequence number
$2 Error ID
$3 Class
$4 Type
$5 Alert flags value
$6 Resource name
$7 Resource type
$8 Resource class
$9 Error label

References

A detailed overview of using the ODM for error reporting - http://www.blacksheepnetworks.com/security/resources/aix-error-notification.html
to top


You are here: AIS > WebLeftBar > Tips > AixErrorLogCustomization

to top

Copyright © 1999-2008 by Adams Information Services. All material on this website is the property of Adams Information Services.