Crash工具笔记 (2)—— 打印运行“crash”命令的调试信息

使用-d number可以打印运行crash命令时,输出的调试信息。number越大,输出的信息越多。目前-d8可以打印所有的调试信息。举例如下:

# crash -d8

crash 7.0.2-6.el7
Copyright (C) 2002-2013  Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010  IBM Corporation
Copyright (C) 1999-2006  Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012  Fujitsu Limited
Copyright (C) 2006, 2007  VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011  NEC Corporation
Copyright (C) 1999, 2002, 2007  Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002  Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions.  Enter "help copying" to see the conditions.
This program has absolutely no warranty.  Enter "help warranty" for details.

find_booted_kernel: search for [Linux version 3.10.0-123.el7.x86_64.debug ( (gcc version 4.8.2 20
140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon May 5 11:24:18 EDT 2014]
mount_points[0]: / (167c600)
mount_points[1]: /proc (167c620)
mount_points[2]: /sys (167c640)
mount_points[3]: /dev (167c660)
mount_points[4]: /sys/kernel/security (167c680)
mount_points[5]: /dev/shm (167c6b0)
mount_points[6]: /dev/pts (167c6d0)
mount_points[7]: /run (167c6f0)
mount_points[8]: /sys/fs/cgroup (167c710)
mount_points[9]: /sys/fs/cgroup/systemd (167c740)
mount_points[10]: /sys/fs/pstore (167c780)
mount_points[11]: /sys/fs/cgroup/cpuset (167c7b0)
mount_points[12]: /sys/fs/cgroup/cpu,cpuacct (167c7f0)
mount_points[13]: /sys/fs/cgroup/memory (167c830)


Xen 笔记 (2)——”xen”,”xen-syms” and “xen-*-dbg”文件


Hi all,

Since I am a newbie of Xen, this may be a dumb question. On my SuSE Xen, I find the following 4 “Xen” files:

-rw-r–r– 1 root rootÂÂÂ881967 Oct 27 05:46 xen-4.5.110-1.gz
-rw-r–r– 1 root root 16673080 Oct 27 05:46 xen-syms-4.5.1
-rw-r–r– 1 root rootÂÂÂ893428 Oct 27 05:45 xen-dbg-4.5.110-1.gz
-rw-r–r– 1 root root 16124144 Oct 27 05:45 xen-syms-dbg-4.5.1

Could anyone give a detailed explanation of the functions and differences about the 4 files?

TL;DR: Use xen-04.5.1_1-1.gz unless someone asks you to do otherwise or you are tracking down a bug.

xen.gz is the main/regular/normal release build of the Xen binary (e.g. the thing which you can boot). This is the thing you would boot on a regular production Xen system.

xen-syms.gz is the unstripped version of xen.gz, i.e. with all the ELF debug information present. You can e.g. run gdb on it to disassemble things if you are tracking down a bug. This image is not bootable.

The -dbg variants are not something which upstream produces, but I would assume that they are build with the debug=y, which means they will contain extra ASSERT statements and other things which aid debugging possibly at the expense of performance. Release builds (xen.gz et al) are build with debug=n. Like the release builds the xen-*-dbg ones come in the bootable (xen-dbg.gz) and xen-syms-dbg.gz variants, with the same distinction (the former is bootable, the latter is for running gdb on)




kmod提供了一组操作Linux kernel module的工具,它是构建在libkmod库之上的(这个库也随kmod源码一并提供)。代码地址:

SuSE Linux执行如下命令:

/sbin # ls -alt | grep kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 depmod -> /usr/bin/kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 insmod -> /usr/bin/kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 lsmod -> /usr/bin/kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 modinfo -> /usr/bin/kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 modprobe -> /usr/bin/kmod
lrwxrwxrwx 1 root root        13 Nov  5 21:17 rmmod -> /usr/bin/kmod