dmesg命令基于缓冲区打印信息
dmesg -c可以清除该内存信息
清除后demsg 命令不显示任何信息,但可以到/var/log/dmesg查看信息 dmesg |tail 20
dmesg |head 20
dmesg |grep sda
dmesg |grep tty
dmesg |grep memory
dmesg |grep DMA
dmesg |grep usb [root@localhost var]# dmesg | more
Linux version .. (root@localhost.localdomain) (gcc version .. (Red Hat ..-))
# SMP Sun Sep :: PDT
Command line: ro root=LABEL=/ rhgb quiet
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
BIOS-provided physical RAM map:
BIOS-e820: - 000000000009f400 (usable)
BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
BIOS-e820: 00000000000dc000 - (reserved)
BIOS-e820: - 0000000057ee0000 (usable)
BIOS-e820: 0000000057ee0000 - 0000000057eff000 (ACPI data)
BIOS-e820: 0000000057eff000 - 0000000057f00000 (ACPI NVS)
BIOS-e820: 0000000057f00000 - (usable)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fffe0000 - (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: - (usable) ==> (reserved)
last_pfn = 0x58000 max_arch_pfn = 0x400000000
MTRR default type: uncachable
MTRR fixed ranges enabled:
-9FFFF write-back
A0000-BFFFF uncachable
C0000-CBFFF write-protect
CC000-EFFFF uncachable
F0000-FFFFF write-protect
[root@localhost var]# dmesg | less
Linux version .. (root@localhost.localdomain) (gcc version .. (Red Hat ..-))
# SMP Sun Sep :: PDT
Command line: ro root=LABEL=/ rhgb quiet
KERNEL supported cpus:
Intel GenuineIntel
AMD AuthenticAMD
Centaur CentaurHauls
BIOS-provided physical RAM map:
BIOS-e820: - 000000000009f400 (usable)
BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
BIOS-e820: 00000000000dc000 - (reserved)
BIOS-e820: - 0000000057ee0000 (usable)
BIOS-e820: 0000000057ee0000 - 0000000057eff000 (ACPI data)
BIOS-e820: 0000000057eff000 - 0000000057f00000 (ACPI NVS)
BIOS-e820: 0000000057f00000 - (usable)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fffe0000 - (reserved)
DMI present.
Phoenix BIOS detected: BIOS may corrupt low RAM, working around it.
e820 update range: - (usable) ==> (reserved)
last_pfn = 0x58000 max_arch_pfn = 0x400000000
MTRR default type: uncachable
MTRR fixed ranges enabled:
-9FFFF write-back
A0000-BFFFF uncachable
C0000-CBFFF write-protect
CC000-EFFFF uncachable
F0000-FFFFF write-protect
[root@localhost var]# dmesg | tail
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver .
Bluetooth: HIDP (Human Interface Emulation) ver .
eth0: no IPv6 routers present
hdc: task_pio_intr: status=0x51 { DriveReady SeekComplete Error }
hdc: task_pio_intr: error=0x04 { AbortedCommand }
hdc: possibly failed opcode: 0xec
xx[]: segfault at ip sp 00007fff206b7d60 error in xx[+]
[root@localhost var]# dmesg | grep ttyS*
console [tty0] enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = ) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = ) is a 16550A
:0a: ttyS0 at I/O 0x3f8 (irq = ) is a 16550A
:0b: ttyS1 at I/O 0x2f8 (irq = ) is a 16550A
You have new mail in /var/spool/mail/root
dmesg -c    清除缓存

tail -n 20 /var/log/dmesg
[root@localhost log]# tail -n  /var/log/dmesg
Floppy drive(s): fd0 is .44M
FDC is a post-
ide-cd driver .
ide-cd: hdc: ATAPI 1X DVD-ROM DVD-R/RAM CD-R/RW drive, 32kB Cache
Uniform CD-ROM driver Revision: .
sd :::: Attached scsi generic sg0 type
lp0: using parport0 (interrupt-driven).
lp0: console ready
NET: Registered protocol family
lo: Disabled Privacy Extensions
md: Autodetecting RAID arrays.
md: Scanned and added devices.
md: autorun ...
md: ... autorun DONE.
device-mapper: multipath: version .. loaded
EXT3 FS on sda2, internal journal
kjournald starting. Commit interval seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with writeback data mode.
Adding 2064344k swap on /dev/sda3. Priority:- extents: across:2064344k

