11.01.2013 Views

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

IBM AIX Continuous Availability Features - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

service and errlast kernel service for a pending system crash, or to the errlog subroutine to<br />

log an application error, where the information is, in turn, written to the /dev/error special file.<br />

The errlast kernel service preserves the last error record in the NVRAM. Therefore, in the<br />

event of a system crash, the last logged error is not lost. This process then adds a time stamp<br />

to the collected data.<br />

The errdemon daemon constantly checks the /dev/error file for new entries, and when new<br />

data is written, the daemon conducts a series of operations. Before an entry is written to the<br />

error log, the errdemon daemon compares the label sent by the kernel or application code to<br />

the contents of the error record template repository. If the label matches an item in the<br />

repository, the daemon collects additional data from other parts of the system.<br />

To create an entry in the error log, the errdemon daemon retrieves the appropriate template<br />

from the repository, the resource name of the unit that detected the error, and detailed data.<br />

Also, if the error signifies a hardware-related problem and the Vital Product Data (VPD)<br />

hardware exists, the daemon retrieves the VPD from the Object Data Manager (ODM).<br />

When you access the error log, either through SMIT or by using the errpt command, the<br />

error log is formatted according to the error template in the error template repository and<br />

presented in either a summary or detailed report.<br />

Most entries in the error log are attributable to hardware and software problems, but<br />

informational messages can also be logged. The errlogger command allows the system<br />

administrator to record messages of up to 1024 bytes in the error log.<br />

Whenever you perform a maintenance activity, such as clearing entries from the error log,<br />

replacing hardware, or applying a software fix, it is good practice to record this activity in the<br />

system error log; here is an example:<br />

2.3.13 The alog facility<br />

errlogger system hard disk '(hdisk0)' replaced.<br />

This message will be listed as part of the error log.<br />

The alog is a facility (or command) used to create and maintain fixed-size log files. The alog<br />

command can maintain and manage logs. It reads standard input, writes to standard output,<br />

and copies the output into a fixed-size file simultaneously. This file is treated as a circular log.<br />

If the file is full, new entries are written over the oldest existing entries.<br />

The alog command works with log files that are specified on the command line, or with logs<br />

that are defined in the alog configuration database. Logs that are defined in the alog<br />

configuration database are identified by LogType. The File, Size, and Verbosity attributes for<br />

each defined LogType are stored in the alog configuration database with the LogType. The<br />

alog facility is used to log boot time messages, install logs, and so on.<br />

You can use the alog -L command to display all log files that are defined for your system.<br />

The resulting list contains all logs that are viewable with the alog command. Information<br />

saved in BOS installation log files might help you determine the cause of installation<br />

problems. To view BOS installation log files, enter:<br />

alog -o -f bosinstlog<br />

All boot messages are collected in a boot log file, because at boot time there is no console<br />

available. Boot information is usually collected in /var/adm/ras/bootlog. It is good practice to<br />

check the bootlog file when you are investigating boot problems. The file will contain output<br />

generated by the cfgmgr command and rc.boot.<br />

Chapter 2. <strong>AIX</strong> continuous availability features 31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!