harmony 鸿蒙dmesg

  • 2022-08-09
  • 浏览 (674)

dmesg

Command Function

This command is used to display system boot and running information.

Syntax

dmesg

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

dmesg -s [size]

dmesg -l [level]

dmesg > [fileA]

Parameters

Table 1 Parameter description

Parameter Description Value Range
-c Prints content in the buffer and clears the buffer. N/A
-C Clears the buffer. N/A
-D/-E Disables or enables printing to the console. N/A
-L/-U Disables or enables printing via the serial port. N/A
-s size Sets the size of the buffer. size specifies the buffer size to set. N/A
-l level Sets the buffering level. [0, 5]
> fileA Writes the content in the buffer to a file. N/A

Usage Guidelines

  • This command can be used only after LOSCFG_SHELL_DMESG is enabled. To enable LOSCFG_SHELL_DMESG, run the make menuconfig command in kernel/liteos_a. In the displayed dialog box, locate the Debug option and set Enable Shell dmesg to Yes. Debug —> Enable a Debug Version —> Enable Shell —> Enable Shell dmesg

  • If no parameter is 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 shell. You are advised to set up a connection using Telnet before disabling the serial port.

Example

Run dmesg> dmesg.log.

Output

Write the content in the buffer to the dmesg.log file.

OHOS # dmesg > dmesg.log
Dmesg write log to dmesg.log success

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Kernel

harmony 鸿蒙Kernel Coding Specification

harmony 鸿蒙Standard Libraries

harmony 鸿蒙Interrupt Management

harmony 鸿蒙Event

harmony 鸿蒙Mutex

harmony 鸿蒙Queue

harmony 鸿蒙Semaphore

harmony 鸿蒙Doubly Linked List

harmony 鸿蒙Memory Management

0  赞