1. dmesg命令基于缓冲区打印信息
    dmesg -c可以清除该内存信息
    清除后demsg 命令不显示任何信息,但可以到/var/log/dmesg查看信息
  2.  
  3. dmesg |tail 20
    dmesg |head 20
    dmesg |grep sda
    dmesg |grep tty
    dmesg |grep memory
    dmesg |grep DMA
    dmesg |grep usb
  4.  
  5. [root@localhost var]# dmesg | more
  6. Linux version .. (root@localhost.localdomain) (gcc version .. (Red Hat ..-))
  7. # SMP Sun Sep :: PDT
  8. Command line: ro root=LABEL=/ rhgb quiet
  9. KERNEL supported cpus:
  10. Intel GenuineIntel
  11. AMD AuthenticAMD
  12. Centaur CentaurHauls
  13. BIOS-provided physical RAM map:
  14. BIOS-e820: - 000000000009f400 (usable)
  15. BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
  16. BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
  17. BIOS-e820: 00000000000dc000 - (reserved)
  18. BIOS-e820: - 0000000057ee0000 (usable)
  19. BIOS-e820: 0000000057ee0000 - 0000000057eff000 (ACPI data)
  20. BIOS-e820: 0000000057eff000 - 0000000057f00000 (ACPI NVS)
  21. BIOS-e820: 0000000057f00000 - (usable)
  22. BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
  23. BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
  24. BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
  25. BIOS-e820: 00000000fffe0000 - (reserved)
  26. DMI present.
  27. Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
  28. e820 update range: - (usable) ==> (reserved)
  29. last_pfn = 0x58000 max_arch_pfn = 0x400000000
  30. MTRR default type: uncachable
  31. MTRR fixed ranges enabled:
  32. -9FFFF write-back
  33. A0000-BFFFF uncachable
  34. C0000-CBFFF write-protect
  35. CC000-EFFFF uncachable
  36. F0000-FFFFF write-protect
  1. [root@localhost var]# dmesg | less
  2. Linux version .. (root@localhost.localdomain) (gcc version .. (Red Hat ..-))
  3. # SMP Sun Sep :: PDT
  4. Command line: ro root=LABEL=/ rhgb quiet
  5. KERNEL supported cpus:
  6. Intel GenuineIntel
  7. AMD AuthenticAMD
  8. Centaur CentaurHauls
  9. BIOS-provided physical RAM map:
  10. BIOS-e820: - 000000000009f400 (usable)
  11. BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
  12. BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
  13. BIOS-e820: 00000000000dc000 - (reserved)
  14. BIOS-e820: - 0000000057ee0000 (usable)
  15. BIOS-e820: 0000000057ee0000 - 0000000057eff000 (ACPI data)
  16. BIOS-e820: 0000000057eff000 - 0000000057f00000 (ACPI NVS)
  17. BIOS-e820: 0000000057f00000 - (usable)
  18. BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
  19. BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
  20. BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
  21. BIOS-e820: 00000000fffe0000 - (reserved)
  22. DMI present.
  23. Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
  24. e820 update range: - (usable) ==> (reserved)
  25. last_pfn = 0x58000 max_arch_pfn = 0x400000000
  26. MTRR default type: uncachable
  27. MTRR fixed ranges enabled:
  28. -9FFFF write-back
  29. A0000-BFFFF uncachable
  30. C0000-CBFFF write-protect
  31. CC000-EFFFF uncachable
  32. F0000-FFFFF write-protect
  1. [root@localhost var]# dmesg | tail
  2. Bluetooth: L2CAP socket layer initialized
  3. Bluetooth: RFCOMM TTY layer initialized
  4. Bluetooth: RFCOMM socket layer initialized
  5. Bluetooth: RFCOMM ver .
  6. Bluetooth: HIDP (Human Interface Emulation) ver .
  7. eth0: no IPv6 routers present
  8. hdc: task_pio_intr: status=0x51 { DriveReady SeekComplete Error }
  9. hdc: task_pio_intr: error=0x04 { AbortedCommand }
  10. hdc: possibly failed opcode: 0xec
  11. xx[]: segfault at ip sp 00007fff206b7d60 error in xx[+]
  1. [root@localhost var]# dmesg | grep ttyS*
  2. console [tty0] enabled
  3. serial8250: ttyS0 at I/O 0x3f8 (irq = ) is a 16550A
  4. serial8250: ttyS1 at I/O 0x2f8 (irq = ) is a 16550A
  5. :0a: ttyS0 at I/O 0x3f8 (irq = ) is a 16550A
  6. :0b: ttyS1 at I/O 0x2f8 (irq = ) is a 16550A
  7. You have new mail in /var/spool/mail/root
  1. dmesg -c 清除缓存
  2.  
  1. tail -n 20 /var/log/dmesg
  1. [root@localhost log]# tail -n /var/log/dmesg
  2. Floppy drive(s): fd0 is .44M
  3. FDC is a post-
  4. ide-cd driver .
  5. ide-cd: hdc: ATAPI 1X DVD-ROM DVD-R/RAM CD-R/RW drive, 32kB Cache
  6. Uniform CD-ROM driver Revision: .
  7. sd :::: Attached scsi generic sg0 type
  8. lp0: using parport0 (interrupt-driven).
  9. lp0: console ready
  10. NET: Registered protocol family
  11. lo: Disabled Privacy Extensions
  12. md: Autodetecting RAID arrays.
  13. md: Scanned and added devices.
  14. md: autorun ...
  15. md: ... autorun DONE.
  16. device-mapper: multipath: version .. loaded
  17. EXT3 FS on sda2, internal journal
  18. kjournald starting. Commit interval seconds
  19. EXT3 FS on sda1, internal journal
  20. EXT3-fs: mounted filesystem with writeback data mode.
  21. Adding 2064344k swap on /dev/sda3. Priority:- extents: across:2064344k
  1.  
  1. [root@localhost log]# tail -n messages
  2. May :: localhost avahi-daemon[]: Server startup complete. Host name is localhost.local. Local service cookie is .
  3. May :: localhost avahi-daemon[]: Service "SFTP File Transfer on localhost" (/services/sftp-ssh.service) successfully established.
  4. May :: localhost smartd[]: smartd version . [x86_64-redhat-linux-gnu] Copyright (C) - Bruce Allen
  5. May :: localhost smartd[]: Home page is http://smartmontools.sourceforge.net/
  6. May :: localhost smartd[]: Opened configuration file /etc/smartd.conf
  7. May :: localhost smartd[]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
  8. May :: localhost smartd[]: Device: /dev/hdc, opened
  9. May :: localhost smartd[]: Device: /dev/hdc, not ATA, no IDENTIFY DEVICE Structure
  10. May :: localhost kernel: hdc: task_pio_intr: status=0x51 { DriveReady SeekComplete Error }
  11. May :: localhost kernel: hdc: task_pio_intr: error=0x04 { AbortedCommand }
  12. May :: localhost kernel: hdc: possibly failed opcode: 0xec
  13. May :: localhost smartd[]: Device: /dev/sda, opened
  14. May :: localhost smartd[]: Device: /dev/sda, IE (SMART) not enabled, skip device Try 'smartctl -s on /dev/sda' to turn on SMART features
  15. May :: localhost smartd[]: Monitoring ATA and SCSI devices
  16. May :: localhost smartd[]: smartd has fork()ed into background mode. New PID=.
  17. May :: localhost gdm[]: gdm_config_parse: Logdir /var/log/gdm does not exist or isn't a directory. Using ServAuthDir /var/gdm.
  18. May 28 22:42:25 localhost pcscd: winscard.c:304:SCardConnect() Reader E-Gate 0 0 Not Found
  19. May 28 22:42:25 localhost last message repeated 3 times
  20. May 28 22:43:45 localhost kernel: xx[4107]: segfault at 0 ip 0000000000400454 sp 00007fff206b7d60 error 6 in xx[400000+1000]
  21. May 28 22:45:06 localhost logger: Oracle Configuration Manager failed to establish a connection to Oracle. Reconfigure using /opt/oracle/112/ccr/bin/configCCR

