1 Star 0 Fork 4.9K

fish / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dmesg.md 6.30 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

dmesg

Command Function

This command is used to control the dmesg buffer of the kernel.

Syntax

dmesg

dmesg [-c/-C/-D/-E/-L/-U]

dmesg -s [size]

dmesg -l [level]

dmesg > [fileA]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

-c

Prints content in the buffer and clears the buffer.

N/A

-C

Clears the buffer.

N/A

-D/-E

Enables or disables printing to the console.

N/A

-L/-U

Enables or disables printing via the serial port.

N/A

-s size

Sets the size of the buffer.

N/A

-l level

Sets the buffering level.

0 - 5

> fileA

Writes the content in the buffer to a file.

N/A

Usage

  • This command depends on LOSCFG_SHELL_DMESG. Before running this command, enable the Enable Shell dmesg configuration item using menuconfig.

    Debug ---> Enable a Debug Version ---> Enable Shell ---> Enable Shell dmesg

  • If the parameters are not specified, all content in the buffer is printed.

  • The parameters followed by hyphens (-) are mutually exclusive.

    1. Before writing content to a file, ensure that the file system has been mounted.
    2. Disabling the serial port printing will adversely affect the shell. You are advised to set up a connection using Telnet before disabling the serial port.

Example

Enter dmesg > /usr/dmesg.log.

Output

Figure 1 Writing dmesg content to a file

1
https://gitee.com/fish_neil/docs.git
git@gitee.com:fish_neil/docs.git
fish_neil
docs
docs
master

搜索帮助