Types of AIX error logs and commands to query the error logs


The error logging process begins when an operating system module detects an error.The error-detecting segment of code then sends error information to either the errsave kernel service and errlast kernel service for pending system crash or the errlog subroutine to log an application error, where the information is, in turn, written to the /dev/error special file. This process then adds a time stamp to the collected data. The errdemon daemon constantly checks the /dev/error file for new entries, and when new data is written, the daemon conducts a series of operations.

Before an entry is written to the error log, the errdemon daemon compares the label sent by the kernel or application code to the contents of the error record template repository. If the label matches an item in the repository, the daemon collects additional data from other parts of the system.

To create an entry in the error log, the errdemon daemon retrieves the appropriate template from the repository, the resource name of the unit that detected the error, and detailed data. Also, if the error signifies a hardware-related problem and hardware Vital Product Data (VPD) exists, the daemon retrieves the VPD from the Object Data Manager (ODM). When you access the error log, either through SMIT or with the errpt command, the error log is formatted according to the error template in the error template repository and presented in either a summary or detailed report.

Also Read: Storage Area Network (SAN) Basic Free Tutorials

The system administrator can look at the error log to determine what caused a failure, or to periodically check the health of the system when it is running. There are different types of error logs in AIX operating system 
  • alog - have error logs about boot, console messages, NIM and others
  • errlog - have error logs about hardware, kernel, and some apps
  • syslog have error logs about Internet dameons, and apps

Examples on how to query these error log details


  • Display the contents of the boot log

                 alog -o -t boot
  • Display the contents of the console log
                   alog -o -t console
  • List all log types that alog knows
                   alog -L
  • Display the contents of the system error log
                  errpt (Add -a or -A for varying levels of verbosity)
  • Clear all errors up until x days ago. 
                 errclear x
  • List info on error ID FE2DEE00 (IDENTIFIER column in errpt output) 
                    errpt -aDj FE2DEE00
  • Put a “tail” on the error log
                   errpt -c
  • List all errors that happened today
                   errpt -s ‘date +%m%d0000%y‘
  • To list all errors on hdisk0
                    errpt -N hdisk0
  • To list details about the error log
                     /usr/lib/errdemon -l
  • To change the size of the error log to 2 MB
                   /usr/lib/errdemon -s 2097152 
  • To display information about errors in the error log file in detailed format
                      errpt -a
  •   In AIX 5L Version 5.1, the errpt command now supports an intermediate output format by using the -A flag,
                      errpt -A -j identifier
               Where identifier is the eight digit hexadecimal unique error identifier.

Also Read: AIX Scenario based questions
  •    To display a detailed report of all errors logged for a particular error identifier,
                         errpt -a -j identifier
                Where identifier is the eight digit hexadecimal unique error identifier.
  •   To clear all entries from the error log, enter the following command:
                           errclear 0
  •  To stop error logging, enter the following command:
                         usr/lib/errstop
  •   To start error logging, enter the following command:
                          /usr/lib/errdemon
  • To list the current setting of error log file and buffer size and duplicate information 
                          /usr/lib/errdemon -l

If you want to change the buffer size and error log file size, you can use the errdemon command. 




What Others are Reading Now...

0 Comment to "Types of AIX error logs and commands to query the error logs"

Post a Comment