[root@localhost log]# tail -n  messages
May :: localhost avahi-daemon[]: Server startup complete. Host name is localhost.local. Local service cookie is .
May :: localhost avahi-daemon[]: Service "SFTP File Transfer on localhost" (/services/sftp-ssh.service) successfully established.
May :: localhost smartd[]: smartd version . [x86_64-redhat-linux-gnu] Copyright (C) - Bruce Allen
May :: localhost smartd[]: Home page is http://smartmontools.sourceforge.net/
May :: localhost smartd[]: Opened configuration file /etc/smartd.conf
May :: localhost smartd[]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
May :: localhost smartd[]: Device: /dev/hdc, opened
May :: localhost smartd[]: Device: /dev/hdc, not ATA, no IDENTIFY DEVICE Structure
May :: localhost kernel: hdc: task_pio_intr: status=0x51 { DriveReady SeekComplete Error }
May :: localhost kernel: hdc: task_pio_intr: error=0x04 { AbortedCommand }
May :: localhost kernel: hdc: possibly failed opcode: 0xec
May :: localhost smartd[]: Device: /dev/sda, opened
May :: localhost smartd[]: Device: /dev/sda, IE (SMART) not enabled, skip device Try 'smartctl -s on /dev/sda' to turn on SMART features
May :: localhost smartd[]: Monitoring ATA and SCSI devices
May :: localhost smartd[]: smartd has fork()ed into background mode. New PID=.
May :: localhost gdm[]: gdm_config_parse: Logdir /var/log/gdm does not exist or isn't a directory. Using ServAuthDir /var/gdm.
May 28 22:42:25 localhost pcscd: winscard.c:304:SCardConnect() Reader E-Gate 0 0 Not Found
May 28 22:42:25 localhost last message repeated 3 times
May 28 22:43:45 localhost kernel: xx[4107]: segfault at 0 ip 0000000000400454 sp 00007fff206b7d60 error 6 in xx[400000+1000]
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. [转贴]使用CryptoAPI解析X509证书和P12证书

    原文在 http://bbs.pediy.com/archive/index.php?t-97663.html,但是觉得这篇文章非常好,我抄下来作我笔记用 一.解析X509证书 1.从磁盘上的证书文件 ...

  2. VC++下封装ADO类以及使用方法

    操作系统:windows 7软件环境:visual studio 2008 .Microsoft SQL 2005本次目的:介绍一个已经封装的ADO类,简单说明怎么导入使用 首先声明一下,这个封装的A ...

  3. 《ArcGIS Engine+C#实例开发教程》第七讲 图层符号选择器的实现2

    原文:<ArcGIS Engine+C#实例开发教程>第七讲 图层符号选择器的实现2 摘要:在第七讲 图层符号选择器的实现的第一阶段中,我们完成了符号选择器窗体的创建与调用.在第二阶段中, ...

  4. 获取本机的ip

    https://4sysops.com/archives/ipv6-tutorial-part-6-site-local-addresses-and-link-local-addresses/ In ...

  5. ☀【JS】检测属性

    <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...

  6. SharePoint 2010 PowerShell 系列 之 备份、还原、部署 .WSP

    转:http://www.cnblogs.com/Fengger/archive/2012/08/24/2654093.html PowerShell系列目录 最近在部署测试环境,就顺便把PowerS ...

  7. 使用 HTML5、CSS3 和 MathML 在 EPUB 3 中制作版式丰富的出版物

    探索用于高级排版和印刷的新一代开放电子书标准 EPUB 3.0 是最新的行业标准 XML 电子书格式,它采用了 HTML5 和 CSS3,因而融入了现代 Web 技术.它重点关注 XML 驱动的工具包 ...

  8. maven安装步骤

    第一步:配置maven环境 maven3 安装: 安装 Maven 之前要求先确定你的 JDK 已经安装配置完成.Maven是 Apache 下的一个项目,目前最新版本是 3.0.4,我用的也是这个. ...

  9. CentOS 安装nagios

    Nagios的介绍: 1.Nagios是一个监控系统运行状态和网络信息的监控系统.它能监控所指定的本地或远程主机的系统状态以及运行的服务,同时提供异常通知的功能. 2. Nagios可运行在Linux ...

  10. 【原】Redis入门教程

    最近在学习Redis,写几篇文章记录一下学习过程:Redis入门教程. 1.Redis基本概念 Redis Redis Keys Redis 基本数据类型 Redis基本操作 遍历操作 Pub-Sub ...