Chinaunix首页 | 论坛 | 博客
  • 博客访问: 497517
  • 博文数量: 135
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 905
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-24 19:31
文章分类

全部博文(135)

文章存档

2010年(135)

我的朋友

分类: LINUX

2010-02-08 17:05:14

功能说明:显示开机信息。
语  法:dmesg [-cn][-s <缓冲区大小>]
补充说明:kernel会将开机信息存储在ring buffer中。您若是开机时来不及查看信息,可利用dmesg来查看。开机信息亦保存在/var/log目录中,名称为dmesg的文件里。
参  数:
-c  显示信息后,清除ring buffer中的内容。 
-s<缓冲区大小>  预设置为8196,刚好等于ring buffer的大小。 
-n  设置记录信息的层级。


英文版本,欢迎翻译:

NAME dmesg - print or control the kernel ring buffer

SYNOPSIS dmesg [ -c ] [ -n level ] [ -s bufsize ]

DESCRIPTION dmesg is used to examine or control the kernel ring buffer.

The program helps users to print out their bootup messages. Instead of copying the messages by hand, the user need only: dmesg > boot.messages and mail the boot.messages file to whoever can debug their problem.

OPTIONS -c clear the ring buffer contents after printing.

-sbufsize use a buffer of bufsize to query the kernel ring buffer. This is 8196 by default (this matches the default kernel syslog buffer size in 2.0.33 and 2.1.103). If you have set the kernel buffer to larger than the default then this option can be used to view the entire buffer.

-nlevel set the level at which logging of messages is done to the console. For example, -n 1 prevents all messages, expect panic messages, from appearing on the console. All levels of messages are still written to /proc/kmsg, so syslogd(8) can still be used to control exactly where kernel mes? sages appear. When the -n option is used, dmesg will not print or clear the kernel ring buffer.

When both options are used, only the last option on the command line will have an effect.

SEE ALSO syslogd(8)

AUTHOR Theodore Tso (tytso@athena.mit.edu)

阅读(1298) | 评论(0) | 转发(0) |
0

上一篇:Serial Peripheral Interface Bus

下一篇:printk

给主人留下些什么吧!~~