Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1831427
  • 博文数量: 283
  • 博客积分: 10141
  • 博客等级: 上将
  • 技术积分: 2931
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-21 14:33
文章分类

全部博文(283)

文章存档

2013年(2)

2012年(2)

2011年(17)

2010年(36)

2009年(17)

2008年(18)

2007年(66)

2006年(105)

2005年(20)

分类:

2007-09-05 22:26:12

Publisher: Prentice Hall PTR

Pub Date: October 14, 2005

ISBN: 0-13-149247-0

Pages: 456

 

Date: 2007-9-4

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: 2007-9-5

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.       actions

. 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

阅读(1797) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~