linux dmesg命令
2015-08-25 21:17
405 查看
这个忘记在哪看到的东西,所以整理一下吧。
首先这个命令的功能是显示开机的一些信息,
‘dmesg’命令显示linux内核的环形缓冲区信息,我们可以从中获得诸如系统架构、cpu、挂载的硬件,RAM等多个运行级别的大量的系统信息。当计算机启动时,系统内核(操作系统的核心部分)将会被加载到内存中。在加载的过程中会显示很多的信息,在这些信息中我们可以看到内核检测硬件设备。
可以通过查看这个信息来设备作诊断等等。
语法很简单
可以通过
linux管道事很好用的东西,相信都体验过其好用的地方,在管道后面可以加grep找到自己有用的信息
同时还有其他的用法
通过使用这个
首先这个命令的功能是显示开机的一些信息,
‘dmesg’命令显示linux内核的环形缓冲区信息,我们可以从中获得诸如系统架构、cpu、挂载的硬件,RAM等多个运行级别的大量的系统信息。当计算机启动时,系统内核(操作系统的核心部分)将会被加载到内存中。在加载的过程中会显示很多的信息,在这些信息中我们可以看到内核检测硬件设备。
可以通过查看这个信息来设备作诊断等等。
语法很简单
#dmesg [options...]
可以通过
gudh@lxc-D3F2-CM:~$ dmesg | less来查看开机的信息
[1992897.493681] Hello, world [1993466.652501] lxcbr0: port 1(veth6OFC3J) entered disabled state [1993466.652934] device veth6OFC3J left promiscuous mode [1993466.652946] lxcbr0: port 1(veth6OFC3J) entered disabled state [1993563.940780] usb 2-5: USB disconnect, device number 30 [1993668.874543] usb 2-5: new high-speed USB device number 31 using ehci-pci [1993669.007520] usb 2-5: New USB device found, idVendor=18d1, idProduct=d002 [1993669.007528] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [1993669.007532] usb 2-5: Product: Android [1993669.007536] usb 2-5: Manufacturer: Android [1993669.007539] usb 2-5: SerialNumber: 0123456789ABCDEF [1993832.730937] usb 2-5: USB disconnect, device number 31 [1993887.468794] Goodbye [1993890.641975] Hello, world [1994023.751138] Goodbye
linux管道事很好用的东西,相信都体验过其好用的地方,在管道后面可以加grep找到自己有用的信息
同时还有其他的用法
-C, --clear Clear the ring buffer. -c, --read-clear Clear the ring buffer contents after printing. -D, --console-off Disable printing messages to the console. -d, --show-delta Display the timestamp and time delta spent between messages. If used together with --notime then only the time delta without the timestamp is printed. -E, --console-on Enable printing messages to the console. -f, --facility list Restrict output to defined (comma separated) list of facilities. For example dmesg --facility=daemon will print messages from system daemons only. For all supported facilities see dmesg --help output. -h, --help Print a help text and exit.
通过使用这个
gudh@lxc-D3F2-CM:~$ dmesg -c可以将缓冲区的信息清空,其他的功能暂时未用,上面是man出来的用法,先mark一下吧
相关文章推荐
- Linux SSH命令大全
- 开发人员必知的8个常用linux命令
- 11个有用的Linux命令
- Linux系统管理常用命令及参数说明中文版
- Linux系统信息查看常用命令
- 致命的7个Linux命令
- 在PHP中运行Linux命令并启动SSH服务的例子
- linux下查找命令汇总(转)
- ctags --- 每天一个 Linux 命令
- 新手应知应会的Linux命令
- 详解Linux系统中md5sum命令的用法
- 20条Linux命令面试问答
- 动画演示10个有趣但毫无用处的Linux命令
- linux sar 命令详解
- iostat命令详解
- linux命令一句话【很实用的linux命令】
- linux命令收集
- 有趣的10个linux命令。
- 非常实用的linux系统命令
- Linux必学的60个命令(1)-安装与登陆