seal 回复于:2003-01-28 13:24:25 |
我也要。 |
helixor 回复于:2003-01-28 16:04:07 |
ST-370(Core Dump Analysis)讲的非常简单根本不是想象中的学了以后就可以分析出系统crash的原因。 |
x3y4z5 回复于:2003-01-28 16:25:04 |
那楼上的是否可以就这个问题讲一讲呀?不求全面,只求根据几种情况进行分析?就算是新年礼物吧?![]() |
helixor 回复于:2003-01-28 19:45:47 |
ST-370
Course Objectives Upon completion of this course, you should be able to: Set up your system to capture kernel core dumps Gather and interpret kernel core dumps to a probable cause using adb and kadb macros Create adb macros to aid and simplify kernel core dump analysis Follow an organized approach in analyzing kernel core dumps Cuase of Panic userdata<----works with------user code/libraries //Problems cause application crash and application core file | | calls | V System call interface | | calls | V Kernel data<-----work with-----Kernel code //Problem cause panic and kernel core file Panic的原因:1)保护系统一致性(integrity safeguards) Unix内核遇到其不可处理的情况,为了不使问题扩大化,破坏数据。最好的办法不是试图去纠错,而是中断执行,调用系统的panic,将系统的CPU和内存状况dump出来,以备分析。 2) 坏的陷入(bad trap) 在不恰当的时候发生的trap是bad trap。常见的bad trap是不可恢复的内存错误。虽然Sun机器都有ECC保护,但若发生多于2个bit的内存错误,系统无法纠错。 Panic的过程:1)Panic Messages 内核调用panic给的描述性参数。 2)Stack Traceback 纪录调用堆栈。指明那些调用涉及此次Panic。 3)Dump 内核sync文件系统缓存并向dumpdevice写内存数据。 4)Reboot dump完成后,系统试图reboot,当然有的时候系统关键部件损坏,系统不能正常reboot或连续reboot。 对于我们系统维护人员而言,分析core dump不是我们的任务。我们的任务是将core dump抓下来,让厂商分析。 How to enable save core 1. As for solaris 6 or earlier release,modify /etc/init.d/sysetup DEFAULT: ## ## Default is to not do a savecore ## #if [ ! -d /var/crash/`uname -n` ] #then mkdir -p /var/crash/`uname -n` #fi # echo 'checking for crash dump...\c ' #savecore /var/crash/`uname -n` # echo '' YOU WANT: # #Default is to not do a savecore # if [ ! -d /var/crash/`uname -n` ] then mkdir -p /var/crash/`uname -n` fi echo 'checking for crash dump...\c ' savecore /var/crash/`uname -n` echo '' Core dump文件(vmcore.n and unix.n)存在/var/crash/`uname -n`/下面。 2. As for Solaris 7&8&9,man dumpadm for more information. 例如察看当前设置 #dumpadm Dump content: kernel pages Dump device: /dev/dsk/c0t3d0s1 (swap) Savecore directory: /var/crash/dellboy Savecore enabled: yes 例如改变配置 # dumpadm -c all -d /dev/dsk/c0t0d0s2 -s /export/cores Dump content: all pages Dump device: /dev/dsk/c0t0d0s2 (dedicated) Savecore directory: /export/cores Savecore enabled: yes How to test save core enabled 1. backup you most valuable data. 2. sync file system #sync;sync;sync 3. #halt or STOP-A 4. OK>sync 5. system will reboot. check /var/adm/`uname -n`。 What the size of core dump: 1. 必定小于内存大小。 2. 取决于你需要dump的内容,如只是kernel页面还是所有页面。 3. 通常200-300MB(凭记忆) 比panic还讨厌的是系统hang。至于原因也不是我们关心的。我们关心的是如何将core文件抓下来。假设你已经打开了save core 的选项。注意:Solaris6和以前版本缺省是不打开的,而Solaris7和以后版本是打开的。 1)最最简单的方法。STOP-A. 在OK状态下敲如sync。 2)不幸的是STOP-A不起作用。拔掉键盘然后在将键盘插回去。听到嘟的一声后,在OK状态下敲如sync。 3)更不幸的是方法2也不起作用。最后一招 ![]() 4)如果上述方法均不见效。 if 如果你有服务 then Call 800-810-0035 Sun公司服务热线 elseif 没有服务但可以花钱 then 联系Sun本地的服务部门 else 关机重起 祝各位新年好。愿各位在新的一年里既不panic也不hang. ![]() |
zza 回复于:2003-01-28 19:59:08 |
不错,谢谢! |
mmmmn 回复于:2003-01-29 09:01:14 |
通常这个core要提交到sun公司,同时提交的还有你系统的核心patch信息,系统版本信息,系统patch信息。
其实比较简单的方法是: 1、使用file core来查看导致core的是哪个程序,并看能否进行修改 2、在sunsolve.sun.com网站上,sun提供了一个分析core的工具(但我也没用过。。。。) |
llc107 回复于:2003-01-29 09:13:58 |
thanks a lot!! |
hbbeger 回复于:2003-01-29 10:19:19 |
many thanks |
老猫 回复于:2003-01-30 07:51:52 |
谢谢helixor,能给我一些相关的文档吗? |
helixor 回复于:2003-01-30 11:44:37 |
对不起,老猫同学。我也不懂core分析。但我知道,很烦。所以关于这个方面,我只能说这么多。
另外,mmmmn 同学,说得很对,core dump 分析要配合explorer的数据。参见 http://sunsolve.sun.com/pub-cgi/show.pl?target=explorer/explorer。 explorer是个[b:0c0a82a859]非常有用的[/b:0c0a82a859]工具,可以收集几乎所有的系统信息。如果各位同学,能在装机完成后,收集到explorer的信息,对以后非常有帮助。 |