当前仅显示指定条件回帖 [ 展开查看全部 ]
文件名称:
dmesg.md
所在目录:
Openharmony v1.0 / docs / docs-en / kernel
文件大小:
6.07 KB
下载地址:
文本预览:
# 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
## 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

## 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
Prints content in the buffer and clears the buffer. | ||
Enables or disables printing to the console. | ||
Enables or disables printing via the serial port. | ||
Writes the content in the buffer to a file. |
## 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

点赞
回复
X