分类:
2007-09-05 22:26:12
Publisher: Prentice Hall PTR
Pub Date: October 14, 2005
ISBN: 0-13-149247-0
Pages: 456
Date:
Chpt.7 System Error Messages
(1) Kernel Files under /boot
a. vmlinuz: bzImage, the compressed kernel which is bootable.
b. System.map: a list of functions or symbols available in the kernel. In kernel makefile, this command is use to create System.map:
$(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw]\)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
This file is used by klogd, ps, Oops …
(2) Oops Analysis
Error->Generages Oops msg->ksymoops(2.6.x doesn’t need)->formats Oops msg -> source code
(3) Processing the Oops Using ksymoops((jfs_mount.o))
Get oops msg:
#ksymoops < /var/log/messages
Determine which line of source code goes wrong:
#objdump –S jfs_mount.o | more can show you the assemble code. OR
#gdb fs/jfs/jfs_mount.o
#(gdb) disassemble jfs_mount
(4) perror Describes a System or MySQL Error Code
#perror error_number
Date:
Chapter 8. Event Logging
There are two of the error logging subsystems in Linux, one is syslogd, the other is Event Logging.
> Error Logging Subsystem for syslogd
Related file: /var/log/messages ("tail -f" can show the file changed in real time.)
Configuration file: /etc/syslog.conf
. syslog.conf defines how the messages are kept in this format:
severity.
. If you want to log remote messages form network, use “-r” option to start syslogd.
. If changes are made to syslog, you can use the logger command to see if syslog is still set up correctly: #logger –I –p local6.info xxxxxx
. syslogd can prevent log flood.
. “logrotate” command enables automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or if the file grows to a predetermined size. It can typically be run as a daily cron job and configured in /etc/logrotate.conf
> Error logging Subsystem for Event Logging(based on the POSIX standard 1003.25)
Skipped
> Setting up the Event Consolidator
Skipped