dmesg 程序崩溃调试2的更多相关文章

  1. dmesg 程序崩溃调试

    [root@localhost log]# cat -n /root/xx.c #include <stdio.h> void func(char *p) { *p = 'p'; } in ...

  2. [ios-必看] IOS调试技巧:当程序崩溃的时候怎么办 iphone IOS

    from:http://article.ityran.com/archives/1143 有这样一种情形:当我们正在快乐的致力于我们的app时,并且什么看都是无比顺利,但是突然,坑爹啊,它崩溃了.(悲 ...

  3. Ubuntu16.04下写的Qt程序,调试时没问题,运行时偶现崩溃 (需要在运行时生成core dump文件,QMAKE_CC += -g)

    记录一下 Ubuntu16.04下写的Qt程序,调试时没问题,运行时偶现崩溃 需要在运行时生成core dump文件 首先在pro结尾里加入 QMAKE_CC += -g QMAKE_CXX += - ...

  4. Windows 程序 dump 崩溃调试

    Windows 程序捕获崩溃异常 生成dump 概述 事情的起因是,有个同事开发的程序,交付的版本程序,会偶尔随机崩溃了. 悲催的是没有输出log,也没有输出dump文件. 我建议他给程序代码加个异常 ...

  5. IOS调试技巧:当程序崩溃的时候怎么办 xcode调试

    转自:http://www.ityran.com/archives/1143 ------------------------------------------------ 欢迎回到当程序崩溃的时候 ...

  6. Linux高级调试与优化——信号量机制与应用程序崩溃

    背景介绍 Linux分为内核态和用户态,用户态通过系统调用(syscall)进入内核态执行. 用户空间的glibc库将Linux内核系统调用封装成GNU C Library库文件(兼容ANSI &am ...

  7. 你的java/c/c++程序崩溃了?揭秘段错误(Segmentation fault)(3)

    前言 接上两篇: 你的C/C++程序为什么无法运行?揭秘Segmentation fault (1) 你的C/C++程序为什么无法运行?揭秘Segmentation fault (2) 写到这里,越跟 ...

  8. iOS崩溃调试的使用和技巧总结

    在iOS开发调试过程中以及上线之后,程序经常会出现崩溃的问题.简单的崩溃还好说,复杂的崩溃就需要我们通过解析Crash文件来分析了,解析Crash文件在iOS开发中是比较常见的. 现在网上有很多关于解 ...

  9. MATLAB调用C程序、调试和LDPC译码

    MATLAB是一个很好用的工具.利用MATLAB脚本进行科学计算也特别方便快捷.但是代码存在较多循环时,MATLAB运行速度极慢.如果不想放弃MATLAB中大量方便使用的库,又希望代码能迅速快捷的运行 ...

随机推荐

  1. ANDROID_MARS学习笔记_S01原始版_018_SERVICE之Parcel

    一.代码 1.xml(1)activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk ...

  2. tbody添加垂直滚动条

    法一: 用2个table: <table width="300" border="0" cellpadding="0" cellspa ...

  3. Oracle MySQL Server 拒绝服务漏洞

    漏洞名称: Oracle MySQL Server 拒绝服务漏洞 CNNVD编号: CNNVD-201401-316 发布时间: 2014-01-22 更新时间: 2014-01-22 危害等级: 中 ...

  4. ☀【Zepto】

    http://zeptojs.com/ https://github.com/madrobby/zepto Zepto 中文手册 http://www.360weboy.com/handbook/ze ...

  5. c#打印机设置,取得打印机列表及相应打印机的所有纸张格式

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  6. 【转】git使用教程

    Git使用教程 一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统,版本库是集中放在中央服务器的,而干活的时候,用的都是 ...

  7. Django学习随想(1)

    关于Django的模型部分: 模型操作实际上都是针对数据库的一系列操作. Django封装了底层的操作,给用户提供了一组非常python化的模型对象.让python开发者可以很方便.直观地进行数据库表 ...

  8. 五指cms安装说明

    1.五指cms目录结构说明 |-- coreframe                   #框架目录 |   |-- app                     #模块(应用程序)目录 |    ...

  9. Storm系列(三)Topology提交过程

    提交示例代码: 1  ); // 设置一个ack线程 9      conf.setDebug(true); // 设置打印所有发送的消息及系统消息 10      StormSubmitter.su ...

  10. Spring笔记(四)SpingAOP

    需要的Jar包(String3.2) com.springsource.net.sf.cglib-2.2.0.jar // 作用于cglib方式的动态代理 com.springsource.org.a ...