diff --git a/en/device-dev/kernel/figures/futex-design.jpg b/en/device-dev/kernel/figures/futex-design.jpg
index f6c83d6434f3c68d1baecbf42db9a3df21568b49..a7ab34d091c5d6bd1a983d1aedbf9ea7a5617feb 100644
Binary files a/en/device-dev/kernel/figures/futex-design.jpg and b/en/device-dev/kernel/figures/futex-design.jpg differ
diff --git a/en/device-dev/kernel/kernel-small-basic-atomic.md b/en/device-dev/kernel/kernel-small-basic-atomic.md
index 12045b51bfb493d204ddde26a55c9f8bc29a28d7..2e90511144127670e55af081dc07d6e10fd76cf3 100644
--- a/en/device-dev/kernel/kernel-small-basic-atomic.md
+++ b/en/device-dev/kernel/kernel-small-basic-atomic.md
@@ -3,216 +3,98 @@
## Basic Concepts
-In an OS that supports multiple tasks, modifying data in a memory area requires three steps: read data, modify data, and write data. However, data in a memory area may be simultaneously accessed by multiple tasks. If the data modification is interrupted by another task, the execution result of the operation is unpredictable.
+In an OS that supports multiple tasks, modifying data in memory involves three steps: read data, modify data, and write data. However, the data may be simultaneously accessed by multiple tasks. If the data modification is interrupted by another task, an unexpected result will be caused.
-Although you can enable or disable interrupts to ensure that the multi-task execution results meet expectations, the system performance is affected.
+Although you can enable or disable interrupts to ensure expected results of multiple tasks, the system performance is affected.
-The ARMv6 architecture has introduced the **LDREX** and **STREX** instructions to support more discreet non-blocking synchronization of the shared memory. The atomic operations implemented thereby can ensure that the "read-modify-write" operations on the same data will not be interrupted, that is, the operation atomicity is ensured.
+The ARMv6 architecture has introduced the **LDREX** and **STREX** instructions to support more discreet non-blocking synchronization of the shared memory. The atomic operations implemented thereby can ensure that the "read-modify-write" operations on the same data will not be interrupted, that is, the operation atomicity is ensured.
-## Working Principles
-
-The OpenHarmony system has encapsulated the **LDREX** and **STREX** in the ARMv6 architecture to provide a set of atomic operation APIs.
-
-- LDREX Rx, \[Ry\]
-
- Reads the value in the memory and marks the exclusive access to the memory segment.
- - Reads the 4-byte memory data pointed by the register **Ry** and saves the data to the **Rx** register.
- - Adds an exclusive access flag to the memory area pointed by **Ry**.
-
-- STREX Rf, Rx, \[Ry\]
-
- Checks whether the memory has an exclusive access flag. If yes, the system updates the memory value and clears the flag. If no, the memory is not updated.
+## Working Principles
- - If there is an exclusive access flag, the system:
- - Updates the **Rx** register value to the memory pointed to by the **Ry** register.
- - Sets the **Rf** register to **0**.
+OpenHarmony has encapsulated the **LDREX** and **STREX** in the ARMv6 architecture to provide a set of atomic operation APIs.
- - If there is no exclusive access flag:
- - The memory is not updated.
- - The system sets the **Rf** register to **1**.
+- LDREX Rx, [Ry]
+ Reads the value in the memory and marks the exclusive access to the memory segment.
+ - Reads the 4-byte memory data pointed by the register **Ry** and saves the data to the **Rx** register.
+ - Adds an exclusive access flag to the memory area pointed by **Ry**.
+- STREX Rf, Rx, [Ry]
+ Checks whether the memory has an exclusive access flag. If yes, the system updates the memory value and clears the flag. If no, the memory is not updated.
+ - If there is an exclusive access flag, the system:
+ - Updates the **Rx** register value to the memory pointed to by the **Ry** register.
+ - Sets the **Rf** register to **0**.
+ - If there is no exclusive access flag:
+ - The memory is not updated.
+ - The system sets the **Rf** register to **1**.
-- Flag register
- - If the flag register is **0**, the system exits the loop and the atomic operation is complete.
- - If the flag register is **1**, the system continues the loop and performs the atomic operation again.
+- Flag register
+ - If the flag register is **0**, the system exits the loop and the atomic operation is complete.
+ - If the flag register is **1**, the system continues the loop and performs the atomic operation again.
## Development Guidelines
+
### Available APIs
-The following table describes the APIs available for the OpenHarmony LiteOS-A kernel atomic operation module. For more details about the APIs, see the API reference.
-
-**Table 1** Atomic operation APIs
-
-
-
Function
- |
-API
- |
-Description
- |
-
-
-Read
- |
-LOS_AtomicRead
- |
-Reads 32-bit atomic data.
- |
-
-LOS_Atomic64Read
- |
-Reads 64-bit atomic data.
- |
-
-Write
- |
-LOS_AtomicSet
- |
-Sets 32-bit atomic data.
- |
-
-LOS_Atomic64Set
- |
-Sets 64-bit atomic data.
- |
-
-Add
- |
-LOS_AtomicAdd
- |
-Adds 32-bit atomic data.
- |
-
-LOS_Atomic64Add
- |
-Adds 64-bit atomic data.
- |
-
-LOS_AtomicInc
- |
-Adds 1 to 32-bit atomic data.
- |
-
-LOS_Atomic64Inc
- |
-Adds 1 to 64-bit atomic data.
- |
-
-LOS_AtomicIncRet
- |
-Adds 1 to 32-bit atomic data and returns the data.
- |
-
-LOS_Atomic64IncRet
- |
-Adds 1 to 64-bit atomic data and returns the data.
- |
-
-Subtract
- |
-LOS_AtomicSub
- |
-Performs subtraction on 32-bit atomic data.
- |
-
-LOS_Atomic64Sub
- |
-Performs subtraction on 64-bit atomic data.
- |
-
-LOS_AtomicDec
- |
-Subtracts 1 from 32-bit atomic data.
- |
-
-LOS_Atomic64Dec
- |
-Subtracts 1 from 64-bit atomic data.
- |
-
-LOS_AtomicDecRet
- |
-Subtracts 1 from 32-bit atomic data and returns the result.
- |
-
-LOS_Atomic64DecRet
- |
-Subtracts 1 from 64-bit atomic data and returns the result.
- |
-
-Swap
- |
-LOS_AtomicXchgByte
- |
-Swaps 8-bit memory data.
- |
-
-LOS_AtomicXchg16bits
- |
-Swaps 16-bit memory data.
- |
-
-LOS_AtomicXchg32bits
- |
-Swaps 32-bit memory data.
- |
-
-LOS_AtomicXchg64bits
- |
-Swaps 64-bit memory data.
- |
-
-Compare and swap
- |
-LOS_AtomicCmpXchgByte
- |
-Compares and swaps 8-bit memory data.
- |
-
-LOS_AtomicCmpXchg16bits
- |
-Compares and swaps 16-bit memory data.
- |
-
-LOS_AtomicCmpXchg32bits
- |
-Compares and swaps 32-bit memory data.
- |
-
-LOS_AtomicCmpXchg64bits
- |
-Compares and swaps 64-bit memory data.
- |
-
-
-
+The following table describes the APIs available for the OpenHarmony LiteOS-A kernel atomic operation module.
+
+**Table 1** APIs for atomic operations
+
+| Category | API | Description |
+| ------------ | ----------------------- | --------------------------- |
+| Read | LOS_AtomicRead | Reads 32-bit atomic data. |
+| Read | LOS_Atomic64Read | Reads 64-bit atomic data. |
+| Write | LOS_AtomicSet | Sets 32-bit atomic data. |
+| Write | LOS_Atomic64Set | Sets 64-bit atomic data. |
+| Add | LOS_AtomicAdd | Adds 32-bit atomic data. |
+| Add | LOS_Atomic64Add | Adds 64-bit atomic data. |
+| Add | LOS_AtomicInc | Adds 1 to 32-bit atomic data. |
+| Add | LOS_Atomic64Inc | Adds 1 to 64-bit atomic data. |
+| Add | LOS_AtomicIncRet | Adds 1 to 32-bit atomic data and returns the data. |
+| Add | LOS_Atomic64IncRet | Adds 1 to 64-bit atomic data and returns the data. |
+| Subtract | LOS_AtomicSub | Performs subtraction on 32-bit atomic data. |
+| Subtract | LOS_Atomic64Sub | Performs subtraction on 64-bit atomic data. |
+| Subtract | LOS_AtomicDec | Subtracts 1 from 32-bit atomic data. |
+| Subtract | LOS_Atomic64Dec | Subtracts 1 from 64-bit atomic data. |
+| Subtract | LOS_AtomicDecRet | Subtracts 1 from 32-bit atomic data and returns the result. |
+| Subtract | LOS_Atomic64DecRet | Subtracts 1 from 64-bit atomic data and returns the result. |
+| Swap | LOS_AtomicXchgByte | Swaps 8-bit memory data. |
+| Swap | LOS_AtomicXchg16bits | Swaps 16-bit memory data. |
+| Swap | LOS_AtomicXchg32bits | Swaps 32-bit memory data. |
+| Swap | LOS_AtomicXchg64bits | Swaps 64-bit memory data. |
+| Compare and swap| LOS_AtomicCmpXchgByte | Compares and swaps 8-bit memory data. |
+| Compare and swap| LOS_AtomicCmpXchg16bits | Compares and swaps 16-bit memory data.|
+| Compare and swap| LOS_AtomicCmpXchg32bits | Compares and swaps 32-bit memory data.|
+| Compare and swap| LOS_AtomicCmpXchg64bits | Compares and swaps 64-bit memory data.|
+
### How to Develop
When multiple tasks perform addition, subtraction, and swap operations on the same memory data, use atomic operations to ensure predictability of results.
-> **NOTE**
->Atomic operation APIs support only integer data.
+> **NOTE**
+> Atomic operation APIs support only integers.
+
-### Development Example
+### Development Example
-Example Description
+**Example Description**
Call the atomic operation APIs and observe the result.
-1. Create two tasks.
- - Task 1: Call **LOS\_AtomicInc** to add the global variables 100 times.
- - Task 2: Call **LOS\_AtomicDec** to subtract the global variables 100 times.
+1. Create two tasks.
+ - Task 1: Call **LOS_AtomicInc** to add a global variable 100 times.
+ - Task 2: Call **LOS_AtomicDec** to subtract a global variable 100 times.
-2. After the subtasks are complete, print the values of the global variables in the main task.
+2. After the subtasks are complete, print the values of the global variable in the main task.
**Sample Code**
The sample code is as follows:
+
```
#include "los_hwi.h"
#include "los_atomic.h"
@@ -275,7 +157,7 @@ UINT32 Example_AtomicTaskEntry(VOID)
**Verification**
+
```
g_sum = 0
```
-
diff --git a/en/device-dev/kernel/kernel-small-basic-softtimer.md b/en/device-dev/kernel/kernel-small-basic-softtimer.md
index daa7ca000027e5723cb9e905b55aa9449ce537c9..959b895ab2949151b18fb1262a767b0879cb831c 100644
--- a/en/device-dev/kernel/kernel-small-basic-softtimer.md
+++ b/en/device-dev/kernel/kernel-small-basic-softtimer.md
@@ -1,133 +1,119 @@
# Software Timer
-## Basic Concepts
+## Basic Concepts
-The software timer is a software-simulated timer based on system tick interrupts. When the preset tick counter value has elapsed, the user-defined callback will be invoked. The timing precision is related to the cycle of the system tick clock. Due to the limitation in hardware, the number of hardware timers cannot meet users' requirements. Therefore, the OpenHarmony LiteOS-A kernel provides the software timer function. The software timer allows more timing services to be created, increasing the number of timers.
+The software timer is a software-simulated timer based on system tick interrupts. When the preset tick counter value has elapsed, the user-defined callback will be invoked. The timing precision is related to the cycle of the system tick clock.
+
+Due to the limitation in hardware, the number of hardware timers cannot meet users' requirements. The OpenHarmony LiteOS-A kernel provides the software timer function.
+
+The software timer allows more timing services to be created, increasing the number of timers.
The software timer supports the following functions:
-- Disabling the software timer using a macro
-- Creating a software timer
-- Starting a software timer
-- Stopping a software timer
-- Deleting a software timer
-- Obtaining the number of remaining ticks of a software timer
+- Disabling the software timer using a macro
-## Working Principles
+- Creating a software timer
-The software timer is a system resource. When modules are initialized, a contiguous section of memory is allocated for software timers. The maximum number of timers supported by the system is configured by the **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** macro in **los\_config.h**. Software timers use a queue and a task resource of the system. The software timers are triggered based on the First In First Out \(FIFO\) rule. For the timers set at the same time, the timer with a shorter value is always closer to the queue head than the timer with a longer value, and is preferentially triggered. The software timer counts time in ticks. When a software timer is created and started, the OpenHarmony system determines the timer expiry time based on the current system time \(in ticks\) and the timing interval set by the user, and adds the timer control structure to the global timing list.
+- Starting a software timer
+
+- Stopping a software timer
+
+- Deleting a software timer
+
+- Obtaining the number of remaining ticks of a software timer
-When a tick interrupt occurs, the tick interrupt handler scans the global timing list for expired timers. If such timers are found, the timers are recorded.
-When the tick interrupt handling function is complete, the software timer task \(with the highest priority\) is woken up. In this task, the timeout callback function for the recorded timer is called.
+## Working Principles
-Timer States
+The software timer is a system resource. When modules are initialized, a contiguous section of memory is allocated for software timers. The maximum number of timers supported by the system is configured by the **LOSCFG_BASE_CORE_SWTMR_LIMIT** macro in **los_config.h**.
-- OS\_SWTMR\_STATUS\_UNUSED
+Software timers use a queue and a task resource of the system. The software timers are triggered based on the First In First Out (FIFO) rule. For the timers set at the same time, the timer with a shorter value is always closer to the queue head than the timer with a longer value, and is preferentially triggered.
- The timer is not in use. When the timer module is initialized, all timer resources in the system are set to this state.
+The software timer counts time in ticks. When a software timer is created and started, the OpenHarmony system determines the timer expiry time based on the current system time (in ticks) and the timing interval set by the user, and adds the timer control structure to the global timing list.
-- OS\_SWTMR\_STATUS\_CREATED
+When a tick interrupt occurs, the tick interrupt handler scans the global timing list for expired timers. If such timers are found, the timers are recorded.
+
+When the tick interrupt handler is complete, the software timer task (with the highest priority) will be woken up. In this task, the timeout callback for the recorded timer is called.
- The timer is created but not started or the timer is stopped. When **LOS\_SwtmrCreate** is called for a timer that is not in use or **LOS\_SwtmrStop** is called for a newly started timer, the timer changes to this state.
+A software timer can be in any of the following states:
-- OS\_SWTMR\_STATUS\_TICKING
+- OS_SWTMR_STATUS_UNUSED
+
+ The timer is not in use. When the timer module is initialized, all timer resources in the system are set to this state.
+
+- OS_SWTMR_STATUS_CREATED
- The timer is running \(counting\). When **LOS\_SwtmrStart** is called for a newly created timer, the timer enters this state.
+ The timer is created but not started or the timer is stopped. When **LOS_SwtmrCreate** is called for a timer that is not in use or **LOS_SwtmrStop** is called for a newly started timer, the timer changes to this state.
+- OS_SWTMR_STATUS_TICKING
-Timer Modes
+ The timer is running (counting). When **LOS_SwtmrStart** is called for a newly created timer, the timer enters this state.
-The OpenHarmony provides three types of software timers:
+OpenHarmony provides three types of software timers:
- One-shot timer: Once started, the timer is automatically deleted after triggering only one timer event.
- Periodic timer: This type of timer periodically triggers timer events until it is manually stopped.
- One-shot timer deleted by calling an API
-## Development Guidelines
-
-### Available APIs
-
-The following table describes APIs available for the OpenHarmony LiteOS-A software timer module. For more details about the APIs, see the API reference.
-
-**Table 1** Software timer APIs
-
-
-Function
- |
-API
- |
-Description
- |
-
-
-Creating or deleting timers
- |
-LOS_SwtmrCreate
- |
-Creates a software timer.
- |
-
-LOS_SwtmrDelete
- |
-Deletes a software timer.
- |
-
-Starting or stopping timers
- |
-LOS_SwtmrStart
- |
-Starts a software timer.
- |
-
-LOS_SwtmrStop
- |
-Stops a software timer.
- |
-
-Obtaining remaining ticks of a software timer
- |
-LOS_SwtmrTimeGet
- |
-Obtains the number of remaining ticks of a software timer.
- |
-
-
-
-
-### How to Develop
+
+## Development Guidelines
+
+
+### Available APIs
+
+The following table describes the APIs of the software timer module of the OpenHarmony LiteOS-A kernel.
+
+**Table 1** APIs for software timers
+
+| Category | Description |
+| ---------------------- | ------------------------------------------------------------ |
+| Creating or deleting a timer | **LOS_SwtmrCreate**: creates a software timer.
**LOS_SwtmrDelete**: deletes a software timer.|
+| Starting or stopping a timer | **LOS_SwtmrStart**: starts a software timer.
**LOS_SwtmrStop**: stops a software timer.|
+| Obtaining remaining ticks of a software timer| **LOS_SwtmrTimeGet**: obtains the remaining ticks of a software timer. |
+
+
+### How to Develop
The typical development process of software timers is as follows:
-1. Configure the software timer.
- - Check that **LOSCFG\_BASE\_CORE\_SWTMR** and **LOSCFG\_BASE\_IPC\_QUEUE** are enabled.
- - Configure **LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT** \(maximum number of software timers supported by the system\).
- - Configure **OS\_SWTMR\_HANDLE\_QUEUE\_SIZE** \(maximum length of the software timer queue\).
+1. Configure the software timer.
+ - Check that **LOSCFG_BASE_CORE_SWTMR** and **LOSCFG_BASE_IPC_QUEUE** are enabled.
+ - Configure **LOSCFG_BASE_CORE_SWTMR_LIMIT** (maximum number of software timers supported by the system).
+ - Configure **OS_SWTMR_HANDLE_QUEUE_SIZE** (maximum length of the software timer queue).
+
+2. Call **LOS_SwtmrCreate** to create a software timer.
+ - Create a software timer with the specified timing duration, timeout handling function, and triggering mode.
+ - Return the function execution result (success or failure).
+
+3. Call **LOS_SwtmrStart** to start the software timer.
-2. Call **LOS\_SwtmrCreate** to create a software timer.
- - Create a software timer with the specified timing duration, timeout handling function, and triggering mode.
- - Return the function execution result \(success or failure\).
+4. Call **LOS_SwtmrTimeGet** to obtain the remaining number of ticks of the software timer.
-3. Call **LOS\_SwtmrStart** to start the software timer.
-4. Call **LOS\_SwtmrTimeGet** to obtain the remaining number of ticks of the software timer.
-5. Call **LOS\_SwtmrStop** to stop the software timer.
-6. Call **LOS\_SwtmrDelete** to delete the software timer.
+5. Call **LOS_SwtmrStop** to stop the software timer.
-> **NOTE:**
->- Avoid too many operations in the callback function of the software timer. Do not use APIs or perform operations that may cause task suspension or blocking.
->- The software timers use a queue and a task resource of the system. The priority of the software timer tasks is set to **0** and cannot be changed.
->- The number of software timer resources that can be configured in the system is the total number of software timer resources available to the entire system, not the number of software timer resources available to users. For example, if the system software timer occupies one more resource, the number of software timer resources available to users decreases by one.
->- If a one-shot software timer is created, the system automatically deletes the timer and reclaims resources after the timer times out and the callback function is executed.
->- For a one-shot software timer that will not be automatically deleted after expiration, you need to call **LOS\_SwtmrDelete** to delete it and reclaim the timer resource to prevent resource leakage.
+6. Call **LOS_SwtmrDelete** to delete the software timer.
-### Development Example
+> **NOTE**
+>
+> - Avoid too many operations in the callback of the software timer. Do not use APIs or perform operations that may cause task suspension or blocking.
+>
+> - The software timers use a queue and a task resource of the system. The priority of the software timer tasks is set to **0** and cannot be changed.
+>
+> - The number of software timer resources that can be configured in the system is the total number of software timer resources available to the entire system, not the number of software timer resources available to users. For example, if the system software timer occupies one more resource, the number of software timer resources available to users decreases by one.
+>
+> - If a one-shot software timer is created, the system automatically deletes the timer and reclaims resources after the timer times out and the callback is invoked.
+>
+> - For a one-shot software timer that will not be automatically deleted after expiration, you need to call **LOS_SwtmrDelete** to delete it and reclaim the timer resource to prevent resource leakage.
-Prerequisites:
-- In **los\_config.h**, **LOSCFG\_BASE\_CORE\_SWTMR** is enabled.
-- The maximum number of software timers supported by the system \(**LOSCFG\_BASE\_CORE\_SWTMR\_LIMIT**\) is configured.
-- The maximum length of the software timer queue \(**OS\_SWTMR\_HANDLE\_QUEUE\_SIZE**\) is configured.
+### Development Example
+
+**Prerequisites**
+
+- In **los_config.h**, **LOSCFG_BASE_CORE_SWTMR** is enabled.
+- The maximum number of software timers supported by the system (**LOSCFG_BASE_CORE_SWTMR_LIMIT**) is configured.
+- The maximum length of the software timer queue (**OS_SWTMR_HANDLE_QUEUE_SIZE**) is configured.
**Sample Code**
@@ -164,14 +150,14 @@ void Timer_example(void)
UINT16 id2; // timer id
UINT32 uwTick;
- /* Create a one-shot software timer, with the number of ticks set to 1000. When the number of ticks reaches 1000, callback function 1 is executed. */
+ /* Create a one-shot software timer, with the number of ticks set to 1000. Callback 1 will be invoked when the number of ticks reaches 1000. */
LOS_SwtmrCreate (1000, LOS_SWTMR_MODE_ONCE, Timer1_Callback, &id1, 1);
-
- /* Create a periodic software timer and execute callback function 2 every 100 ticks. */
+
+ /* Create a periodic software timer and invoke callback 2 every 100 ticks. */
LOS_SwtmrCreate(100, LOS_SWTMR_MODE_PERIOD, Timer2_Callback, &id2, 1);
PRINTK("create Timer1 success\n");
- LOS_SwtmrStart (id1); // Start the one-shot software timer.
+ LOS_SwtmrStart(id1); // Start the one-shot software timer.
dprintf("start Timer1 success\n");
LOS_TaskDelay(200); // Delay 200 ticks.
LOS_SwtmrTimeGet(id1, &uwTick); // Obtain the number of remaining ticks of the one-short software timer.
@@ -196,6 +182,7 @@ void Timer_example(void)
**Output**
+
```
create Timer1 success
start Timer1 success
@@ -226,4 +213,3 @@ tick_last1=2101
g_timercount2 =10
tick_last1=2201
```
-
diff --git a/en/device-dev/kernel/kernel-small-basic-time.md b/en/device-dev/kernel/kernel-small-basic-time.md
index c58c25a6c467881bee6b9d4ef72ed8c2d379d8d3..749c684b822f5cb1663f2c1496021832927c6ff6 100644
--- a/en/device-dev/kernel/kernel-small-basic-time.md
+++ b/en/device-dev/kernel/kernel-small-basic-time.md
@@ -3,85 +3,64 @@
## Basic Concepts
-Time management provides all time-related services for applications based on the system clock. The system clock is generated by the interrupts triggered by the output pulse of a timer or counter. The system clock is generally defined as an integer or a long integer. The period of an output pulse is a "clock tick". The system clock is also called time scale or tick. The duration of a tick can be configured statically. People use second or millisecond as the time unit, while the operating system uses tick. When operations such as suspending a task or delaying a task are performed, the time management module converts time between ticks and seconds or milliseconds.
+Time management is performed based on the system clock. It provides time-related services for applications. The system clock is generated by the interrupts triggered by the output pulse of a timer or counter. The system clock is generally defined as an integer or a long integer. The period of an output pulse is a "clock tick".
+
+The system clock is also called time scale or tick. The duration of a tick can be configured statically. People use second or millisecond as the time unit, while the operating system uses tick. When operations such as suspending a task or delaying a task are performed, the time management module converts time between ticks and seconds or milliseconds.
The mapping between ticks and seconds can be configured.
-- **Cycle**
+- Cycle
+
+ Cycle is the minimum time unit in the system. The cycle duration is determined by the system clock frequency, that is, the number of cycles per second.
+
+- Tick
- Cycle is the minimum time unit in the system. The cycle duration is determined by the system clock frequency, that is, the number of cycles per second.
+ Tick is the basic time unit of the operating system and is determined by the number of ticks per second configured by the user.
+The OpenHarmony time management module provides time conversion, statistics, and delay functions.
-- **Tick**
- Tick is the basic time unit of the operating system and is determined by the number of ticks per second configured by the user.
+## Development Guidelines
+Before you start, learn about the system time and the APIs for time management.
-The OpenHarmony time management module provides time conversion, statistics, and delay functions to meet users' time requirements.
-## Development Guidelines
+### Available APIs
-The time management module provides APIs to implement conversion between the system running time, ticks, and seconds/milliseconds.
+The following table describes APIs for OpenHarmony LiteOS-A time management. For more details about the APIs, see the API reference.
-### Available APIs
+**Table 1** APIs for time management
+
+| Category| API Description |
+| -------- | ------------------------------------------------------------ |
+| Time conversion| **LOS_MS2Tick**: converts milliseconds to ticks.
**LOS_Tick2MS**: converts ticks to milliseconds. |
+| Time statistics| **LOS_TickCountGet**: obtains the number of current ticks.
**LOS_CyclePerTickGet**: obtains the number of cycles of each tick.|
-The following table describes APIs available for the OpenHarmony LiteOS-A time management. For more details about the APIs, see the API reference.
-
-**Table 1** APIs of the time management module
-
-
-Function
- |
-API
- |
-Description
- |
-
-
-Time conversion
- |
-LOS_MS2Tick
- |
-Converts milliseconds into ticks.
- |
-
-LOS_Tick2MS
- |
-Converts ticks into milliseconds.
- |
-
-Time statistics
- |
-LOS_TickCountGet
- |
-Obtains the current number of ticks.
- |
-
-LOS_CyclePerTickGet
- |
-Obtains the number of cycles per tick.
- |
-
-
-
### How to Develop
-1. Call APIs to convert time.
-2. Call APIs to perform time statistics.
+1. Call APIs to convert time.
+
+2. Call APIs to perform time statistics.
+
+> **NOTE**
+>
+> - The system tick count can be obtained only after the system clock is enabled.
+>
+> - The time management module depends on **OS_SYS_CLOCK** and **LOSCFG_BASE_CORE_TICK_PER_SECOND** in **los_config.h**.
+>
+> - The number of system ticks is not counted when the interrupt feature is disabled. Therefore, the number of ticks cannot be used as the accurate time.
-> **NOTE**
->- The system tick count can be obtained only after the system clock is enabled.
->- The time management module depends on **OS\_SYS\_CLOCK** and **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND** in **los\_config.h**.
->- The number of system ticks is not counted when the interrupt feature is disabled. Therefore, the number of ticks cannot be used as the accurate time.
### Development Example
-**Prerequisites**
+**Prerequisites**
+
The following parameters are configured:
-- **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND**: number of ticks per second in the system. The value range is (0, 1000].
-- **OS\_SYS\_CLOCK**: system clock, in Hz.
+- **LOSCFG_BASE_CORE_TICK_PER_SECOND**: number of ticks/second. The value range is (0, 1000).
+
+- **OS_SYS_CLOCK**: system clock, in Hz.
**Sample Code**
@@ -92,15 +71,16 @@ VOID Example_TransformTime(VOID)
{
UINT32 uwMs;
UINT32 uwTick;
- uwTick = LOS_MS2Tick(10000);// Convert 10000 ms into ticks.
+ uwTick = LOS_MS2Tick(10000); // Convert 10000 ms to ticks.
PRINTK("uwTick = %d \n",uwTick);
- uwMs= LOS_Tick2MS(100); // Convert 100 ticks into ms.
+ uwMs= LOS_Tick2MS(100); // Convert 100 ticks to ms.
PRINTK("uwMs = %d \n",uwMs);
}
```
Time statistics and delay:
+
```
VOID Example_GetTime(VOID)
{
@@ -133,6 +113,7 @@ The result is as follows:
Time conversion:
+
```
uwTick = 10000
uwMs = 100
@@ -140,9 +121,9 @@ uwMs = 100
Time statistics and delay:
+
```
LOS_CyclePerTickGet = 49500
-LOS_TickCountGet = 5042
-LOS_TickCountGet after delay = 5242
+LOS_TickCountGet = 347931
+LOS_TickCountGet after delay = 348134
```
-
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-mutex.md b/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
index 4d16065f285430f1a4b4007d65d6e704f4695f3a..890215f8ec70319ae7875c34180e03ce769e9e24 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-mutex.md
@@ -9,29 +9,25 @@ A mutex has three attributes: protocol attribute, priority upper limit attribute
- LOS_MUX_PRIO_NONE
-
-Do not inherit or protect the priority of the task requesting the mutex.
+ Do not inherit or protect the priority of the task requesting the mutex.
- LOS_MUX_PRIO_INHERIT
-
-Inherits the priority of the task that requests the mutex. This is the default protocol attribute. When the mutex protocol attribute is set to this value: If a task with a higher priority is blocked because the mutex is already held by a task, the priority of the task holding the mutex will be backed up to the priority bitmap of the task control block, and then set to be the same as that of the task of a higher priority. When the task holding the mutex releases the mutex, its task priority is restored to its original value.
+ Inherits the priority of the task that requests the mutex. This is the default protocol attribute. When the mutex protocol attribute is set to this value: If a task with a higher priority is blocked because the mutex is already held by a task, the priority of the task holding the mutex will be backed up to the priority bitmap of the task control block, and then set to be the same as that of the task of a higher priority. When the task holding the mutex releases the mutex, its task priority is restored to its original value.
- LOS_MUX_PRIO_PROTECT
Protects the priority of the task that requests the mutex. When the mutex protocol attribute is set to this value: If the priority of the task that requests the mutex is lower than the upper limit of the mutex priority, the task priority will be backed up to the priority bitmap of the task control block, and then set to the upper limit value of the mutex priority. When the mutex is released, the task priority is restored to its original value.
-
-The type attribute of a mutex specifies whether to check for deadlocks and whether to support recursive holding of the mutex. The type attribute can be any of the following:
+
+ The type attribute of a mutex specifies whether to check for deadlocks and whether to support recursive holding of the mutex. The type attribute can be any of the following:
- LOS_MUX_NORMAL
-
-Common mutex, which does not check for deadlocks. If a task repeatedly attempts to hold a mutex, the thread will be deadlocked. If the mutex type attribute is set to this value, a task cannot release a mutex held by another task or repeatedly release a mutex. Otherwise, unexpected results will be caused.
+ Common mutex, which does not check for deadlocks. If a task repeatedly attempts to hold a mutex, the thread will be deadlocked. If the mutex type attribute is set to this value, a task cannot release a mutex held by another task or repeatedly release a mutex. Otherwise, unexpected results will be caused.
- LOS_MUX_RECURSIVE
-
-Recursive mutex, which is the default attribute. If the type attribute of a mutex is set to this value, a task can hold the mutex for multiple times. Another task can hold this mutex only when the number of lock holding times is the same as the number of lock release times. However, any attempt to hold a mutex held by another task or attempt to release a mutex that has been released will return an error code.
+ Recursive mutex, which is the default attribute. If the type attribute of a mutex is set to this value, a task can hold the mutex for multiple times. Another task can hold this mutex only when the number of lock holding times is the same as the number of lock release times. However, any attempt to hold a mutex held by another task or attempt to release a mutex that has been released will return an error code.
- LOS_MUX_ERRORCHECK
@@ -44,7 +40,7 @@ In a multi-task environment, multiple tasks may access the same shared resources
When non-shared resources are accessed by a task, the mutex is locked. Other tasks will be blocked until the mutex is released by the task. The mutex allows only one task to access the shared resources at a time, ensuring integrity of operations on the shared resources.
- **Figure 1** Mutex working mechanism for the small system
+**Figure 1** Mutex working mechanism for the small system

diff --git a/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md b/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
index 423e46492a8944ddacf62b5d332de1f3ed9a219b..2af0a2c3b9b746f3cfd619baecac38a9c08308d8 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-user-mutex.md
@@ -1,62 +1,39 @@
# Futex
-## Basic Concepts
+## Basic Concepts
-Fast userspace mutex \(futex\) is a system call capability provided by the kernel. It is a basic component that combines with user-mode lock logic to form a user-mode lock. It is a lock working in both user mode and kernel mode, for example, userspace mutex, barrier and cond synchronization lock, and RW lock. The user-mode part implements lock logic, and the kernel-mode part schedules locks.
+Fast userspace mutex (futex) is a system call capability provided by the kernel. It is a basic component that combines with user-mode lock logic to form a user-mode lock. It is a lock working in both user mode and kernel mode, for example, userspace mutex, barrier and cond synchronization lock, and RW lock. The user-mode part implements lock logic, and the kernel-mode part schedules locks.
When a user-mode thread requests a lock, the lock status is first checked in user space. If no lock contention occurs, the user-mode thread acquires the lock directly. If lock contention occurs, the futex system call is invoked to request the kernel to suspend the thread and maintain the blocking queue.
When a user-mode thread releases a lock, the lock status is first checked in user space. If no other thread is blocked by the lock, the lock is directly released in user space. If there are threads blocked by the lock, the futex system call is invoked to request the kernel to wake up the threads in the blocking queue.
-## Working Principles
+
+
+## Working Principles
When thread scheduling is required to resolve lock contention or lock release in user space, the futex system call is invoked to pass the user-mode lock address to the kernel. The user-mode locks are distinguished by lock address in the futex of the kernel. The available virtual address space in user space is 1 GiB. To facilitate search and management of lock addresses, the kernel futex uses hash buckets to store the user-mode locks.
-There are 80 hash buckets. Buckets 0 to 63 are used to store private locks \(hashed based on virtual addresses\), and buckets 64 to 79 are used to store shared locks \(hashed based on physical addresses\). The private/shared attributes are determined by initialization of user-mode locks and the input parameters in the futex system call.
+There are 80 hash buckets used to store shared locks (hashed based on physical addresses). The private/shared attributes are determined by initialization of user-mode locks and the input parameters in the futex system call.
+
+## Futex Design
+
+**Figure 1** Futex design
-**Figure 1** Futex design

-As shown in the above figure, each futex hash bucket stores the futex nodes with the same hash value linked in a futex\_list. Each futex node corresponds to a suspended task. The key value of a node uniquely identifies a user-mode lock. The nodes with the same key value added to a queue\_list indicate a queue of tasks blocked by the same lock.
-
-The following table describes the APIs available for the futex module.
-
-**Table 1** Futex module APIs
-
-
-Function
- |
-API
- |
-Description
- |
-
-
-Putting a thread to wait
- |
-OsFutexWait
- |
-Inserts a node representing a blocked thread into the futex list.
- |
-
-Waking up a thread
- |
-OsFutexWake
- |
-Wakes up a thread that is blocked by a specified lock.
- |
-
-Modifying the lock address
- |
-OsFutexRequeue
- |
-Adjusts the position of a specified lock in the futex list.
- |
-
-
-
-
-> **NOTE:**
->The futex system call and user-mode logic form a user-mode lock. Therefore, you are advised to use the locks via the user-mode POSIX APIs.
+As shown in the above figure, each futex hash bucket stores the futex nodes with the same hash value linked in a futex_list. Each futex node corresponds to a suspended task. The key value of a node uniquely identifies a user-mode lock. The nodes with the same key value added to a queue_list indicate a queue of tasks blocked by the same lock.
+
+## Available APIs
+
+APIs of the futex module
+
+| Category | API | Description |
+| -------------- | -------------- | ------------------------------------- |
+| Putting a thread to wait | OsFutexWait | Inserts a node representing a blocked thread into the futex list.|
+| Waking up a thread| OsFutexWake | Wakes up a thread that is blocked by a specified lock. |
+| Modifying the lock address | OsFutexRequeue | Adjusts the position of a specified lock in the futex list. |
+> **NOTE**
+> The futex system call and user-mode logic form a user-mode lock. Therefore, you are advised to use the locks via the user-mode POSIX APIs.
diff --git a/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md b/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
index ee8d9eae741239fc9edaf45df50014ec8bcc0412..3ac3e5f80143ece60043a9180abf0abad092545a 100644
--- a/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
+++ b/en/device-dev/kernel/kernel-small-basic-trans-user-signal.md
@@ -1,84 +1,64 @@
# Signal
-## Basic Concepts
+## Basic Concepts
-Signal is a common inter-process asynchronous communication mechanism. It uses software-simulated interrupt signals. When a process needs to communicate with another process, it sends a signal to the kernel. The kernel then transfers the signal to the destination process. The destination process does not need to wait for the signal.
+Signal is a common asynchronous communication mechanism between processes. It uses software-simulated interrupt signals. When a process needs to communicate with another process, it sends a signal to the kernel. The kernel transfers the signal to the target process. The target process does not need to wait for the signal.
-## Working Principles
-The following table describes the APIs available for signal operations.
+## Working Principles
-**Table 1** Signal operation process and APIs \(user-mode APIs\)
+The following table describes the APIs for signal operations.
-
-Function
- |
-API
- |
-Description
- |
-
-
-Registering the signal callback
- |
-signal
- |
-Registers the main signal entry, and registers and unregisters the callback function of a signal.
- |
-
-sigaction
- |
-Same as signal. This API is added with configuration options related to signal transmission. Currently, only some parameters in the SIGINFO structure are supported.
- |
-
-Sending signals
- |
-kill
- |
-Sends a signal to a process or sends messages to a thread in a process, and sets signal flags for threads in a process.
- |
-
-pthread_kill
- |
-
-raise
- |
-
-alarm
- |
-
-abort
- |
-
-Triggering a callback
- |
-None
- |
-Triggered by a system call or an interrupt. Before the switching between the kernel mode and user mode, the specified function in user mode is entered, and the corresponding callbacks are processed. After that, the original user-mode program continues to run.
- |
-
-
-
+ **Table 1** Signal APIs (user-mode APIs)
-> **NOTE:**
->The signal mechanism enables communication between user-mode programs. The user-mode POSIX APIs listed in the above table are recommended.
->Register a callback function.
->```
->void *signal(int sig, void (*func)(int))(int);
->```
->a. Signal 31 is used to register the handling entry of the process callback. Repeated registration is not allowed.
->b. Signals 0 to 30 are used to register and unregister callbacks.
->Register a callback.
->```
->int sigaction(int, const struct sigaction *__restrict, struct sigaction *__restrict);
->```
->You can obtain and modify the configuration of signal registration. Currently, only the **SIGINFO** options are supported. For details, see the description of the **sigtimedwait** API.
->Transmit a signal.
->a. Among the default signal-receiving behaviors, the process does not support **STOP**, **CONTINUE**, and **COREDUMP** defined in the POSIX standard.
->b. The **SIGSTOP**, **SIGKILL**, and **SIGCONT** signals cannot be shielded.
->c. If a process killed is not reclaimed by its parent process, the process becomes a zombie process.
->d. A process will not call back the signal received until the process is scheduled.
->e. When a process is killed, **SIGCHLD** is sent to its parent process. The signal sending action cannot be canceled.
->f. A process in the DELAY state cannot be woken up by a signal.
+| Category | API | Description |
+| ---------------- | --------------------------------------------------- | ------------------------------------------------------------ |
+| Registering/Unregistering a signal callback| signal | Registers the main signal entry, and registers or unregisters a callback for a signal. |
+| Registering a signal callback| sigaction | Same as **signal**. This API is added with configuration options related to signal transmission. Currently, only some parameters in the **SIGINFO** structure are supported.|
+| Sending a signal | kill
pthread_kill
raise
alarm
abort | Sends a signal to a process or sends a message to a thread in a process, and sets the signal flag for a thread in a process. |
+| Invoking a callback | NA | Called by a system call or an interrupt. Before the switching between the kernel mode and user mode, the callback in the specified function in user mode is processed. After that, the original user-mode program continues to run.|
+> **NOTE**
+> The signal mechanism enables communication between user-mode programs. The user-mode POSIX APIs listed in the above table are recommended.
+>
+> **Registering a Callback**
+>
+>
+> ```
+> void *signal(int sig, void (*func)(int))(int);
+> ```
+>
+> - Signal 31 is used to register the handling entry of the process callback. Repeated registration is not allowed.
+>
+>
+> - Signals 0 to 30 are used to register and unregister callbacks.
+>
+>
+> **Registering a Callback**
+>
+>
+> ```
+> int sigaction(int, const struct sigaction ***restrict, struct sigaction ***restrict);
+> ```
+>
+> You can obtain and modify the configuration of signal registration. Currently, only the **SIGINFO** options are supported. For details, see the description of the **sigtimedwait** API.
+>
+> **Sending a Signal**
+>
+> - Among the default signal-receiving behaviors, the process does not support **STOP**, **COTINUE**, and **COREDUMP** defined in POSIX.
+>
+>
+> - The **SIGSTOP**, **SIGKILL**, and **SIGCONT** signals cannot be shielded.
+>
+>
+> - If a process killed is not reclaimed by its parent process, the process becomes a zombie process.
+>
+>
+> - A process will not call back the signal received until the process is scheduled.
+>
+>
+> - When a process is killed, **SIGCHLD** is sent to its parent process. The signal sending action cannot be canceled.
+>
+>
+> - A process in the DELAY state cannot be woken up by a signal.
diff --git a/en/device-dev/kernel/kernel-small-bundles-ipc.md b/en/device-dev/kernel/kernel-small-bundles-ipc.md
index cdde2e4e602dfe73c76158b2fd9119fcfc4d347b..50d3f5e7f61b76ffebcd43ea79a953ba4f7c86da 100644
--- a/en/device-dev/kernel/kernel-small-bundles-ipc.md
+++ b/en/device-dev/kernel/kernel-small-bundles-ipc.md
@@ -1,65 +1,38 @@
# LiteIPC
-## Basic Concepts
-
-LiteIPC is a new inter-process communication \(IPC\) mechanism provided by the OpenHarmony LiteOS-A kernel. Different from the traditional System V IPC, LiteIPC is designed for Remote Procedure Call \(RPC\). In addition, it provides APIs for the upper layer through device files, not through traditional API functions.
-
-LiteIPC has two important concepts: ServiceManager and Service. The entire system can have one ServiceManager and multiple Services. ServiceManager is responsible for registering and unregistering Services, and managing Service access permission \(only authorized tasks can send IPC messages to corresponding Services\).
-
-## Working Principles
-
-ServiceManager registers the task that needs to receive IPC messages as a Service, and sets the access permission for the Service task \(specifies the tasks that can send IPC messages to the Service\). LiteIPC maintains an IPC message queue for each Service task in kernel mode. The message queue provides the upper-layer user-mode programs with the read operation \(receiving IPC messages\) and the write operations \(sending IPC messages\) through LiteIPC device files.
-
-## Development Guidelines
-
-### Available APIs
-
-**Table 1** LiteIPC module APIs \(for LiteOS-A internal use only\)
-
-
-Function
- |
-API
- |
-Description
- |
-
-
-Module initialization
- |
-OsLiteIpcInit
- |
-Initializes the LiteIPC module.
- |
-
-IPC message memory pool
- |
-LiteIpcPoolInit
- |
-Initializes the IPC message memory pool of processes.
- |
-
-LiteIpcPoolReInit
- |
-Re-initializes the IPC message memory pool of processes.
- |
-
-LiteIpcPoolDelete
- |
-Releases the IPC message memory pool of processes.
- |
-
-Service management
- |
-LiteIpcRemoveServiceHandle
- |
-Deletes the specified Service.
- |
-
-
-
-
-> **NOTE:**
->LiteIPC module APIs are used for LiteOS-A internal use only.
+## Basic Concepts
+LiteIPC is a new inter-process communication (IPC) mechanism provided by the OpenHarmony LiteOS-A kernel. Different from the traditional System V IPC, LiteIPC is designed for Remote Procedure Call (RPC). In addition, it provides APIs for the upper layer through device files, not through traditional API functions.
+
+LiteIPC has two important concepts: ServiceManager and Service. The entire system can have one ServiceManager and multiple Services.
+
+ServiceManager provides the following functions:
+
+- Registers and deregisters services.
+
+- Manages the access permission of services. Only authorized tasks can send IPC messages to the service.
+
+
+## Working Principles
+
+ServiceManager registers the task that needs to receive IPC messages as a Service, and sets the access permission for the Service task (specifies the tasks that can send IPC messages to the Service).
+
+LiteIPC maintains an IPC message queue for each Service task in kernel mode. The message queue provides the upper-layer user-mode programs with the read operation (receiving IPC messages) and the write operations (sending IPC messages) through LiteIPC device files.
+
+
+## Development Guidelines
+
+
+### Available APIs
+
+ **Table 1** APIs of the LiteIPC module (applicable to LiteOS-A only)
+
+| Category | API Description |
+| ------------- | ------------------------------------------------------------ |
+| Module initialization | **OsLiteIpcInit**: initializes the LiteIPC module. |
+| IPC message memory pool| - **LiteIpcPoolInit**: initializes the IPC message memory pool of a process.
- **LiteIpcPoolReInit**: reinitializes the IPC message memory pool of a process.
- **LiteIpcPoolDelete**: releases the IPC message memory pool of a process. |
+| Service management | **LiteIpcRemoveServiceHandle**: deletes a service. |
+
+> **NOTE**
+> The APIs of the LiteIPC module are dedicated for LiteOS-A internal use only.
diff --git a/en/device-dev/kernel/kernel-small-bundles-linking.md b/en/device-dev/kernel/kernel-small-bundles-linking.md
index 78a6076a0239d6fa922c470425dccdf96990117a..2fc0d538c9f29b4699c655471c5ddb7c0c4d9241 100644
--- a/en/device-dev/kernel/kernel-small-bundles-linking.md
+++ b/en/device-dev/kernel/kernel-small-bundles-linking.md
@@ -1,59 +1,58 @@
# Dynamic Loading and Linking
-## Basic Concepts
+
+## Basic Concepts
The OpenHarmony dynamic loading and linking mechanism includes a kernel loader and a dynamic linker. The kernel loader loads application programs and the dynamic linker. The dynamic linker loads the shared library on which the application programs depend, and performs symbol relocation for the application programs and shared libraries. Compared with static linking, dynamic linking is a mechanism for delaying the linking of applications and dynamic libraries to run time.
**Advantages of Dynamic Linking**
-1. Dynamic linking allows multiple applications to share code. The minimum loading unit is page. Dynamic linking saves disk and memory space than static linking.
-2. When a shared library is upgraded, the new shared library overwrites the earlier version \(the APIs of the shared library are downward compatible\). You do not need to re-link the shared library.
-3. The loading address can be randomized to prevent attacks and ensure security.
+- Dynamic linking allows multiple applications to share code. The minimum loading unit is page. Dynamic linking saves disk and memory space than static linking.
+
+- When a shared library is upgraded, the new shared library overwrites the earlier version (the APIs of the shared library are downward compatible). You do not need to re-link the shared library.
+
+- The loading address can be randomized to prevent attacks and ensure security.
+
+
+## Working Principles
-## Working Principles
+**Figure 1** Dynamic loading process
-**Figure 1** Dynamic loading process

-1. The kernel maps the **PT\_LOAD** section in the ELF file of the application to the process space. For files of the ET\_EXEC type, fixed address mapping is performed based on **p\_vaddr** in the **PT\_LOAD** section. For files of the ET\_DYN type \(position-independent executable programs, obtained through the compile option **-fPIE**\), the kernel selects the **base** address via **mmap** for mapping \(load\_addr = base + p\_vaddr\).
-2. If the application is statically linked \(static linking does not support the compile option **-fPIE**\), after the stack information is set, the system redirects to the address specified by **e\_entry** in the ELF file of the application and runs the application. If the program is dynamically linked, the application ELF file contains the **PT\_INTERP** section, which stores the dynamic linker path information \(ET\_DYN type\). The dynamic linker of musl is a part of the **libc-musl.so**. The entry of **libc-musl.so** is the entry of the dynamic linker. The kernel selects the **base** address for mapping via the **mmap** API, sets the stack information, redirects to the **base + e\_entry** \(entry of the dynamic linker\) address, and runs the dynamic linker.
-3. The dynamic linker bootstraps and searches for all shared libraries on which the application depends, relocates the imported symbols, and finally redirects to the **e\_entry** \(or **base + e\_entry**\) of the application to run the application.
+1. The kernel maps the **PT_LOAD** section in the ELF file of the application to the process space. For files of the ET_EXEC type, fixed address mapping is performed based on **p_vaddr** in the **PT_LOAD** section. For files of the ET_DYN type (position-independent executable programs, obtained through **-fPIE**), the kernel selects the **base** address via **mmap** for mapping (load_addr = base + p_vaddr).
+
+2. If the application is statically linked (static linking does not support **-fPIE**), after the stack information is set, the system redirects to the address specified by **e_entry** in the ELF file of the application and runs the application. If the program is dynamically linked, the application ELF file contains the **PT_INTERP** section, which stores the dynamic linker path information (ET_DYN type). The dynamic linker of musl is a part of the **libc-musl.so**. The entry of **libc-musl.so** is the entry of the dynamic linker. The kernel selects the **base** address for mapping via the **mmap** API, sets the stack information, redirects to the **base + e_entry** (entry of the dynamic linker) address, and runs the dynamic linker.
+
+3. The dynamic linker bootstraps and searches for all shared libraries on which the application depends, relocates the imported symbols, and finally redirects to the **e_entry** (or **base + e_entry**) of the application to run the application.
+
+**Figure 2** Program execution process
-**Figure 2** Program execution process

-1. The loader and linker call **mmap** to map the **PT\_LOAD** section.
-2. The kernel calls **map\_pages** to search for and map the existing PageCache.
-3. If there is no physical memory for mapping in the virtual memory region during program execution, the system triggers a page missing interrupt, which allows the ELF file to be read into the physical memory and adds the memory block to the pagecache.
-4. Map the physical memory blocks of the file read to the virtual address region.
-5. The program continues to run.
-
-## Development Guidelines
-
-### Available APIs
-
-**Table 1** APIs of the kernel loader module
-
-
-Function
- |
-API
- |
-Description
- |
-
-
-Module initialization
- |
-LOS_DoExecveFile
- |
-Executes the specified user program based on the input parameters.
- |
-
-
-
-
-### How to Develop
-
-The kernel cannot directly call the **LOS\_DoExecveFile** API to start a new process. This API is generally called through the **exec\(\)** API to create a new process using the system call mechanism.
+1. The loader and linker call **mmap** to map the **PT_LOAD** section.
+
+2. The kernel calls **map_pages** to search for and map the existing PageCache.
+
+3. If there is no physical memory for mapping in the virtual memory region during program execution, the system triggers a page missing interrupt, which allows the ELF file to be read into the physical memory and adds the memory block to the pagecache.
+
+4. Map the physical memory blocks of the file read to the virtual address region.
+
+5. The program continues to run.
+
+
+## Development Guidelines
+
+
+### Available APIs
+
+**Table 1** API of the kernel loader module
+
+| Category | API | Description |
+| ---------- | ---------------- | -------------------------------- |
+| Starting initialization| LOS_DoExecveFile | Executes the specified user program based on the input parameters.|
+
+
+### How to Develop
+The kernel cannot directly call the **LOS_DoExecveFile** API to start a new process. This API is generally called through the **exec()** API to create a new process using the system call mechanism.
diff --git a/en/device-dev/kernel/kernel-small-bundles-share.md b/en/device-dev/kernel/kernel-small-bundles-share.md
index 23f6b68a3e4601e0dc4d10783f15bb4616caee88..0414d8bc7730cfebe26b1c5a1f2eb915f98eaefa 100644
--- a/en/device-dev/kernel/kernel-small-bundles-share.md
+++ b/en/device-dev/kernel/kernel-small-bundles-share.md
@@ -1,21 +1,24 @@
# Virtual Dynamic Shared Object
-## Basic Concepts
-Different from a common dynamic shared library, which stores its .so files in the file system, the virtual dynamic shared object \(VDSO\) has its .so files stored in the system image. The kernel determines the .so files needed and provides them to the application program. That is why the VDSO is called a virtual dynamic shared library.
+## Basic Concepts
-The VDSO mechanism allows OpenHarmony user-mode programs to quickly obtain kernel-related data. It can accelerate certain system calls and implement quick read of non-sensitive data \(hardware and software configuration\).
+Different from a common dynamic shared library, which stores its .so files in the file system, the virtual dynamic shared object (VDSO) has its .so files stored in the system image. The kernel determines the .so files needed and provides them to the application program. That is why the VDSO is called a virtual dynamic shared library.
-## Working Principles
+The VDSO mechanism allows OpenHarmony user-mode programs to quickly obtain kernel-related data. It can accelerate certain system calls and implement quick read of non-sensitive data (hardware and software configuration).
-The VDSO can be regarded as a section of memory \(read-only\) maintained by the kernel and mapped to the address space of the user-mode applications. By linking **vdso.so**, the applications can directly access this mapped memory instead of invoking system calls, accelerating application execution.
+
+## Working Principles
+
+The VDSO can be regarded as a section of memory (read-only) maintained by the kernel and mapped to the address space of the user-mode applications. By linking **vdso.so**, the applications can directly access this mapped memory instead of invoking system calls, accelerating application execution.
VDSO can be divided into:
-- Data page: provides the kernel-time data mapped to the user process.
-- Code page: provides the logic for shielding system calls.
+- Data page: provides the kernel-time data mapped to the user process.
+- Code page: provides the logic for shielding system calls.
+
+**Figure 1** VDSO system design
-**Figure 1** VDSO system design

The VDSO mechanism involves the following steps:
@@ -30,7 +33,7 @@ The VDSO mechanism involves the following steps:
5. Binds the VDSO symbols when the user program creates dynamic linking.
-6. The VDSO code page intercepts specific system calls \(for example, **clock\_gettime\(CLOCK\_REALTIME\_COARSE, &ts\)**\).
+6. The VDSO code page intercepts specific system calls (for example, **clock_gettime(CLOCK_REALTIME_COARSE, &ts)**).
7. The VDSO code page allows direct read of the mapped VDSO data page rather than invoking a system call.
@@ -38,7 +41,10 @@ The VDSO mechanism involves the following steps:
9. Returns the data obtained from the VDSO data page to the user program.
-> **NOTE:**
->- The VDSO mechanism supports the **CLOCK\_REALTIME\_COARSE** and **CLOCK\_MONOTONIC\_COARSE** functions of the **clock\_gettime** API in the LibC library. For details about how to use the **clock\_gettime** API, see the POSIX standard. You can call **clock\_gettime\(CLOCK\_REALTIME\_COARSE, &ts\)** or **clock\_gettime\(CLOCK\_MONOTONIC\_COARSE, &ts\)** of the LibC library to use the VDSO.
->- When VDSO is used, the time precision is the same as that of the tick interrupt of the system. The VDSO mechanism is applicable to the scenario where there is no demand for high time precision and **clock\_gettime** or **gettimeofday** is frequently triggered in a short period of time. The VDSO mechanism is not recommended for the system demanding high time precision.
-
+> **NOTE**
+>
+> - The VDSO mechanism supports the **CLOCK_REALTIME_COARSE** and **CLOCK_MONOTONIC_COARSE** functions of the **clock_gettime** API in the LibC library. For details about how to use the **clock_gettime** API, see the POSIX standard.
+>
+> - You can call **clock_gettime(CLOCK_REALTIME_COARSE, &ts)** or **clock_gettime(CLOCK_MONOTONIC_COARSE, &ts)** of the Libc library to use the VDSO.
+>
+> - When VDSO is used, the time precision is the same as that of the tick interrupt of the system. The VDSO mechanism is applicable to the scenario where there is no demand for high time precision and **clock_gettime** or **gettimeofday** is frequently triggered in a short period of time. The VDSO mechanism is not recommended for the system demanding high time precision.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
index 746b920933106047cb22d223404e4b090425fe9f..ac22848f4fce6660fbadb46f091d4134cb87a44f 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-cpup.md
@@ -1,55 +1,41 @@
# cpup
-## Command Function
+## Command Function
-This command is used to query the CPU usage \(CPU percent\) of the system.
+This command is used to query the CPU percent (CPUP) of the system.
-## Syntax
-cpup \[_mode_\] \[_taskID_\]
+## Syntax
-## Parameters
+cpup [_mode_] [_taskID_]
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-mode
- |
-- Displays the CPU usage of the system within the last 10 seconds by default.
- 0: displays the CPU usage within the last 10 seconds.
- 1: displays the CPU usage within the last 1 second.
- Other value: displays the total CPU usage since the system is started.
- |
-[0,0xFFFFFFFF]
- |
-
-taskID
- |
-Specifies the task ID.
- |
-[0,0xFFFFFFFF]
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-- If no parameter is specified, the CPU usage of the system within the last 10 seconds is displayed.
-- If only **mode** is specified, the CPU usage within the specified period is displayed.
-- If both **mode** and **taskID** are specified, the CPU usage of the specified task within the given period is displayed.
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| mode | Displays the CPUP of the system within the last 10 seconds by default.
- **0**: displays the CPUP within the last 10 seconds.
- **1**: displays the CPUP within the last 1 second.
- Other numbers: display the total CPUP since the system starts.| [0, 0xFFFFFFFF] |
+| taskID | Specifies the task ID.| [0, 0xFFFFFFFF] |
-## Example
-Run **cpup 1 5**.
+## Usage Guidelines
-## Output
+- If no parameter is specified, the CPU usage of the system within the last 10 seconds is displayed.
+
+- If only **mode** is specified, the CPU usage within the specified period is displayed.
+
+- If both **mode** and **taskID** are specified, the CPU usage of the specified task within the given period is displayed.
+
+
+## Example
+
+Run **cpup 1 5**.
+
+
+## Output
CPU usage of task 5 in the last one second:
@@ -58,4 +44,3 @@ OHOS # cpup 1 5pid 5
CpuUsage in 1s: 0.0
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
index b232540382d344f2a18fb8424665e759f6301013..33a4f5d76af4afa3facc3503a1e400ce05b911f1 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-date.md
@@ -1,69 +1,56 @@
# date
-## Command Function
+
+## Command Function
This command is used to query the system date and time.
-## Syntax
-
-- date
-- date --help
-- date +\[_Format_\]
-- date -u
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays help information.
- |
-N/A
- |
-
-+Format
- |
-Prints the date and time in the specified Format.
- |
-Placeholders listed in --help
- |
-
--u
- |
-Displays UTC instead of the current time zone.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- If no parameter is specified, the system UTC date and time are displayed by default.
-- The **--help**, **+Format**, and **-u** parameters are mutually exclusive.
-- Currently, this command cannot be used to set the time or date.
-
-## Example
-
-Run **date +%Y--%m--%d**.
-
-## Output
+
+## Syntax
+
+- date
+
+- date --help
+
+- date +[_Format_]
+
+- date -u
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------- | ------------------------------ | ---------------------- |
+| --help | Displays help information. | N/A |
+| +Format | Prints the date and time in the specified format.| Placeholders listed in **--help**|
+| -u | Displays UTC (not the current time zone). | N/A |
+
+
+## Usage Guidelines
+
+- If no parameter is specified, the system date and time in UTC format are displayed by default.
+
+- The **--help**, **+Format**, and **-u** parameters are mutually exclusive.
+
+- Currently, this command cannot be used to set the time or date.
+
+## Note
+
+The shell does not support **date -u**. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
+
+Run **date +%Y--%m--%d**.
+
+
+## Output
System date in the specified format:
+
```
OHOS:/$ date +%Y--%m--%d
1970--01--01
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
index 71950cfa70ab6e746e2f958a9d59bc5612698a3c..492d6017b621fe36de23bfc1ec199b6a320d910a 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-dmesg.md
@@ -1,108 +1,61 @@
# dmesg
-## Command Function
+
+## Command Function
This command is used to display system boot and running information.
-## Syntax
+
+## 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.
- |
-N/A
- |
-
--l level
- |
-Sets the buffering level.
- |
-0 - 5
- |
-
-> fileA
- |
-Writes the content in the buffer to the specified file.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- This command depends on **LOSCFG\_SHELL\_DMESG**. Before using this command, select **Enable Shell dmesg** on **menuconfig**.
-
- 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
-
-Writing the content in the buffer to the **dmesg.log** file:
+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
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
index d928f722e2a0dd97883b1305b601d4198d345bf6..bcd235842be3f23326f6845ee8b90d01ae4f1323 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-exec.md
@@ -1,54 +1,42 @@
# exec
-## Command Function
+## Command Function
-This command is a built-in shell command used to execute user-mode programs.
+This command is a built-in shell command used to execute basic user-mode programs.
-## Syntax
-exec <_executable-file_\>
+## Syntax
-## Parameters
+exec <*executable-file*>
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-executable-file
- |
-Indicates a valid executable file.
- |
-N/A
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
+
+| Parameter | Description |
+| --------------- | ------------------ |
+| executable-file | Specifies a valid executable file.|
+
+
+## Usage Guidelines
Currently, this command supports only valid binary programs. The programs are successfully executed and then run in the background by default. However, the programs share the same device with the shell. As a result, the output of the programs and the shell may be interlaced.
-## Example
-Example:
+## Example
-Run **exec helloworld**.
+Run **exec helloworld**.
+
+
+## Output
-## Output
```
OHOS # exec helloworld
OHOS # hello world!
```
-> **NOTE:**
->After the executable file is executed, the prompt **OHOS \#** is printed first. The shell **exec** command is executed in the background, causing the prompt to be printed in advance.
-
+> **NOTE**
+> After the executable file is executed, the prompt **OHOS #** is printed first. The shell **exec** command is executed in the background, causing the prompt to be printed in advance.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
index 7922bd0a47ef4172d90aacdea2061f45eac7f9c9..936df019edf15824d1996fa0ee28288a2b88b547 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-free.md
@@ -1,87 +1,43 @@
# free
-## Command Function
+
+## Command Function
This command is used to display the memory usage in the system.
-## Syntax
-
-free \[_-b | -k | -m | -g | -t_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-No parameter
- |
-Displays the memory usage in bytes.
- |
-N/A
- |
-
---help/-h
- |
-Displays the parameters supported by the free command.
- |
-N/A
- |
-
--b
- |
-Displays the memory usage in bytes.
- |
-N/A
- |
-
--k
- |
-Displays the memory usage in KiB.
- |
-N/A
- |
-
--m
- |
-Displays the memory usage in MiB.
- |
-N/A
- |
-
--g
- |
-Displays the memory usage in GiB.
- |
-N/A
- |
-
--t
- |
-Displays the memory usage in TiB.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-None
-
-## Example
-
-Run **free**, **free -k**, and **free -m**, respectively.
-
-## Output
+
+## Syntax
+
+free [_-b | -k | -m | -g | -t_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description |
+| -------- | -------- |
+| No parameter| Displays the memory usage in bytes.|
+| --help/-h | Displays the parameters supported by the **free** command.|
+| -b | Displays the memory usage in bytes.|
+| -k | Display the memory waterline in KiB.|
+| -m | Display the memory waterline in MiB.|
+| -g | Displays the memory usage in GiB.|
+| -t | Displays the memory usage in TiB.|
+
+
+## Usage Guidelines
+
+None.
+
+
+## Example
+
+Run **free**, **free -k**, and **free -m**, respectively.
+
+
+## Output
+
```
OHOS:/$ free
@@ -101,40 +57,13 @@ Mem: 2 2 0 0 0
Swap: 0 0 0
```
-**Table 2** Output
-
-
-Parameter
- |
-Description
- |
-
-
-total
- |
-Total size of the dynamic memory pool
- |
-
-used
- |
-Size of the used memory
- |
-
-free
- |
-Size of the unallocated memory
- |
-
-shared
- |
-Size of the shared memory
- |
-
-buffers
- |
-Size of the buffer
- |
-
-
-
+**Table 2** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| total | Total size of the dynamic memory pool.|
+| used | Size of the used memory.|
+| free | Size of the unallocated memory.|
+| shared | Size of the shared memory.|
+| buffers | Size of the buffer.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
index afdf6852c2381d5d2ba09920016a197611c85fcc..e36d6a784f5629eb90e622f7b4ee166bb6243b9e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-help.md
@@ -1,36 +1,43 @@
# help
-## Command Function
+
+## Command Function
This command is used to display all commands in the OS and some Toybox commands.
-## Syntax
+
+## Syntax
help
-## Parameters
-None
+## Parameters
+
+None.
+
-## Usage
+## Usage Guidelines
-You can run **help** to display all commands in the current OS.
+You can run **help** to display all commands in the current OS.
-## Example
-Run **help**.
+## Example
-## Output
+Run **help**.
+
+
+## Output
All commands in the system:
+
```
After shell prompt "OHOS # ":
Use ` [args ...]` to run built-in shell commands listed above.
Use `exec [args ...]` or `./ [args ...]` to run external commands.
OHOS:/$ help
-*******************shell commands:*************************
+***shell commands:*
arp cat cat_logmpp cd chgrp chmod
chown cp cpup date dhclient dmesg
dns format free help hi3881 hwi
@@ -44,11 +51,10 @@ watch writeproc
After shell prompt "OHOS # ":
Use ` [args ...]` to run built-in shell commands listed above.
Use `exec [args ...]` or `./ [args ...]` to run external commands.
-*******************toybox commands:************************
+***toybox commands:
chgrp chmod chown cp date du free help ifconfig kill ls mkdir mount
mv ping ps reboot rm rmdir top touch umount uname
Use `toybox help [command]` to show usage information for a specific command.
Use `shell` to enter interactive legacy shell.
Use `alias` to display command aliases.
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
index 52854b1cfa54f3aa3607f9ca2e43ac506d2edfce..c9f9cca164a3b251e34e95f2ca4608537b49d8f8 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-hwi.md
@@ -1,155 +1,120 @@
# hwi
-## Command Function
+
+## Command Function
This command is used to query information about interrupts.
-## Syntax
-hwi
+## Syntax
-## Parameters
-
-None
-
-## Usage
-
-- Run **hwi** to display the interrupt IDs, count of interrupts, and registered interrupt names of the system.
-- If **LOSCFG\_CPUP\_INCLUDE\_IRQ** is enabled, the interrupt handling time \(ATime\), CPU usage, and type of each interrupt are also displayed.
-
-## Example
-
-Run **hwi**.
-
-## Output
-
-- Interrupt information \(**LOSCFG\_CPUP\_INCLUDE\_IRQ** disabled\):
-
- ```
- OHOS # hwi
- InterruptNo Count Name
- 0: 0:
- 1: 1025641:
- 2: 0:
- 29: 824049:
- 37: 0: rtc_alarm
- 38: 24: uart_pl011
- 48: 3: GPIO
- 59: 0:
- 62: 530: MMC_IRQ
- 63: 70: MMC_IRQ
- 64: 280: ETH
- 67: 58: tde
- 68: 0: JPGE_0
- 69: 0: IVE
- 70: 0: VGS
- 72: 0: VEDU_0
- 73: 0: nnie0
- 74: 0: nnie_gdc0
- 75: 0: VPSS
- 76: 0: VI_PROC0
- 77: 0: JPEGD_0
- 83: 49455: HIFB_SOFT_INT
- 87: 0: AIO interrupt
- 88: 0: VI_CAP0
- 89: 0: MIPI_RX
- 90: 49455: VO int
- 91: 49456: HIFB Int
- 96: 17601: MMC_IRQ
- 100: 0: SPI_HI35XX
- 101: 0: SPI_HI35XX
- 102: 0: SPI_HI35XX
- ```
-
-- Interrupt information \(**LOSCFG\_CPUP\_INCLUDE\_IRQ** enabled\):
-
- ```
- OHOS # hwi
- InterruptNo Count ATime(us) CPUUSE CPUUSE10s CPUUSE1s Mode Name
- 0: 0 0 0.0 0.0 0.0 normal
- 1: 937031 0 0.1 0.1 0.1 normal
- 2: 0 0 0.0 0.0 0.0 normal
- 29: 726166 5 0.54 0.57 0.59 normal
- 37: 0 0 0.0 0.0 0.0 normal rtc_alarm
- 38: 17 5 0.0 0.0 0.0 normal uart_pl011
- 48: 3 4 0.0 0.0 0.0 normal GPIO
- 59: 0 0 0.0 0.0 0.0 normal
- 62: 531 1 0.0 0.0 0.0 normal MMC_IRQ
- 63: 69 1 0.0 0.0 0.0 normal MMC_IRQ
- 64: 292 2 0.0 0.0 0.0 normal ETH
- 67: 54 76 0.0 0.0 0.0 shared tde
- 68: 0 0 0.0 0.0 0.0 shared JPGE_0
- 69: 0 0 0.0 0.0 0.0 shared IVE
- 70: 0 0 0.0 0.0 0.0 shared VGS
- 72: 0 0 0.0 0.0 0.0 shared VEDU_0
- 73: 0 0 0.0 0.0 0.0 shared nnie0
- 74: 0 0 0.0 0.0 0.0 shared nnie_gdc0
- 75: 0 0 0.0 0.0 0.0 shared VPSS
- 76: 0 0 0.0 0.0 0.0 shared VI_PROC0
- 77: 0 0 0.0 0.0 0.0 shared JPEGD_0
- 83: 45529 8 0.5 0.5 0.5 shared HIFB_SOFT_INT
- 87: 0 0 0.0 0.0 0.0 shared AIO interrupt
- 88: 0 0 0.0 0.0 0.0 shared VI_CAP0
- 89: 0 0 0.0 0.0 0.0 shared MIPI_RX
- 90: 45534 11 0.6 0.7 0.7 shared VO int
- 91: 45533 2 0.1 0.1 0.1 shared HIFB Int
- 96: 17383 2 0.0 0.0 0.0 normal MMC_IRQ
- 100: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
- 101: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
- 102: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
- ```
-
- **Table 1** Output
-
-
- Parameter
- |
- Description
- |
-
-
- InterruptNo
- |
- Interrupt ID
- |
-
- Count
- |
- Number of interrupts
- |
-
- Name
- |
- Registered interrupt name
- |
-
- ATime
- |
- Interrupt handling time
- |
-
- CPUUSE
- |
- CPU usage
- |
-
- CPUUSE10s
- |
- CPU usage within the last 10 seconds
- |
-
- CPUUSE1s
- |
- CPU usage within the last 1 second
- |
-
- mode
- |
- Interrupt type, which can be any of the following:
- - normal: non-shared interrupt.
- shared: shared interrupt.
- |
-
-
-
+hwi
+## Parameters
+
+None.
+
+
+## Usage Guidelines
+
+- Run **hwi** to display the interrupt IDs, count of interrupts, and registered interrupt names of the system.
+
+- If **LOSCFG_CPUP_INCLUDE_IRQ** is enabled, the interrupt handling time (ATime), CPU usage, and type of each interrupt are also displayed.
+
+
+## Example
+
+Run **hwi**.
+
+
+## Output
+
+- Interrupt information (**LOSCFG_CPUP_INCLUDE_IRQ** disabled):
+
+ ```
+ OHOS # hwi
+ InterruptNo Count Name
+ 0: 0:
+ 1: 1025641:
+ 2: 0:
+ 29: 824049:
+ 37: 0: rtc_alarm
+ 38: 24: uart_pl011
+ 48: 3: GPIO
+ 59: 0:
+ 62: 530: MMC_IRQ
+ 63: 70: MMC_IRQ
+ 64: 280: ETH
+ 67: 58: tde
+ 68: 0: JPGE_0
+ 69: 0: IVE
+ 70: 0: VGS
+ 72: 0: VEDU_0
+ 73: 0: nnie0
+ 74: 0: nnie_gdc0
+ 75: 0: VPSS
+ 76: 0: VI_PROC0
+ 77: 0: JPEGD_0
+ 83: 49455: HIFB_SOFT_INT
+ 87: 0: AIO interrupt
+ 88: 0: VI_CAP0
+ 89: 0: MIPI_RX
+ 90: 49455: VO int
+ 91: 49456: HIFB Int
+ 96: 17601: MMC_IRQ
+ 100: 0: SPI_HI35XX
+ 101: 0: SPI_HI35XX
+ 102: 0: SPI_HI35XX
+ ```
+
+- Interrupt information (**LOSCFG_CPUP_INCLUDE_IRQ** enabled):
+
+ ```
+ OHOS # hwi
+ InterruptNo Count ATime(us) CPUUSE CPUUSE10s CPUUSE1s Mode Name
+ 0: 0 0 0.0 0.0 0.0 normal
+ 1: 937031 0 0.1 0.1 0.1 normal
+ 2: 0 0 0.0 0.0 0.0 normal
+ 29: 726166 5 0.54 0.57 0.59 normal
+ 37: 0 0 0.0 0.0 0.0 normal rtc_alarm
+ 38: 17 5 0.0 0.0 0.0 normal uart_pl011
+ 48: 3 4 0.0 0.0 0.0 normal GPIO
+ 59: 0 0 0.0 0.0 0.0 normal
+ 62: 531 1 0.0 0.0 0.0 normal MMC_IRQ
+ 63: 69 1 0.0 0.0 0.0 normal MMC_IRQ
+ 64: 292 2 0.0 0.0 0.0 normal ETH
+ 67: 54 76 0.0 0.0 0.0 shared tde
+ 68: 0 0 0.0 0.0 0.0 shared JPGE_0
+ 69: 0 0 0.0 0.0 0.0 shared IVE
+ 70: 0 0 0.0 0.0 0.0 shared VGS
+ 72: 0 0 0.0 0.0 0.0 shared VEDU_0
+ 73: 0 0 0.0 0.0 0.0 shared nnie0
+ 74: 0 0 0.0 0.0 0.0 shared nnie_gdc0
+ 75: 0 0 0.0 0.0 0.0 shared VPSS
+ 76: 0 0 0.0 0.0 0.0 shared VI_PROC0
+ 77: 0 0 0.0 0.0 0.0 shared JPEGD_0
+ 83: 45529 8 0.5 0.5 0.5 shared HIFB_SOFT_INT
+ 87: 0 0 0.0 0.0 0.0 shared AIO interrupt
+ 88: 0 0 0.0 0.0 0.0 shared VI_CAP0
+ 89: 0 0 0.0 0.0 0.0 shared MIPI_RX
+ 90: 45534 11 0.6 0.7 0.7 shared VO int
+ 91: 45533 2 0.1 0.1 0.1 shared HIFB Int
+ 96: 17383 2 0.0 0.0 0.0 normal MMC_IRQ
+ 100: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
+ 101: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
+ 102: 0 0 0.0 0.0 0.0 normal SPI_HI35XX
+ ```
+
+**Table 1** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| InterruptNo | Interrupt number.|
+| Count | Number of interrupts.|
+| Name | Registered interrupt name.|
+| ATime | Interrupt handling time.|
+| CPUUSE | CPU usage.|
+| CPUUSE10s | CPU usage in the last 10s.|
+| CPUUSE1s | CPU usage in the last 1s.|
+| mode | Interrupt type, which can be any of the following:
- **normal**: non-shared interrupt.
- **shared**: shared interrupt.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
index 841bcc90ac36ced0dc75a32e52defdcb89d51aff..4a68f5b68c533902900407f3c0e3769ee898b8ce 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-kill.md
@@ -1,125 +1,101 @@
# kill
-## Command Function
-
-This command is used to send a signal to a specified process.
-
-## Syntax
-
-kill \[-l \[_signo_\] | _-s signo_ | _-signo_\] _pid..._
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the kill command.
- |
-N/A
- |
-
--l
- |
-Lists the names and numbers of signals.
- |
-N/A
- |
-
--s
- |
-Sends signals
- |
-N/A
- |
-
-signo
- |
-Specifies the signal number.
- |
-[1,30]
- |
-
-pid
- |
-Specifies the process ID.
- |
-[1,MAX_INT]
- |
-
-
-
-
-> **NOTICE:**
->The value range of **signo** is \[0, 64\]. The recommended value range is \[1, 30\], and other values in the value range are reserved.
-
-## Usage
-
-- The **signo** and **pid** parameters are mandatory.
-- The **pid** value range varies depending on the system configuration. For example, if the maximum **pid** value supported by the system is **256**, this value range is \[1-256\].
-
-## Example
-
-- Query the process list before killing process 42.
-
- ```
- OHOS:/$ ps
- allCpu(%): 4.67 sys, 195.33 idle
- PID PPID PGID UID Status VirtualMem ShareMem PhysicalMem CPUUSE10s PName
- 1 -1 1 0 Pending 0x33b000 0xbb000 0x4db02 0.0 init
- 2 -1 2 0 Pending 0xdabc08 0 0xdabc08 1.14 KProcess
- 3 1 3 7 Pending 0x72e000 0x1a3000 0x1d24c2 0.0 foundation
- 4 1 4 8 Pending 0x362000 0xbb000 0x5c6ff 0.0 bundle_daemon
- 5 1 5 1 Pending 0xdfa000 0x2e7000 0x1484f0 0.0 appspawn
- 6 1 6 0 Pending 0x688000 0x137000 0x11bca0 0.0 media_server
- 7 1 7 0 Pending 0x9d2000 0x103000 0xa1cdf 0.88 wms_server
- 8 1 8 2 Pending 0x1f5000 0x48000 0x47dc2 0.2 mksh
- 12 1 12 0 Pending 0x4d4000 0x112000 0xe0882 0.0 deviceauth_service
- 13 1 13 0 Pending 0x34f000 0xbd000 0x51799 0.0 sensor_service
- 14 1 14 2 Pending 0x34e000 0xb3000 0x52184 0.0 ai_server
- 15 1 15 0 Pending 0x61f000 0x13b000 0x168071 0.45 softbus_server
- 42 8 42 2 Pending 0x1c1000 0x3a000 0x1106a 0.9 test_demo
- 43 8 43 2 Running 0x1d7000 0x3a000 0x1e577 0.0 toybox
- ```
-
-- Send signal 9 \(the default action of **SIGKILL** is to immediately terminate the process\) to process 42 test\_demo \(a user-mode process\). Then, check the current process list. The commands **kill -s 9 42** and **kill -9 42** have the same effect.
-
- ```
- OHOS:/$ kill -s 9 42
- OHOS:/$
- [1] + Killed ./nfs/test_demo
- OHOS:/$ ps
- allCpu(%): 4.73 sys, 195.27 idle
- PID PPID PGID UID Status VirtualMem ShareMem PhysicalMem CPUUSE10s PName
- 1 -1 1 0 Pending 0x33b000 0xbb000 0x4e01c 0.0 init
- 2 -1 2 0 Pending 0xda5fa4 0 0xda5fa4 1.14 KProcess
- 3 1 3 7 Pending 0x72e000 0x1a3000 0x1d29dc 0.0 foundation
- 4 1 4 8 Pending 0x362000 0xbb000 0x5cc19 0.0 bundle_daemon
- 5 1 5 1 Pending 0xdfa000 0x2e7000 0x148a0a 0.0 appspawn
- 6 1 6 0 Pending 0x688000 0x137000 0x11c1ba 0.0 media_server
- 7 1 7 0 Pending 0x9d2000 0x103000 0xa21f9 0.89 wms_server
- 8 1 8 2 Pending 0x1f5000 0x48000 0x482dc 0.2 mksh
- 12 1 12 0 Pending 0x4d4000 0x112000 0xe0d9c 0.0 deviceauth_service
- 13 1 13 0 Pending 0x34f000 0xbd000 0x51cb3 0.0 sensor_service
- 14 1 14 2 Pending 0x34e000 0xb3000 0x5269e 0.0 ai_server
- 15 1 15 0 Pending 0x61f000 0x13b000 0x16858b 0.51 softbus_server
- 45 8 45 2 Running 0x1d7000 0x3a000 0x1e9f5 0.0 toybox
- ```
-
-- Run the **kill -100 31** command.
-
-## Output
-
-**Example 1**: The signal is successfully sent to process 42.
+
+## Command Function
+
+This command is used to send a signal to a process to terminate the abnormal application.
+
+
+## Syntax
+
+kill [-l [_signo_] | _-s signo_ | _-signo_] *pid...*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------ | -------------------------- | ----------- |
+| --help | Displays the parameters supported by the **kill** command.| N/A |
+| -l | Lists the names and numbers of signals. | N/A |
+| -s | Sends a signal. | N/A |
+| signo | Specifies the signal number. | [1, 30] |
+| pid | Specifies the process ID. | [1, MAX_INT] |
+
+> **NOTICE**
+> The value range of **signo** is [0, 64]. The recommended value range is [1, 30], and other values in the value range are reserved.
+
+
+## Usage Guidelines
+
+- The **signo** and **pid** parameters are mandatory.
+
+- The **pid** value range varies depending on the system configuration. For example, if the maximum **pid** value supported by the system is **256**, this value range is [1, 256].
+
+## Note
+
+The **kill** command is not supported by the shell. mksh supports it. To switch to mksh, run **cd bin;** and **./mksh**.
+
+## Example
+
+- Query the process list before killing process 42.
+
+ ```
+ OHOS:/$ ps
+ allCpu(%): 4.67 sys, 195.33 idle
+ PID PPID PGID UID Status VirtualMem ShareMem PhysicalMem CPUUSE10s PName
+ 1 -1 1 0 Pending 0x33b000 0xbb000 0x4db02 0.0 init
+ 2 -1 2 0 Pending 0xdabc08 0 0xdabc08 1.14 KProcess
+ 3 1 3 7 Pending 0x72e000 0x1a3000 0x1d24c2 0.0 foundation
+ 4 1 4 8 Pending 0x362000 0xbb000 0x5c6ff 0.0 bundle_daemon
+ 5 1 5 1 Pending 0xdfa000 0x2e7000 0x1484f0 0.0 appspawn
+ 6 1 6 0 Pending 0x688000 0x137000 0x11bca0 0.0 media_server
+ 7 1 7 0 Pending 0x9d2000 0x103000 0xa1cdf 0.88 wms_server
+ 8 1 8 2 Pending 0x1f5000 0x48000 0x47dc2 0.2 mksh
+ 10 5 5 101 Pending 0x11ec000 0x2f9000 0x206047 0.93 com.example.launcher
+ 12 1 12 0 Pending 0x4d4000 0x112000 0xe0882 0.0 deviceauth_service
+ 13 1 13 0 Pending 0x34f000 0xbd000 0x51799 0.0 sensor_service
+ 14 1 14 2 Pending 0x34e000 0xb3000 0x52184 0.0 ai_server
+ 15 1 15 0 Pending 0x61f000 0x13b000 0x168071 0.45 softbus_server
+ 42 8 42 2 Pending 0x1c1000 0x3a000 0x1106a 0.9 test_demo
+ 43 8 43 2 Running 0x1d7000 0x3a000 0x1e577 0.0 toybox
+ ```
+
+- Send signal 9 (the default action of **SIGKILL** is to immediately terminate the process) to process 42 test_demo (a user-mode process). Then, check the current process list. The commands **kill -s 9 42** and **kill -9 42** have the same effect.
+
+ ```
+ OHOS:/$ kill -s 9 42
+ OHOS:/$
+ [1] + Killed ./nfs/test_demo
+ OHOS:/$ ps
+ allCpu(%): 4.73 sys, 195.27 idle
+ PID PPID PGID UID Status VirtualMem ShareMem PhysicalMem CPUUSE10s PName
+ 1 -1 1 0 Pending 0x33b000 0xbb000 0x4e01c 0.0 init
+ 2 -1 2 0 Pending 0xda5fa4 0 0xda5fa4 1.14 KProcess
+ 3 1 3 7 Pending 0x72e000 0x1a3000 0x1d29dc 0.0 foundation
+ 4 1 4 8 Pending 0x362000 0xbb000 0x5cc19 0.0 bundle_daemon
+ 5 1 5 1 Pending 0xdfa000 0x2e7000 0x148a0a 0.0 appspawn
+ 6 1 6 0 Pending 0x688000 0x137000 0x11c1ba 0.0 media_server
+ 7 1 7 0 Pending 0x9d2000 0x103000 0xa21f9 0.89 wms_server
+ 8 1 8 2 Pending 0x1f5000 0x48000 0x482dc 0.2 mksh
+ 10 5 5 101 Pending 0x11ec000 0x2f9000 0x206561 0.93 com.example.launcher
+ 12 1 12 0 Pending 0x4d4000 0x112000 0xe0d9c 0.0 deviceauth_service
+ 13 1 13 0 Pending 0x34f000 0xbd000 0x51cb3 0.0 sensor_service
+ 14 1 14 2 Pending 0x34e000 0xb3000 0x5269e 0.0 ai_server
+ 15 1 15 0 Pending 0x61f000 0x13b000 0x16858b 0.51 softbus_server
+ 45 8 45 2 Running 0x1d7000 0x3a000 0x1e9f5 0.0 toybox
+ ```
+
+- Run the **kill -100 31** command.
+
+
+## Output
+
+The command output is as follows:
+
+Example 1: The signal is successfully sent to process 42.
+
```
OHOS:/$ kill -s 9 42
@@ -131,10 +107,10 @@ Process 42 is killed.
**Example 2**: The signal fails to be sent to process 31.
+
```
OHOS:/$ kill -100 31
kill: Unknown signal '(null)'
```
-**Unknown signal '\(null\)'** is displayed because the **signo** value **100** exceeds the value range \[0, 64\].
-
+**Unknown signal '(null)'** is displayed because the **signo** value **100** exceeds the value range [0, 64].
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
index 9809d169a35146e4a886a8706dbb30fb56162322..21f7dd52765eeda6b59b5896144446ec15aca850 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-log.md
@@ -1,71 +1,62 @@
# log
-## Command Function
+
+## Command Function
This command is used to set and query log configuration.
-## Syntax
-log level \[_levelNum_\]
+## Syntax
+
+log level [_levelNum_]
+
+
-## Parameters
+## Parameters
-**Table 1** Parameter description
+**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-levelNum
- |
-Specifies the level of logs to print.
- |
-[0,5]
- |
-
-
-
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| levelNum | Specifies the level of logs to print.| [0, 5] |
-## Usage
-- This command depends on **LOSCFG\_SHELL\_LK**. Before using this command, select **Enable Shell lk** on **menuconfig**.
+## Usage Guidelines
- **Debug** ---\> **Enable a Debug Version** ---\> **Enable Shell** ---\> **Enable Shell lK**
+- This command can be used only after **LOSCFG_SHELL_LK** is enabled. Before using this command, set **Enable Shell lk** to **Yes** on **menuconfig**.
+ **Debug** ---> **Enable a Debug Version** ---> **Enable Shell** ---> **Enable Shell lK**
-- The **log level** command is used to set the log level, which can be any of the following:
+- The **log level** command sets the log level, which can be any of the following:
+ TRACE_EMG = 0,
- TRACE\_EMG = 0,
+ TRACE_COMMON = 1,
- TRACE\_COMMON = 1,
+ TRACE_ERROR = 2,
- TRACE\_ERROR = 2,
+ TRACE_WARN = 3,
- TRACE\_WARN = 3,
+ TRACE_INFO = 4,
- TRACE\_INFO = 4,
+ TRACE_DEBUG = 5
- TRACE\_DEBUG = 5
+ If the log level specified is not within the value range, a message will be displayed.
- If the log level specified is not within the value range, a message will be displayed.
+- If **[levelNum]** is not specified, this command displays the current log level and how to use it.
-- If **\[levelNum\]** is not specified, this command queries the current log level. The usage method is also displayed.
-- If the log level is set to **4** or **5** in the source code of the open-source small system, a large number of logs will be printed.
+- If the log level is set to **4** or **5** in the source code of an OpenHarmony small system, a large number of logs will be printed.
-## Example
-Run **log level 3**.
+## Example
-## Output
+Run **log level 3**.
+
+
+## Output
+
+The log print level is set to WARN.
-Setting the log print level to WARN:
```
OHOS # log level 3
Set current log level WARN
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
index 673393acbf78cce8379196dc0b8436565c4a9c2d..62e0005ebec2cc6d3f9cf34cbd4165d09074700e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-memcheck.md
@@ -1,36 +1,45 @@
# memcheck
-## Command Function
+
+## Command Function
This command is used to check whether the dynamically allocated memory block is complete and whether nodes in the memory pool are damaged due to out-of-bounds memory access.
-## Syntax
+
+## Syntax
memcheck
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
-## Usage
+- If all nodes in the memory pool are complete, "system memcheck over, all passed!" is displayed.
-- If all nodes in the memory pool are complete, "system memcheck over, all passed!" is displayed.
-- If a node in the memory pool is incomplete, information about the memory block of the corrupted node is displayed.
+- If a node in the memory pool is incomplete, information about the memory block of the corrupted node is displayed.
-## Example
-Run **memcheck**.
+## Example
-## Output
+Run **memcheck**.
-Example 1: All nodes in the memory pool are complete.
+Run **memcheck**, and memory overwriting occurs.
+
+
+## Output
+
+Example 1: No error is detected.
```
OHOS # memcheck
system memcheck over, all passed!
```
-Example 2: Out-of-bounds memory access is detected.
+Example 2: Memory overwriting is detected.
```
[L0S DLnkCheckMenl 349, memory check
@@ -43,7 +52,7 @@ puмExcBuffAddr pc = 0x803ad7a4
puwExcBuffAddr lr = 0x803ad7a4
puwExcBuffAddr sp = 0Ñ…80cb7de0
puwExcBuffAddr fp = 0x80cb7dec
-*******backtrace begin*******
+***backtrace begin***
traceback 0 -- lr = 0Ñ…8037cb84
traceback 0 -- fp = 0Ñ…80cb7e1c
traceback 1 -- lr = 0Ñ…8037033c
@@ -55,4 +64,3 @@ traceback 3 -- fp = 0Ñ…80cb7ea4
traceback 4 -- lr = 0x803ad9e8
traceback 4 -- fp = 9x11111111
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
index 9372b8ae18ee255fba9f5abd8c9ca7c1a3a3946b..e9b1c0e806c3e05c83d1188a86f7e1dc67e075cc 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-oom.md
@@ -1,82 +1,56 @@
# oom
-## Command Function
+
+## Command Function
This command is used to query and set the low memory threshold and the PageCache reclaim threshold.
-## Syntax
+
+## Syntax
oom
-oom -i \[_interval_\]
+oom -i [_interval_]
-oom -m \[_mem byte_\]
+oom -m [_mem byte_]
-oom -r \[_mem byte_\]
+oom -r [_mem byte_]
oom -h | --help
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--i [interval]
- |
-Sets the interval (in ms) for checking the Out Of Memory (OOM) thread task.
- |
-100 to 10000
- |
-
--m [mem byte]
- |
-Sets the low memory threshold (in MB).
- |
-0 (disables the low memory check) to 1
- |
-
--r [mem byte]
- |
-Sets the PageCache reclaim threshold.
- |
-Ranging from the low memory threshold to the maximum available system memory
- |
-
--h | --help
- |
-Displays help information.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-If no parameter is specified, this command displays the current OOM configuration.
-
-> **NOTE:**
->If the system memory is insufficient, the system displays a message indicating the insufficiency.
-
-## Example
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ----------------------- | ------------------------------- | ------------------------------------------------------------ |
+| -i [interval] | Sets the interval (in ms) for checking the Out Of Memory (OOM) thread task.| [100, 10000] |
+| -m [mem byte] | Sets the low memory threshold (in MB). | 0 to 1
The value **0** means not to perform the low memory threshold check. |
+| -r [mem byte] | Sets the PageCache reclaim threshold. | Low memory threshold to the maximum available memory of the system
Generally, the size of a PageCache is 4 KB. Sometimes, it is 16 KB to 64 KB. |
+| -h \| --help | Displays help information. | N/A |
+
+
+## Usage Guidelines
+
+ If no parameter is specified, this command displays the current OOM configuration.
+
+> **NOTE**
+> If the system memory is insufficient, the system displays a message indicating the insufficiency.
+
+
+## Example
Run the following commands:
-- oom
-- oom -i 100
+- oom
+- oom -i 100
+
-## Output
+## Output
+
+Example 1: The OOM configuration is displayed by default.
-Example 1: displaying OOM configuration
```
OHOS:/$ oom
@@ -88,6 +62,7 @@ OHOS:/$ oom
Information displayed when the system memory is insufficient:
+
```
T:20 Enter:IT MEM 00M 001
[oom] OS is in low memory state
@@ -124,7 +99,7 @@ R10 = 0xa0a0a0a
R11 = 0x20e20c8c
R12 = 0Ñ…0
CPSR = 0Ñ…80000010
-*******backtrace beain*******
+***backtrace beain***
traceback 0 -- lr = 0x9242e1c fp = 0Ñ…20e20cc4 lr in /usr/bin/testsuits apr 0x4be1c
traceback 1 -- 1r = 0Ñ…92430cc fp = 0x20e20cdc lr in /usr/bin/testsuits app --> 0x4c0cc
traceback 2 -- 1r = 0x9396ab0 fp = 0x20e20cec lr in /usr/bin/testsuits app -> 0Ñ…19fab0
@@ -133,49 +108,23 @@ traceback 4 -- lr = 0x92427d4 fp = 0x20e20d44 lr in /usr/bin/testsuits app --> 0
traceback 5 -- 1r = 0x20c4df50 fp = 0Ñ…b0b0b0b 1r in /1ib/libc.so - -> 0x62f50
```
-Example 2: setting the OOM check interval to 100 ms
+
+Example 2: The OOM check interval is set to 100 ms.
+
+
```
OHOS:/$ oom -i 100
[oom] set oom check interval (100)ms successful
```
-**Table 2** Output
-
-
-Output
- |
-Description
- |
-
-
-[oom] OS is in low memory state
-total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte), free: 0x7f000(byte), low memory threshold: 0x80000(byte)
- |
-The operating system has low memory.
-The available physical memory in the operating system is 0x1bcf000 bytes, 0x1b50000 bytes have been used, and 0x7f000 bytes are available. The current low memory threshold is 0x80000 bytes.
- |
-
-[oom] candidate victim process init pid: 1, actual phy mem byte: 82602
- |
-Memory usage of each process. The physical memory occupied by the init process is 82602 bytes.
- |
-
-[oom] candidate victim process UserProcess12 pid: 12, actual phy mem byte: 25951558
- |
-The actual memory used by the UserProcess12 process is 25951558 bytes.
- |
-
-[oom] max phy mem used process UserProcess12 pid: 12, actual phy mem: 25951558
- |
-The process that uses the most memory currently is UserProcess12.
- |
-
-excFrom: User!
- |
-The system memory is low, and the UserProcess12 process fails to apply for memory and exits.
- |
-
-
-
+**Table 2** Output description
+
+| Parameter | Description |
+| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| [oom] OS is in low memory state
total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte), free: 0x7f000(byte), low memory threshold: 0x80000(byte) | The OS has low memory.
The total physical memory is **0x1bcf000** bytes, **0x1b50000** bytes are used, and **0x7f000** bytes are left.
The current lower memory threshold is **0x80000** bytes. |
+| [oom] candidate victim process init pid: 1, actual phy mem byte: 82602 | The memory occupied by the **init** process is 82602 bytes. |
+| [oom] candidate victim process UserProcess12 pid: 12, actual phy mem byte: 25951558 | The memory used by the **UserProcess12** process is **25951558** bytes. |
+| [oom] max phy mem used process UserProcess12 pid: 12, actual phy mem: 25951558 | The process that uses the most memory currently is **UserProcess12**. |
+| excFrom: User! | The system memory is low, and the **UserProcess12** process fails to apply for memory and exits. |
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
index ffa823db63ab1ff65a94f364c5f461e158b20096..18b86951a2c522947589659e795aa783d8f2a54b 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-pmm.md
@@ -1,26 +1,32 @@
# pmm
-## Command Function
+
+## Command Function
This command is used to check the usage of the physical pages of the system memory and the page cache.
-## Syntax
+
+## Syntax
pmm
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
+
+This command is available only in the **Debug** version.
-## Usage
-This command is available only in the **Debug** version.
+## Example
-## Example
+Run **pmm**.
-Run **pmm**.
-## Output
+## Output
Usage of physical pages:
@@ -49,62 +55,17 @@ Vnode number = 67
Vnode memory size = 10720(B)
```
-**Table 1** Output
-
-
-Parameter
- |
-Description
- |
-
-
-phys_seg
- |
-Address of the physical page control block
- |
-
-base
- |
-First physical page address, that is, start address of the physical page memory
- |
-
-size
- |
-Size of the physical page memory
- |
-
-free_pages
- |
-Number of free physical pages
- |
-
-active anon
- |
-Number of active anonymous pages in the page cache
- |
-
-inactive anon
- |
-Number of inactive anonymous pages in the page cache
- |
-
-active file
- |
-Number of active file pages in the page cache
- |
-
-inactive file
- |
-Number of inactive file pages in the page cache
- |
-
-pmm pages
- |
-total: total number of physical pages.
-used: number of used physical pages.
-free: number of free physical pages.
- |
-
-
-
+**Table 1** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| phys_seg | Address of the physical page control block.|
+| base | First physical page address, that is, start address of the physical page memory.|
+| size | Size of the physical page memory.|
+| free_pages | Number of free physical pages.|
+| active anon | Number of active anonymous pages in the page cache.|
+| inactive anon | Number of inactive anonymous pages in the page cache.|
+| active file | Number of active file pages in the page cache.|
+| inactive file | Number of inactive file pages in the page cache.|
+| pmm pages | **total** indicates the total number of physical pages.
**used** indicates the number of used physical pages.
**free** indicates the number of idle physical pages. |
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
index 000cc3873b7069ad2711a73b818a5330ebb775c3..1946b80351426b884b1a6c5e18e649e5c3b153ca 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reboot.md
@@ -1,26 +1,31 @@
# reboot
-## Command Function
+
+## Command Function
This command is used to restart a device.
-## Syntax
+
+## Syntax
reboot
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
-## Usage
+After the **reboot** command is executed, the device restarts immediately.
-After the **reboot** command is executed, the device restarts immediately.
-## Example
+## Example
reboot
-## Output
-None
+## Output
+None.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
index 7fca8b04a7cebdd6fb998c3f8472c7b1950faa3e..d8e9151e3b61ea9ec08674c5dff9ced753d16a44 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-reset.md
@@ -1,26 +1,31 @@
# reset
-## Command Function
+
+## Command Function
This command is used to restart a device.
-## Syntax
+
+## Syntax
reset
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
-## Usage
+After the **reset** command is executed, the device restarts immediately.
-After the **reset** command is executed, the device restarts immediately.
-## Example
+## Example
-Run **reset**.
+Run **reset**.
-## Output
-None
+## Output
+None.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
index 61e9c5cce389ef7a90eb244f224ded03f00664d1..b079f1880ad5a4f2dc289a0497997694db7b5562 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sem.md
@@ -1,58 +1,44 @@
# sem
-## Command Function
+
+## Command Function
This command is used to query information about kernel semaphores.
-## Syntax
-sem \[_ID__ / fulldata_\]
+## Syntax
+
+sem [_ID__ / fulldata_]
+
+
+## Parameters
+
+**Table 1** Parameter description
-## Parameters
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| ID | Specifies the semaphore ID.| [0, 1023] or [0x0, 0x3FF]|
+| fulldata | Displays information about all semaphores in use.
The displayed information includes **SemID**, **Count**, **Original Count**, **Creator TaskEntry**, and **Last Access Time**. | N/A |
-**Table 1** Parameter description
-
-Parameter
- |
-Parameters
- |
-Value Range
- |
-
-
-ID
- |
-Specifies the semaphore ID.
- |
-[0, 1023] or [0x0, 0x3FF]
- |
-
-fulldata
- |
-Queries information about all the semaphores in use. The information includes SemID, Count, OriginalCount, Creator(TaskEntry), and LastAccessTime.
- |
-N/A
- |
-
-
-
+## Usage Guidelines
-## Usage
+- If no parameter is specified, this command displays the semaphore IDs and the number of times that each semaphore is used.
-- If no parameter is specified, this command displays the semaphore IDs and the number of times that each semaphore is used.
-- If **ID** is specified, the use of the specified semaphore is displayed.
-- The **fulldata** parameter depends on **LOSCFG\_DEBUG\_SEMAPHORE**. Before using this parameter, select **Enable Semaphore Debugging** on **menuconfig**.
+- If **ID** is specified, the use of the specified semaphore is displayed.
- Debug ---\> Enable a Debug Version ---\> Enable Debug LiteOS Kernel Resource ---\> Enable Semaphore Debugging
+- The **fulldata** parameter depends on **LOSCFG_DEBUG_SEMAPHORE**. Before using this parameter, set **Enable Semaphore Debugging** to **Yes** on **menuconfig**.
+ **Debug** ---> **Enable a Debug Version** ---> **Enable Debug LiteOS Kernel Resource** ---> E**nable Semaphore Debugging**
-## Example
+## Example
-- Run **sem**.
-- Configure **LOSCFG\_DEBUG\_SEMAPHORE** and run **sem fulldata**.
+- Run **sem**.
-## Output
+- Configure **LOSCFG_DEBUG_SEMAPHORE** and run **sem fulldata**.
+
+
+## Output
Example 1: brief semaphore information
@@ -81,31 +67,17 @@ OHOS # sem
0x00000006 0
```
-**Table 2** Output
-
-
-Parameter
- |
-Description
- |
-
-
-SemID
- |
-Semaphore ID
- |
-
-Count
- |
-Number of times that the semaphore is used
- |
-
-
-
-
-> **NOTE**
->The **ID** value can be in decimal or hexadecimal format.
->When **ID** is a value within \[0, 1023\], semaphore information of the specified ID is displayed. If the specified semaphore is not used, a message is displayed to inform you of this case. For other values, a message is displayed indicating that the parameter is incorrect.
+**Table 2** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| SemID | Semaphore ID.|
+| Count | Number of times that the semaphore is used.|
+
+> **NOTE**
+> The **ID** value can be in decimal or hexadecimal format.
+>
+> When **ID** is a value within [0, 1023], semaphore information of the specified ID is displayed. If the specified semaphore is not used, a message is displayed to inform you of this case. For other values, a message is displayed indicating that the parameter is incorrect.
Example 2: detailed semaphore information
@@ -141,40 +113,12 @@ Used Semaphore List:
0x38 0x1 0x1 0x404978fc 0x395
```
-**Table 3** Output description
-
-
-Parameter
- |
-Description
- |
-
-
-SemID
- |
-Semaphore ID
- |
-
-Count
- |
-Number of times that the semaphore is used
- |
-
-OriginalCount
- |
-Original count of the semaphore
- |
-
-Creator
- |
-Address of the entry function of the thread used to create the semaphore
- |
-
-LastAccessTime
- |
-Last time when the semaphore was accessed
- |
-
-
-
+**Table 3** Output description
+| Parameter| Description|
+| -------- | -------- |
+| SemID | Semaphore ID.|
+| Count | Number of times that the semaphore is used.|
+| OriginalCount | Original count of the semaphore.|
+| Creator | Address of the entry function of the thread used to create the semaphore.|
+| LastAccessTime | Last time when the semaphore was accessed.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
index da1aad64eac9f0e54ce8fe75f41a8da78ef344ef..9f04a4e979c0789f75b62c9adc36ac7f6ec520e5 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-stack.md
@@ -1,27 +1,32 @@
# stack
-## Command Function
+## Command Function
This command is used to check the usage of each stack in the system.
-## Syntax
+
+## Syntax
stack
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
+
+None.
-## Usage
-None
+## Example
-## Example
+Run **stack**.
-Run **stack**.
-## Output
+## Output
System stack usage:
@@ -35,40 +40,12 @@ OHOS # stack
exc_stack 0 0x405c9000 0x1000 0x0
```
-**Table 1** Output
-
-
-Parameter
- |
-Description
- |
-
-
-stack name
- |
-Name of the stack
- |
-
-cpu id
- |
-CPU ID
- |
-
-stack addr
- |
-Stack address
- |
-
-total size
- |
-Total stack size
- |
-
-used size
- |
-Size of the stack used
- |
-
-
-
+**Table 1** Output description
+| Parameter| Description|
+| -------- | -------- |
+| stack name | Name of the stack.|
+| cpu id | CPU number.|
+| stack addr | Stack address.|
+| total size | Total stack size.|
+| used size | Size of the stack used.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
index 7e23b3b60dcd0ee80701d5d42b0f4ac267e444d2..479daa7ece87d057cba58783ce7aa50ff223a930 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-su.md
@@ -1,56 +1,43 @@
# su
-## Command Function
+
+## Command Function
This command is used to switch the user account.
-## Syntax
-su \[_uid_\] \[_gid_\]
+## Syntax
+
+su [_uid_] [_gid_]
+
+
+## Parameters
+
+**Table 1** Parameter description
-## Parameters
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| uid | Specifies the ID of the target user.| - Left blank
- [0, 60000] |
+| gid | Specifies the ID of the target user group.| - Left blank
- [0, 60000] |
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-uid
- |
-Specifies the ID of the target user.
- |
-
- |
-
-gid
- |
-Specifies the ID of the target user group.
- |
-
- |
-
-
-
+## Usage Guidelines
-## Usage
+- If no parameter is specified, the **su** command switches to user **root** by default. The **uid** and **gid** for user **root** are both **0**.
-- If no parameter is specified, the **su** command switches to user **root** by default. The **uid** and **gid** for user **root** are both **0**.
-- If **uid** and **gid** are specified, this command allows commands to be executed as the user with the specified **uid** and **gid**.
-- If the input parameter is out of the range, an error message will be printed.
+- If **uid** and **gid** are specified, this command allows commands to be executed as the user with the specified **uid** and **gid**.
-## Example
+- If the input parameter is out of the range, an error message will be printed.
-Run **su 1000 1000**.
-## Output
+## Example
-Switching to the user with both **uid** and **gid** of **1000**:
+Run **su 1000 1000**.
+
+
+## Output
+
+The user with both **uid** and **gid** of **1000** is switched.
```
OHOS # ls
@@ -63,4 +50,3 @@ Directory /data/system/param:
-rw-r--r-- O u:1000 g:1000 hello 2.txt
-гw-r--r-- 0 u:0 g:0 hello_1.txt
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
index a764d66fc83e1d7d8b2e2eabacfbefc3a61462f7..b436a80e4911073c6df1db96ff6b56e4752d13b0 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-swtmr.md
@@ -1,50 +1,42 @@
# swtmr
-## Command Function
+## Command Function
This command is used to query information about system software timers.
-## Syntax
-swtmr \[_ID_\]
+## Syntax
-## Parameters
+swtmr [_ID_]
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-ID
- |
-Specifies the ID of a software timer.
- |
-[0,0xFFFFFFFF]
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-- If no parameter is specified, information about all software timers is displayed.
-- If the **ID** parameter is specified, information about the specified software timer is displayed.
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| ID | Specifies the ID of a software timer.| [0, 0xFFFFFFFF] |
-## Example
+
+## Usage Guidelines
+
+- If no parameter is specified, information about all software timers is displayed.
+
+- If the **ID** parameter is specified, information about the specified software timer is displayed.
+
+
+## Example
Run the following commands:
-- swtmr
-- swtmr 1
+- swtmr
+
+- swtmr 1
-## Output
+
+## Output
Example 1: information about all software timers
@@ -76,56 +68,19 @@ SwTmrID State Mode Interval Count Arg handlerAddr
0x00000001 Ticking Period 1000 841 0x00000000 0x4037fc04
```
-**Table 2** Output
-
-
-Parameter
- |
-Description
- |
-
-
-SwTmrID
- |
-ID of the software timer
- |
-
-State
- |
-Status of the software timer
-The value can be UnUsed, Created, or Ticking.
- |
-
-Mode
- |
-Mode of the software timer
-The value can be Once, Period, or NSD (one-shot timer that will not be automatically deleted after the timer has expired).
- |
-
-Interval
- |
-Number of ticks for the software timer
- |
-
-Count
- |
-Number of times that the software timer has been used
- |
-
-Arg
- |
-Input parameter
- |
-
-handlerAddr
- |
-Address of the callback
- |
-
-
-
-
-> **NOTE:**
->- The **ID** value can be in decimal or hexadecimal format.
->- If the **ID** value is within the range of \[0, _Number of current software timers - 1_\], the status of the specified software timer is returned. For other values, an error message is displayed.
-
+ **Table 2** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| SwTmrID | ID of the software timer.|
+| State | Status of the software timer.
The status may be **UnUsed**, **Created**, or **Ticking**.|
+| Mode | Mode of the software timer.
The value can be **Once**, **Period**, or **NSD** (one-shot timer that will not be automatically deleted after the timer has expired).|
+| Interval | Number of ticks for the software timer.|
+| Count | Number of times that the software timer has been used.|
+| Arg | Input parameter.|
+| handlerAddr | Address of the callback.|
+
+> **NOTE**
+> - The **ID** value can be in decimal or hexadecimal format.
+>
+> - If the **ID** value is within the range of [0, *Number of current software timers - 1*], the status of the specified software timer is returned. Otherwise, an error code is returned.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
index c1a81444f8b4af508906bd02a7ca500a36e7c0ad..b476c06d33d370470e0d291593a99a516b92ea4a 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-sysinfo.md
@@ -1,26 +1,32 @@
# systeminfo
-## Command Function
+
+## Command Function
This command is used to display the resource usage of the current operating system, including tasks, semaphores, mutexes, queues, and software timers.
-## Syntax
+
+## Syntax
systeminfo
-## Parameters
-None
+## Parameters
+
+None.
+
-## Usage
+## Usage Guidelines
-None
+None.
-## Example
-Run **systeminfo**.
+## Example
-## Output
+Run **systeminfo**.
+
+
+## Output
Usage of system resources:
@@ -34,60 +40,15 @@ OHOS:/$ systeminfo
SwTmr 20 1024 YES
```
-**Table 1** Output
-
-
-Parameter
- |
-Description
- |
-
-
-Module
- |
-Module name
- |
-
-Used
- |
-Used resources
- |
-
-Total
- |
-Total resources
- |
-
-Enabled
- |
-Whether the module is enabled
- |
-
-Task
- |
-Task
- |
-
-Sem
- |
-Semaphore
- |
-
-Mutex
- |
-Mutex
- |
-
-Queue
- |
-Message queue
- |
-
-SwTmr
- |
-Software timer
- |
-
-
-
-
+**Table 1** Output description
+
+| Parameter | Description |
+| ------- | -------------- |
+| Module | Module name. |
+| Used | Used resources. |
+| Total | Total resources. |
+| Enabled | Whether the module is enabled.|
+| Task | Task. |
+| Sem | Semaphore. |
+| Queue | Using queues. |
+| SwTmr | Software timer. |
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
index 2510d417ccf6bc7e9d398daadf9941bd87e0cb1c..704943bc02067ad14ef153420227beff568ec773 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-task.md
@@ -1,47 +1,38 @@
# task
-## Command Function
+
+## Command Function
This command is used to query information about processes and threads.
-## Syntax
+
+## Syntax
task/task -a
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--a
- |
-Displays all information.
- |
-N/A
- |
-
-
-
-
-## Usage
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| -a | Displays all information.| N/A |
+
+
+## Usage Guidelines
If no parameter is specified, partial task information is displayed by default.
-## Example
-Run **task**.
+## Example
+
+Run **task**.
-## Output
-Task information \(partial\):
+## Output
+
+Task information (partial):
```
OHOS # task
@@ -55,6 +46,7 @@ OHOS # task
6 1 6 0 Pending 0x688000 0x137000 0x11c518 0.0 media_server
7 1 7 0 Pending 0x9d2000 0x103000 0xa1ddf 0.89 wms_server
8 1 1 1000 Running 0x2bf000 0x8f000 0x2a8c6 0.0 shell
+ 9 5 5 101 Pending 0x11ea000 0x2f9000 0x20429d 0.97 com.example.launcher
11 1 11 0 Pending 0x4d4000 0x112000 0xe0ad7 0.0 deviceauth_service
12 1 12 0 Pending 0x34f000 0xbd000 0x519ee 0.0 sensor_service
13 1 13 2 Pending 0x34e000 0xb3000 0x523d9 0.0 ai_server
@@ -68,75 +60,19 @@ OHOS # task
7 2 0x3 -1 Pending 0x4e20 0xa5c 0.0 0 PlatformWorkerThread
```
-**Table 2** Output
-
-
-Parameter
- |
-Description
- |
-
-
-PID
- |
-Process ID
- |
-
-PPID
- |
-Parent process ID
- |
-
-PGID
- |
-Process group ID
- |
-
-UID
- |
-User ID
- |
-
-Status
- |
-Current task status
- |
-
-CPUUSE10s
- |
-CPU usage within last 10 seconds
- |
-
-PName
- |
-Process name
- |
-
-TID
- |
-Task ID
- |
-
-StackSize
- |
-Size of the task stack
- |
-
-WaterLine
- |
-Peak value of the stack used
- |
-
-MEMUSE
- |
-Memory usage
- |
-
-TaskName
- |
-Task name
- |
-
-
-
-
+**Table 2** Output description
+
+| Parameter| Description|
+| -------- | -------- |
+| PID | Process ID.|
+| PPID | Parent process ID.|
+| PGID | Process group ID.|
+| UID | User ID.|
+| Status | Current task status.|
+| CPUUSE10s | CPU usage within last 10 seconds.|
+| PName | Name of the process.|
+| TID | Task ID.|
+| StackSize | Size of the task stack.|
+| WaterLine | Peak value of the stack used.|
+| MEMUSE | Memory usage.|
+| TaskName | Task name.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
index 4fa4959b1b082d0394b78ef271ac9b89a4f29901..34473f90c320656aecea022849e401b515b08c18 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-top.md
@@ -1,56 +1,40 @@
# top
-## Command Function
+
+## Command Function
This command is used to query process and thread information.
-## Syntax
-
-top \[_-a_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Default Value
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the top command.
- |
-N/A
- |
- |
-
--a
- |
-Displays detailed information.
- |
-N/A
- |
- |
-
-
-
-
-## Usage
-
-If no parameter is specified, this command displays process and thread information of some tasks by default.
-
-## Example
-
-Run **top**.
-
-## Output
+
+## Syntax
+
+top [_-a_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description |
+| ------ | --------------------------- |
+| --help | Displays the parameters supported by the **top** command.|
+| -a | Displays detailed information. |
+
+
+## Usage Guidelines
+
+If no parameter is specified, partial task information is displayed by default.
+
+## Note
+
+Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
+
+Run **top**.
+
+
+## Output
Command output
@@ -97,75 +81,19 @@ OHOS:/$ top
64 2 0x3 -1 Pending 0x4000 0x244 0.0 0 USB_NGIAN_BULK_TasK
```
-**Table 2** Output description
-
-
-Parameter
- |
-Description
- |
-
-
-PID
- |
-Process ID
- |
-
-PPID
- |
-Parent process ID
- |
-
-PGID
- |
-Process group ID
- |
-
-UID
- |
-User ID
- |
-
-Status
- |
-Current task status
- |
-
-CPUUSE10s
- |
-CPU usage within last 10 seconds
- |
-
-PName
- |
-Process name
- |
-
-TID
- |
-Task ID
- |
-
-StackSize
- |
-Size of the task stack
- |
-
-WaterLine
- |
-Peak value of the stack used
- |
-
-MEMUSE
- |
-Memory usage
- |
-
-TaskName
- |
-Task name
- |
-
-
-
-
+**Table 2** Output description
+
+| Parameter | Description |
+| --------- | ----------------- |
+| PID | Process ID. |
+| PPID | Parent process ID. |
+| PGID | Process group ID. |
+| UID | User ID. |
+| Status | Current task status. |
+| CPUUSE10s | CPU usage within last 10 seconds.|
+| PName | Name of the process. |
+| TID | Task ID. |
+| StackSize | Size of the task stack. |
+| WaterLine | Peak value of the stack used. |
+| MEMUSE | Memory usage. |
+| TaskName | Task name. |
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
index 525cb31fef3903869fc35b478203e734cebde25d..ab22f6a1c51e0c1f12f4e78eb84415a52d218d29 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-uname.md
@@ -1,84 +1,56 @@
# uname
-## Command Function
+
+## Command Function
This command is used to display the name, version creation time, system name, and version information of the current operating system.
-## Syntax
-
-uname \[_-a | -s | -r | -m | -n | -v | --help_\]
-
-**Table 1** Parameters
-
-
-Parameter
- |
-Parameters
- |
-
-
---help
- |
-Displays help information.
- |
-
-No parameter
- |
-Displays the operating system name by default.
- |
-
--a
- |
-Displays all information.
- |
-
--s
- |
-Displays the operating system name.
- |
-
--r
- |
-Displays the kernel release version.
- |
-
--m
- |
-Displays the operating system architecture name.
- |
-
--n
- |
-Displays the network domain name of the host.
- |
-
--v
- |
-Displays version information.
- |
-
-
-
-
-## Usage
-
-- The **uname** command displays the name of the current operating system by default.
-- Except **--help** and **-a**, other parameters can be used together. **uname -a** is equivalent to **uname -srmnv**.
-
-## Example
+
+## Syntax
+
+uname [_-a | -s | -r | -m | -n | -v | --help_]
+
+
+**Table 1** Parameter description
+
+| Parameter | Description |
+| ------ | ----------------------- |
+| --help | Displays help information.|
+| No parameter| Displays the operating system name by default. |
+| -a | Displays all data. |
+| -s | Displays the operating system name. |
+| -r | Displays the kernel release version. |
+| -m | Displays the operating system architecture name. |
+| -n | Displays the network domain name of the host. |
+| -v | Displays version information. |
+
+
+## Usage Guidelines
+
+- The **uname** command displays the name of the current operating system by default.
+
+- Except **--help** and **-a**, other parameters can be used together. **uname -a** is equivalent to **uname -srmnv**.
+
+## Note
+
+The **-r**, **-m**, and **-n** parameters are not supported currently. mksh supports these parameters. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- uname -a
-- uname -ms
+- uname -a
+
+- uname -ms
-## Output
+
+## Output
Example 1: all information of the operating system
```
OHOS:/$ uname -a
-LiteOS hisilicon 2.0.x.x Huawei LiteOS 2.0.x.x Oct 21 2021 17:39:32 Cortex-A7
+LiteOS hisilicon 2.0.0.37 LiteOS 2.0.0.37 Oct 21 2021 17:39:32 Cortex-A7
OHOS:/$
```
@@ -89,4 +61,3 @@ OHOS:/$ uname -ms
LiteOS Cortex-A7
OHOS:/$
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
index cce14dd6bbca807f007073d792efcfb8e3577823..860a23db1d717ca3d2d79df7184491a2cbb969d9 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-vmm.md
@@ -1,60 +1,40 @@
# vmm
-## Command Function
+
+## Command Function
This command is used to query the virtual memory used by a process.
-## Syntax
-
-- vmm \[_-a / -h / --help_\]
-- vmm \[_pid_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--a
- |
-Displays the virtual memory usage of all processes.
- |
-N/A
- |
-
--h | --help
- |
-Displays help information.
- |
-N/A
- |
-
-pid
- |
-Specifies the ID of the process to query.
- |
-[0,63]
- |
-
-
-
-
-## Usage
+
+## Syntax
+
+- vmm [_-a / -h / --help_]
+
+- vmm [_pid_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| -a | Displays the virtual memory usage of all processes.| N/A |
+| -h \| --help | Displays help information.| N/A |
+| pid | Specifies the ID of the process to query.| [0, 63] |
+
+
+## Usage Guidelines
By default, this command displays the virtual memory usage of all processes.
-## Example
-Run **vmm 3**.
+## Example
-## Output
+Run **vmm 3**.
+
+
+## Output
Virtual memory usage of process 3:
@@ -82,92 +62,25 @@ OHOS # vmm 3
0x408c3ce0 /lib/libc++.so 0x23cb0000 0x00001000 CH US RD WR 1 1
```
-**Table 2** Basic process information
-
-
-Parameter
- |
-Description
- |
-
-
-PID
- |
-Process ID
- |
-
-aspace
- |
-Address of the virtual memory control block
- |
-
-name
- |
-Process name
- |
-
-base
- |
-Start address of the virtual memory
- |
-
-size
- |
-Size of virtual memory
- |
-
-pages
- |
-Number of used physical pages
- |
-
-
-
-
-**Table 3** Virtual memory region information
-
-
-Parameter
- |
-Description
- |
-
-
-region
- |
-Address of the control block in the virtual memory region
- |
-
-name
- |
-Name of the virtual memory region
- |
-
-base
- |
-Start address of the virtual memory region
- |
-
-size
- |
-Size of the virtual memory region
- |
-
-mmu_flags
- |
-MMU mapping attribute of the virtual memory region
- |
-
-pages
- |
-Number of used physical pages, including that of the shared memory
- |
-
-pg/ref
- |
-Number of used physical pages
- |
-
-
-
-
+**Table 2** Basic process information
+
+| Parameter| Description|
+| -------- | -------- |
+| PID | Process ID.|
+| aspace | Address of the virtual memory control block.|
+| name | Process name.|
+| base | Start address of the virtual memory.|
+| size | Total Virtual Memory.|
+| pages | Number of used physical pages.|
+
+**Table 3** Virtual memory interval information
+
+| Parameter| Description|
+| -------- | -------- |
+| region | Address of the control block in the virtual memory region.|
+| name | Name of the virtual memory region.|
+| base | Start address of the virtual memory region.|
+| size | Size of the virtual memory region.|
+| mmu_flags | MMU mapping attribute of the virtual memory region.|
+| pages | Number of used physical pages, including that of the shared memory.|
+| pg/ref | Number of used physical pages.|
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md b/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
index 343634d384010dd73dc69708e9d000a92925900e..9282a3edb469f6f01e78b13f5c72bb7cc11e9e64 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-cmd-watch.md
@@ -1,88 +1,44 @@
# watch
-## Command Function
+
+## Command Function
This command is used to periodically run the specified command and display its execution result.
-## Syntax
-
-- watch
-- watch \[_-c/-n/-t/--count/--interval/-no-title/--over_\] \[_command_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Default Value
- |
-Value Range
- |
-
-
--c / --count
- |
-Specifies the number of times that the specified command is executed.
- |
-0xFFFFFF
- |
-(0, 0xFFFFFF]
- |
-
--n / --interval
- |
-Specifies the interval (in seconds) for periodically running the specified command.
- |
-1s
- |
-(0, 0xFFFFFF]
- |
-
--t / -no-title
- |
-Disables time display on the top.
- |
-N/A
- |
-N/A
- |
-
-command
- |
-Specifies the command to be monitored.
- |
-N/A
- |
-N/A
- |
-
---over
- |
-Stops the current command monitoring.
- |
-N/A
- |
-N/A
- |
-
-
-
-
-## Usage
-
-You can run the **watch --over** command to stop monitoring of the specified command.
-
-## Example
-
-Run **watch -n 2 -c 6 task**.
-
-## Output
-
-Example: The **task** command is executed six times at an interval of 2 seconds.
+
+## Syntax
+
+- watch
+
+- watch [_-c/-n/-t/--count/--interval/-no-title/--over_] [_command_]
+
+
+## Parameters
+
+ **Table 1** Parameter description
+
+| Parameter| Description| Default Value| Value Range|
+| -------- | -------- | -------- | -------- |
+| -c / --count | Specifies the number of times that the specified command is executed.| 0xFFFFFF | (0, 0xFFFFFF]|
+| -n / --interval | Specifies the interval for running the command, in seconds.| 1s | (0, 0xFFFFFF]|
+| -t / -no-title | Disables time display on the top.| N/A | N/A |
+| command | Specifies the command to be monitored.| N/A | N/A |
+| --over | Stops the current command monitoring.| N/A | N/A |
+
+
+## Usage Guidelines
+
+You can run the **watch --over** command to stop monitoring of the specified command.
+
+
+## Example
+
+Run **watch -n 2 -c 6 task**.
+
+
+## Output
+
+Example: The **task** command is executed six times at an interval of 2 seconds.
```
OHOS # watch -n 2 -c 6 task
@@ -121,4 +77,3 @@ OHOS #
17 2 0x3 0 Running 0x3000 0x73c 0.0 0 shellcmd_watch
18 2 0x3 -1 Pending 0x2710 0x3ac 0.0 0 GPIO_IRQ_TSK_0_4
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
index 7a4fd54ccea998e7a1621eeb2a7d082f1ab5865d..d11c33deb1a565600d0117a21b2e0b4db2e14b02 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cat.md
@@ -1,50 +1,41 @@
# cat
-## Command Function
+
+
+## Command Function
This command is used to display the content of a text file.
-## Syntax
-cat \[_pathname_\]
+## Syntax
+
+cat [_pathname_]
+
-## Parameters
+## Parameters
-**Table 1** Parameter description
+**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-pathname
- |
-Specifies the file path.
- |
-An existing file
- |
-
-
-
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| pathname | Specifies the file path. | An existing file |
-## Usage
-Run the **cat** \[_pathname_\] command to display the content of a text file.
+## Usage Guidelines
-## Example
+Run the **cat** [*pathname*] command to display the content of a text file.
-Run **cat hello-harmony.txt**.
-## Output
+## Example
-Content of **hello-harmony.txt**
+Run **cat hello-openharmony.txt**.
+
+
+## Output
+
+Content of **hello-openharmony.txt**
```
-OHOS # cat hello-harmony.txt
-OHOS # Hello Harmony ;)
+OHOS # cat hello-openharmony.txt
+OHOS # Hello openharmony ;)
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
index 187e454a2ad69814abdd8f15adab12cb39370872..5318eeb638bd75e0f9b52d4d95bc8575208905b3 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cd.md
@@ -1,51 +1,46 @@
# cd
-## Command Function
+## Command Function
This command is used to change the current working directory.
-## Syntax
-cd \[_path_\]
+## Syntax
-## Parameters
+cd [_path_]
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-path
- |
-Specifies the target file path.
- |
-You must have the execution (search) permission for the specified directory.
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-- If **path** is not specified, this command switches to the root directory.
-- If **path** is specified, this command switches to the specified directory.
-- The **path** value starting with a slash \(/\) represents the root directory.
-- The **path** value starting with a dot \(.\) represents the current directory.
-- The **path** value starting with two dots \(..\) represents the parent directory.
-- You can run **cd -** to alternate between two directories that are recently accessed.
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| path | Specifies the path of the new directory. | You must have the execution (search) permission on the specified directory.|
-## Example
-Run **cd ..**.
+## Usage Guidelines
-## Output
+- If **path** is not specified, this command switches to the root directory.
+
+- If **path** is specified, this command switches to the specified directory.
+
+- The **path** value starting with a slash (/) represents the root directory.
+
+- The **path** value starting with a dot (.) represents the current directory.
+
+- The **path** value starting with two dots (..) represents the parent directory.
+
+- You can run **cd -** to alternate between two directories that are recently accessed.
+
+
+## Example
+
+Run **cd ..**.
+
+
+## Output
Parent directory information:
@@ -55,4 +50,3 @@ OHOS:/$ ls
bin etc nfs sdcard system tmp vendor
dev lib proc storage test usr
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
index af1df3355499e935a6df4931e722282d5826c268..9163aaa988a3a7789cfc2ef40d2bca0bb8296a3c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chgrp.md
@@ -1,55 +1,43 @@
# chgrp
-## Command Function
+
+## Command Function
This command is used to change the file group.
-## Syntax
-chgrp \[_group_\] \[_pathname_\]
+## Syntax
+
+chgrp [_group_] [_pathname_]
+
+
+## Parameters
-## Parameters
+**Table 1** Parameter description
-**Table 1** Parameter description
+| Parameter | Description | Value Range |
+| -------- | ---------- | -------------- |
+| group | Specifies the target file group.| [0, 0xFFFFFFFF] |
+| pathname | Specifies the file path. | An existing file |
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-group
- |
-Specifies the target file group.
- |
-[0, 0xFFFFFFFF]
- |
-
-pathname
- |
-Specifies the file path.
- |
-An existing file
- |
-
-
-
-## Usage
+## Usage Guidelines
-- Specify **group** to change the file group.
-- For the FAT file system, this command cannot be used to change user group IDs.
+- Specify **group** to change the file group.
+- For the FAT file system, this command cannot be used to change user group IDs.
-## Example
+## Note
-Run **chgrp 100 testfile**.
+Currently, the shell does not support this command.
-## Output
+## Example
-Changing the group ID of the **testfile** file in the **dev/** directory to **100**
+Run **chgrp 100 testfile**.
+
+
+## Output
+
+Change the group ID of the **testfile** file in the **dev/** directory to **100**.
```
OHOS:/dev$ ll testfile
@@ -59,4 +47,3 @@ OHOS:/dev$ ll testfile
-rw-r--r-- 0 0 100 0 1970-01-01 00:00 testfile
OHOS:/dev$
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
index 200131874538c91c07404b94982ec77e30dcb7d4..6220230d65d4b717e9f2c481fce11f24e138bb58 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chmod.md
@@ -1,62 +1,50 @@
# chmod
-## Command Function
+
+## Command Function
This command is used to change file operation permissions.
-## Syntax
-chmod \[_mode_\] \[_filename_\]
+## Syntax
+
+chmod [_mode_] [_filename_]
+
+
+## Parameters
+
+**Table 1** Parameter description
-## Parameter Description
+| Parameter | Description | Value Range |
+| -------- | ------------------------------------------------------------ | -------------- |
+| mode | Specifies the permissions for a file or directory. The value is an octal number, representing the permission of **User** (owner), **Group** (group), or **Others** (other groups).| [0, 777] |
+| filename | Specifies the file path. | An existing file |
-**Table 1** Parameters
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-mode
- |
-Specifies the permissions for a file or directory. The value is an octal number, representing the permission of User (owner), Group (group), or Others (other groups).
- |
-[0,777]
- |
-
-filename
- |
-Specifies the file name.
- |
-An existing file
- |
-
-
-
+## Usage Guidelines
-## Usage
+- Specify **mode** to change file permissions.
-- Specify **mode** to change file permissions.
-- For the files created on the FAT file system, the file permission attributes are the same as those of the mounted nodes. Currently, the node permissions include only user read and write. The **group** and **others** permissions do not take effect. In addition, only the user read and write permissions can be modified. The read and write permissions are **rw** and **ro** only. There is no such restriction for other file systems.
+- For the files created on the FAT file system, the file permission attributes are the same as those of the mounted nodes. Currently, the node permissions include only user read and write. The **group** and **others** permissions do not take effect. In addition, only the user read and write permissions can be modified. The read and write permissions are **rw** and **ro** only. There is no such restriction for other file systems.
-## Example
+## Note
-Change the permissions on the **hello-harmony.txt** file to **644** and **777**.
+Currently, the shell does not support this command.
-## Output
+## Example
-Modifying the permissions on the **hello-harmony.txt** file in the **/dev** directory:
+Change the permissions on the **hello-openharmony.txt** file to **644** and **777**.
+
+
+## Output
+
+Modify the permissions on the **hello-openharmony.txt** file in the **/dev** directory.
```
-OHOS:/dev$ chmod 644 hello-harmony.txt
-OHOS:/dev$ ll hello-harmony.txt
--rw-r--r-- 0 0 0 0 1970-01-01 00:00 hello-harmony.txt
-OHOS:/dev$ chmod 777 hello-harmony.txt
-OHOS:/dev$ ll hello-harmony.txt
--rwxrwxrwx 0 0 0 0 1970-01-01 00:00 hello-harmony.txt
+OHOS:/dev$ chmod 644 hello-openharmony.txt
+OHOS:/dev$ ll hello-openharmony.txt
+-rw-r--r-- 0 0 0 0 1970-01-01 00:00 hello-openharmony.txt
+OHOS:/dev$ chmod 777 hello-openharmony.txt
+OHOS:/dev$ ll hello-openharmony.txt
+-rwxrwxrwx 0 0 0 0 1970-01-01 00:00 hello-openharmony.txt
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md b/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
index 3a4006df874d5723184968c92472a6aeefed8f1e..fdc738d7ea66ae707c243cf650f8b946761f1a51 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-chown.md
@@ -1,54 +1,42 @@
# chown
-## Command Function
+
+## Command Function
This command is used to change the owner of a file.
-## Syntax
-
-chown \[_owner_\] \[_pathname_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-owner
- |
-Specifies the file owner.
- |
-[0,0xFFFFFFFF]
- |
-
-pathname
- |
-Specifies the file path.
- |
-An existing file
- |
-
-
-
-
-## Usage
+
+## Syntax
+
+chown [_owner_] [_pathname_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| -------- | ------------ | -------------- |
+| owner | Specifies the file owner. | [0, 0xFFFFFFFF] |
+| pathname | Specifies the file path. | An existing file |
+
+
+## Usage Guidelines
This command does not apply to the FAT file system.
-## Example
+## Note
+
+Currently, the shell does not support this command.
-Run **chown 100 testfile**.
+## Example
-## Output
+Run **chown 100 testfile**.
-Changing the UID of the **testfile** file in **/dev** to **100**:
+
+## Output
+
+Change the UID of the **testfile** file in **/dev** to **100**.
```
OHOS:/dev$ touch testfile
@@ -58,4 +46,3 @@ OHOS:/dev$ chown 100 testfile
OHOS:/dev$ ll testfile
-rw-r--r-- 0 100 100 0 1970-01-01 00:00 testfile
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md b/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
index b191a7fb5260b869905b47bad385db78c273afe4..c484883580547181041426680f1f797cc77d5a55 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-cp.md
@@ -1,80 +1,63 @@
# cp
-## Command Function
+
+## Command Function
This command is used to create a copy for a file.
-## Syntax
-
-cp \[_SOURCEFILE_\] \[_DESTFILE_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays help information.
- |
-N/A
- |
-
-SOURCEFILE
- |
-Specifies the path of the source file.
- |
-This command does not support copy of a directory, but supports copy of multiple files at a time.
- |
-
-DESTFILE
- |
-Specifies the destination file path.
- |
-Both a directory and a file are supported.
- |
-
-
-
-
-## Usage
-
-- The name of the source file cannot be the same as that of the destination file in the same path.
-- **SOURCEFILE** must exist and cannot be a directory.
-- **SOURCEFILE** supports wildcard characters \* and ?. The asterisk \(\*\) indicates any number of characters, and the question mark \(?\) represents a single character. **DESTFILE** does not support wildcard characters. If **SOURCEFILE** specifies multiple files, **DESTFILE** must be a directory.
-- If **DESTFILE** specifies a directory, this directory must exist. In this case, the destination file is named after the source file.
-- If **DESTFILE** specifies a file, the directory for this file must exist. In this case, the file copy is renamed.
-- If the destination file does not exist, a new file is created. If the destination file already exists, the existing file is overwritten.
-
-> **NOTICE:**
->When important system resources are copied, unexpected results such as a system breakdown may occur. For example, when the **/dev/uartdev-1** file is copied, the system may stop responding.
-
-## Example
-
-Run **cp hello-OHOS.txt hello-harmony.txt ./tmp/**.
-
-## Output
-
-Copying **hello-OHOS.txt** and **hello-harmony.txt** to **/tmp/**:
+
+## Syntax
+
+cp [_SOURCEFILE_] [_DESTFILE_]
+
+
+## Parameters
+
+ **Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| --help | Displays help information.| N/A |
+| SOURCEFILE | Specifies the file to copy.| This command does not support copy of a directory, but supports copy of multiple files at a time.|
+| DESTFILE | Specifies the file to create.| Both a directory and a file are supported.|
+
+
+## Usage Guidelines
+
+- The name of the source file cannot be the same as that of the destination file in the same path.
+
+- **SOURCEFILE** must exist and cannot be a directory.
+
+- The source file path supports asterisks (*) and question marks (?). The wildcard "\*" indicates any number of characters, and "?" indicates any single character. **DEST** does not support wildcard characters. If the specified **SOURCE** matches multiple files, **DEST** must be a directory.
+
+- If **DEST** is a directory, this directory must exist. In this case, the destination file is named after the source file.
+
+- If the destination file path is a file, the directory for this file must exist. In this case, the file copy is renamed.
+
+- If the destination file does not exist, a new file is created. If the destination file already exists, the existing file is overwritten.
+
+> **NOTICE**
+> When important system resources are copied, unexpected results such as a system breakdown may occur. For example, when the **/dev/uartdev-1** file is copied, the system may stop responding.
+
+
+## Example
+
+Run **cp hello-OHOS.txt hello-openharmony.txt ./tmp/**.
+
+
+## Output
+
+Copy **hello-OHOS.txt** and **hello-openharmony.txt** to **/tmp/**.
```
OHOS:/$ ls
bin hello-OHOS.txt proc system vendor
-dev hello-harmony.txt sdcard userdata
+dev hello-openharmony.txt sdcard userdata
etc lib storage usr
OHOS:/$ mkdir tmp
-OHOS:/$ cp hello-OHOS.txt hello-harmony.txt tmp/
+OHOS:/$ cp hello-OHOS.txt hello-openharmony.txt tmp/
OHOS:/$ ll tmp
total 0
-rwxrwxrwx 1 0 0 0 1979-12-31 00:00 hello-OHOS.txt*
--rwxrwxrwx 1 0 0 0 1979-12-31 00:00 hello-harmony.txt*
+-rwxrwxrwx 1 0 0 0 1979-12-31 00:00 hello-openharmony.txt*
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-du.md b/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
index 8dd89bfaa3a1f573d8ec82be44b0b54704d5f309..6d72b8c51adba6d46addb80594f91a8bc66e08dc 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-du.md
@@ -1,86 +1,50 @@
# du
-## Command Function
+
+## Command Function
This command is used to query the disk space occupied by a file.
-## Syntax
-
-du \[_-kKmh_\] \[_file..._\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the du command.
- |
-N/A
- |
-
--k
- |
-Displays the occupied blocks, each of which is 1024 bytes by default.
- |
-N/A
- |
-
--K
- |
-Displays the occupied blocks, each of which is 512 bytes (POSIX).
- |
-N/A
- |
-
--m
- |
-Displays the disk space in MB.
- |
-N/A
- |
-
--h
- |
-Displays the disk space in human-readable format K, M, and G, for example, 1K, 243M, or 2G.
- |
-N/A
- |
-
-file
- |
-Specifies the target file.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **du** command is used to obtain the disk usage of a file rather than a directory.
-- The value of **file** must be the file name. It cannot contain the directory where the file is located.
-
-## Example
-
-Run **du -h testfile**.
-
-## Output
-
-Command output
+
+## Syntax
+
+du [_-kKmh_] [_file..._]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description |
+| ------ | ------------------------------------------------------------ |
+| --help | Displays the parameters supported by the **du** command. |
+| -k | Displays the occupied blocks, each of which is 1024 bytes by default. |
+| -K | Displays the occupied blocks, each of which is 512 bytes (POSIX). |
+| -m | Displays the disk space in MB. |
+| -h | Displays the disk space in human-readable format K, M, and G, for example, **1K**, **243M**, or **2G**.|
+| file | Specifies the target file. |
+
+
+## Usage Guidelines
+
+- The **du** command is used to obtain the disk usage of a file rather than a directory.
+
+- The value of **file** must be the file name. It cannot contain the directory where the file is located.
+
+## Note
+
+Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
+
+Run **du -h testfile**.
+
+
+## Output
+
+Disk space occupied by **testfile**.
```
OHOS:/$ du -h testfile
1.8K testfile
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-format.md b/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
index 7801ff31c3b49d0318f49b2957ec6e9eda3049f0..e9bef26ce5e90769d493a6ff1742aeb8115dc1eb 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-format.md
@@ -1,67 +1,48 @@
# format
-## Command Function
+## Command Function
This command is used for disk formatting.
-## Syntax
-
-format <_dev\_inodename_\> <_sectors_\> <_option_\> \[_label_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-
-
-dev_inodename
- |
-Specifies the device name.
- |
-
-sectors
- |
-Specifies the size of the allocated memory unit or sector. The value 0 indicates null. (The value must be 0 or a power of 2. For FAT32, the maximum value is 128. If the parameter is set to 0, a proper cluster size is automatically selected. The available cluster size range varies depending on the partition size. If the cluster size is incorrectly specified, the formatting may fail.)
- |
-
-option
- |
-Specifies the file system type. The options are as follows: - 0x01: FMT_FAT
- 0x02: FMT_FAT32
- 0x07: FMT_ANY
- 0x08: FMT_ERASE (not supported by the USB flash drive)
-
-If an invalid value is specified, the system automatically selects the formatting mode. If the low-level formatting bit is 1 during the formatting of a USB flash drive, an error message is printed.
- |
-
-label
- |
-Specifies the volume label name. This parameter is optional, and the value is a string. If null is specified for this parameter, the previously set volume label name is cleared.
- |
-
-
-
-
-## Usage
-
-- The **format** command is used for disk formatting. You can find the device name in the **dev** directory. A storage card must be installed before the formatting.
-- The **format** command can be used to format the USB flash drive, SD card, and MMC, but not the NAND flash or NOR flash.
-- An invalid **sectors** value may cause exceptions.
-
-## Example
-
-Run **format /dev/mmcblk0 128 2**.
-
-## Output
-
-Formatting an MMC:
+
+## Syntax
+
+format <*dev*inodename_> <*sectors*> <*option*> [_label_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description|
+| -------- | -------- |
+| dev_inodename | Specifies the device name. |
+| sectors | Specifies the size of the allocated memory unit or sector.
The value must be **0** or a power of **2**.
The value **0** means to leave this parameter blank.
For FAT32, the maximum value is **128**. If the parameter is set to **0**, a proper cluster size is automatically selected. The available cluster size range varies depending on the partition size. If the cluster size is incorrectly specified, the formatting may fail. |
+| option | Specifies the file system type. The options are as follows:
- **0x01**: FMT_FAT
- **0x02**: FMT_FAT32
- **0x07**: FMT_ANY
- **0x08**: FMT_ERASE (USB does not support this option.)
If an invalid value is specified, the system automatically selects the formatting mode. If the low-level formatting bit is **1** during the formatting of a USB flash drive, an error message is printed.|
+| label | Specifies the volume label name. This parameter is optional, and the value is a string.
If **null** is specified for this parameter, the previously set volume label name is cleared. |
+
+
+## Usage Guidelines
+
+- The **format** command is used for disk formatting. You can find the device name in the **dev** directory. A storage card must be installed before the formatting.
+
+- The **format** command can be used to format the USB flash drive, SD card, and MMC, but not the NAND flash or NOR flash.
+
+- An invalid **sectors** value may cause exceptions.
+
+
+## Example
+
+Run **format /dev/mmcblk0 128 2**.
+
+
+## Output
+
+Format an MMC.
```
OHOS # format /dev/mmcblk1 128 2
Format to FAT32, 128 sectors per cluster.
format /dev/mmcblk1 Success
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md b/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
index 0c8f1abbe920bd74558301b4e2dc61a3882d8a42..b292d00f160227250b9478e2c5cc53f1f7eaa508 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-ls.md
@@ -1,290 +1,92 @@
# ls
-## Command Function
-
-This command is used to display the content of a specified directory.
-
-## Syntax
-
-ls \[_-ACHLSZacdfhiklmnopqrstux1_\] \[_--color_\[_=auto_\]\] \[_directory..._\]
-
-> **NOTE:**
->During the system boot process, **ls=toybox ls --color=auto**, **ll = ls -alF**, **la=ls -A**, and **l=ls -CF** commands have been enabled using **alias** so that the initial actions of these commands are the same as those on Linux. For details, see the output description. To view help information, run **toybox ls --help**.
-
-## Parameters
-
-**Table 1** Command parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays parameters supported by the ls command and their usage.
- |
-N/A
- |
-
--a
- |
-Displays all files, including .hidden files.
- |
-N/A
- |
-
--b
- |
-Escapes non-graphical characters.
- |
-N/A
- |
-
--c
- |
-Uses ctime as the file timestamp. This parameter must be used together with -l.
- |
-N/A
- |
-
--d
- |
-Displays only the directory, rather than listing the content of the directory.
- |
-N/A
- |
-
--i
- |
-Displays the node ID of a file.
- |
-N/A
- |
-
--p
- |
-Adds a slash (/) after the directory.
- |
-N/A
- |
-
--q
- |
-Displays non-printable characters, such as "?".
- |
-N/A
- |
-
--s
- |
-Provides information about the memory occupied by the directory and its members, in 1024 bytes.
- |
-N/A
- |
-
--u
- |
-Uses the last access time of the file as the timestamp. This option is used together with -l.
- |
-N/A
- |
-
--A
- |
-Lists all files except implied . and ..
- |
-N/A
- |
-
--H
- |
-Follows symbolic links listed in the command line.
- |
-N/A
- |
-
--L
- |
-Follows symbolic links.
- |
-N/A
- |
-
--Z
- |
-Displays security context.
- |
-N/A
- |
-
-path
- |
-If path is left blank, the content of the current directory is displayed.
-If path is an invalid file name, the following failure message is displayed:
-ls error: No such directory
-If path is a valid directory, the content of that directory is displayed.
- |
-Left blank or a valid directory
- |
-
-
-
-
-**Table 2** Output parameters
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--1
- |
-Lists one file per line.
- |
-N/A
- |
-
--c
- |
-Lists entries by column.
- |
-N/A
- |
-
--g
- |
-Like -l, but do not list owner.
- |
-N/A
- |
-
--h
- |
-Displays the total size of files in the directory, in KiB.
- |
-N/A
- |
-
--l
- |
-Displays detailed information about files in the directory.
- |
-N/A
- |
-
--m
- |
-Fills width with a list of entries separated by a comma.
- |
-N/A
- |
-
--n
- |
-Like -l, but lists numeric user and group IDs.
- |
-N/A
- |
-
--o
- |
-Like -l, but do not list group information.
- |
-N/A
- |
-
--x
- |
-Lists entries by line, instead of by column.
- |
-N/A
- |
-
--ll
- |
-Lists the file time attribute as ns.
- |
-N/A
- |
-
---color
- |
-Colorizes the output.
- |
-Default value: device=yellow symlink=turquoise/red dir=blue socket=purple files: exe=green suid=red suidfile=redback stickydir=greenback=auto means detect if output is a tty.
- |
-
-
-
-
-**Table 3** Sorting parameters \(sorted by the initial letter by default\)
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--f
- |
-Do not sort.
- |
-N/A
- |
-
--r
- |
-Reverse order while sorting.
- |
-N/A
- |
-
--t
- |
-Sort by time, newest first.
- |
-N/A
- |
-
--S
- |
-Sort by file size, largest first.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-None
-
-> **NOTICE:**
->The file node information of the FAT file system inherits from its parent node. The parent node ID is **0**. Therefore, if you run the **ls -i** command on the Hi3516D V300 development board, the file node IDs displayed are all **0**.
-
-## Example
+
+## Command Function
+
+This command is used to display the content of a directory.
+
+
+## Syntax
+
+ls [_-ACHLSZacdfhiklmnopqrstux1_] [_--color_[_=auto_]] [_directory..._]
+
+> **NOTE**
+> During the system boot process, **ls=toybox ls --color=auto**, **ll = ls -alF**, **la=ls -A**, and **l=ls -CF** commands have been enabled using **alias** so that the initial actions of these commands are the same as those on Linux. For details, see **Output**. To view help information, run **toybox ls --help**.
+
+
+## Parameters
+
+**Table 1** Command parameter description
+
+| Parameter | Description | Value Range |
+| ------ | ------------------------------------------------------------ | ----------------------------- |
+| --help | Displays parameters supported by the **ls** command and their usage. | N/A |
+| -a | Displays all files, including hidden files. | N/A |
+| -b | Escapes non-graphical characters. | N/A |
+| -c | Uses **ctime** as the file timestamp. This parameter must be used together with **-l**. | N/A |
+| -d | Displays only the directory, rather than listing the content of the directory. | N/A |
+| -i | Displays the node ID of a file. | N/A |
+| -p | Adds a slash (/) after the directory. | N/A |
+| -q | Displays non-printable characters, such as "?". | N/A |
+| -s | Provides information about the memory occupied by the directory and its members, in 1024 bytes. | N/A |
+| -u | Uses the last access time of the file as the timestamp. This option is used together with **-l**. | N/A |
+| -A | Lists all files except implied . and .. | N/A |
+| -H | Follows symbolic links listed in the command line. | N/A |
+| -L | Follows symbolic links. | N/A |
+| -Z | Displays security context. | N/A |
+| path | Specifies the path of the target directory.
If **path** is left blank, the content of the current directory is displayed.
If **path** is an invalid directory, "ls error: No such directory." is displayed.
If **path** is a valid directory, the content of the specified directory is displayed. | Left blank
A valid directory|
+
+**Table 2** Output format parameters
+
+| Parameter | Description |
+| ------- | --------------------------------------- |
+| -1 | Lists one file per line. |
+| -c | Lists entries by column. |
+| -g | Like **-l**, but do not list the owner. |
+| -h | Displays the total size of files in the directory, in KiB.|
+| -l | Displays detailed information about files in the directory. |
+| -m | Fills width with a list of entries separated by a comma. |
+| -n | Like **-l**, but lists numeric user and group IDs.|
+| -o | Like **-l**, but do not list group information. |
+| -x | Lists entries by line, instead of by column. |
+| -ll | Lists the file time attribute as ns. |
+
+**Table 3** Parameters for sorting (by the initial letter by default)
+
+| Parameter| Description |
+| ---- | ------------------------------------------ |
+| -f | Do not sort. |
+| -r | Sorts in reverse order. |
+| -t | Sorts by time, newest first.|
+| -S | Sorts by file size, largest first. |
+
+**Table 4** Color printing
+
+| Parameter| Default Configuration |
+| ---- | ------------------------------------------ |
+| --color | device=yellow symlink=turquoise/red dir=blue socket=purple files: exe=green suid=red suidfile=redback stickydir=greenback=auto means detect if output is a tty. |
+
+## Usage Guidelines
+
+The file node information of the FAT file system inherits from its parent node. The parent node ID is **0**. Therefore, if you run the **ls -i** command on the Hi3516D V300 development board, the file node IDs displayed are all **0**.
+
+
+## Note
+
+The shell does not support **ls** parameters. mksh supports them. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- ls
-- ll
+- ls
-## Output
+- ll
-Example 1: **ls** command output
+
+## Output
+
+Example 1: **ls** command output
```
OHOS:/$ ls
@@ -292,7 +94,7 @@ bin etc nfs sdcard system usr
dev lib proc storage userdata vendor
```
-Example 2: **ll** command output
+Example 2: **ll** command output
```
OHOS:/$ ll
@@ -310,4 +112,3 @@ drwxrwxrwx 1 0 0 2048 2021-11-21 17:52 userdata/
drwxrwxrwx 1 0 0 2048 2021-11-21 17:52 usr/
drwxrwxrwx 1 0 0 2048 2021-11-21 17:52 vendor/
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
index fe035b1c141dfcda3223df3c99335f1cc7901376..ba2902d4c4ed1a1c638879d2737090a3575b3188 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-lsfd.md
@@ -1,25 +1,29 @@
# lsfd
-## Command Function
+## Command Function
This command is used to display the file descriptors and names of the files that are open.
-## Syntax
+
+## Syntax
lsfd
-## Usage
-Run the **lsfd** command to display file descriptors and names of the opened files.
+## Usage Guidelines
+
+Run the **lsfd** command to display file descriptors and names of the opened files.
+
-## Example
+## Example
-Run **lsfd**.
+Run **lsfd**.
-## Output
-Example: **lsfd** command output
+## Output
+
+Example: **lsfd** command output
```
OHOS # lsfd
@@ -57,4 +61,3 @@ OHOS # lsfd
33 /dev/lite_ipc
34 /dev/lite_ipc
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
index 09b1935ecc8727ff43d148059c12afca27342ef9..4c68734912dfb23c61c6032011c239c196751ead 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mkdir.md
@@ -1,80 +1,53 @@
# mkdir
-## Command Function
+## Command Function
This command is used to create a directory.
-## Syntax
-
-mkdir \[_-vp_\] \[_-m mode_\] \[_dirname..._\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the mkdir command.
- |
-N/A
- |
-
--m
- |
-Sets the permissions on the directory to create.
- |
-N/A
- |
-
--p
- |
-Creates parent and child directories recursively.
- |
-N/A
- |
-
--v
- |
-Prints detailed information about the directory creation process.
- |
-N/A
- |
-
-directory
- |
-Specifies the directory to create.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-> **NOTICE:**
->For the files created on the FAT file system, the file permission attributes are the same as those of the mounted nodes. Currently, the node permissions include only user read and write. The **group** and **others** permissions do not take effect.
->In addition, only the user read and write permissions can be modified. The read and write permissions are **rw** and **ro** only. Therefore, when the **-m** option is specified in the **mkdir** command, only **777** and **555** permissions are available for the created directory, and the execute permission does not take effect.
-
-## Example
+
+## Syntax
+
+mkdir [_-vp_] [_-m mode_] [_dirname..._]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description |
+| --------- | ------------------------------ |
+| --help | Displays the parameters supported by the **mkdir** command. |
+| -m | Sets the permissions on the directory to create. |
+| -p | Creates parent and child directories recursively. |
+| -v | Prints detailed information about the directory creation process.|
+| directory | Specifies the directory to create. |
+
+
+## Usage Guidelines
+
+For the files created on the FAT file system, the file permission attributes are the same as those of the mounted nodes. Currently, the node permissions include only user read and write. The **group** and **others** permissions do not take effect.
+
+In addition, only the user read and write permissions can be modified. The read and write permissions are **rw** and **ro** only. Therefore, when the **-m** option is specified in the **mkdir** command, only **777** and **555** permissions are available for the created directory, and the execute permission does not take effect.
+
+## Note
+
+Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- mkdir testpath
-- mkdir -m 777 testpath
-- mkdir -pv testpath01/testpath02/testpath03
+- mkdir testpath
+
+- mkdir -m 777 testpath
+
+- mkdir -pv testpath01/testpath02/testpath03
+
+## Output
+
+Example 1: Create a directory named **testpath**.
-## Output
```
OHOS:/tmp$ mkdir testpath
@@ -83,7 +56,8 @@ total 2
drwxrwxrwx 1 0 0 2048 1979-12-31 00:00 testpath/
```
-Example 2: creating a directory with specified permissions
+Example 2: Create a directory named **testpath** with specified permissions.
+
```
OHOS:/tmp$ mkdir -m 777 testpath
@@ -92,7 +66,8 @@ total 2
drwxrwxrwx 1 0 0 2048 1979-12-31 00:00 testpath/
```
-Example 3: creating directories recursively
+Example 3: Create directories recursively.
+
```
OHOS:/tmp$ mkdir -pv testpath01/testpath02/testpath03
@@ -109,4 +84,3 @@ OHOS:/tmp$ ll testpath01/testpath02/
total 2
drwxrwxrwx 1 0 0 2048 1979-12-31 00:00 testpath03/
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
index 9fccd3e4eaf981e0b072ea03cd9d71c4a41e1aac..67d89d93284a78550b470b35ed84ebdad20c1980 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mount.md
@@ -1,84 +1,47 @@
# mount
-## Command Function
+## Command Function
This command is used to mount a device to a specified directory.
-## Syntax
-
-mount \[_-f_\] \[_-t TYPE_\] \[_-o OPTION,_\] \[\[_DEVICE_\] _DIR_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the mount command.
- |
-N/A
- |
-
--f
- |
-Fakes mounting the file system (no mounting is actually performed).
- |
-N/A
- |
-
--t
- |
-Specifies the file system type.
- |
-vfat, yaffs, jffs, ramfs, nfs, procfs, romfs
- |
-
--o
- |
-Specifies the mount options.
- |
-N/A
- |
-
-DEVICE
- |
-Specifies the device to mount (in the format of the device directory).
- |
-A device in the system
- |
-
-DIR
- |
-Specifies the directory.
-You must have the execution (search) permission on the specified directory.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-By specifying the device to mount, directory, and file system format in the **mount** command, you can successfully mount the file system to the specified directory.
-
-## Example
-
-Run **mount -t nfs 192.168.1.3:/nfs nfs**.
-
-## Output
-
-Mounting the **nfs** directory on the server with IP address of **192.168.1.3** to the newly created **/nfs** directory in the current system
+
+## Syntax
+
+mount [_-f_] [_-t TYPE_] [_-o OPTION,_] [[_DEVICE_] _DIR_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------ | ----------------------------------------------------------- | ------------------------------------------------------------ |
+| --help | Displays the parameters supported by the **mount** command. | N/A |
+| -f | Fakes mounting the file system (no mounting is actually performed). | N/A |
+| -t | Specifies the file system type. | vfat, yaffs, jffs, ramfs, nfs, procfs, romfs|
+| -o | Specifies the mount options. | N/A |
+| DEVICE | Specifies the device to mount (in the format of the device directory). | A device in the system |
+| DIR | Specifies the directory.
You must have the execution (search) permission on the specified directory.| N/A |
+
+
+## Usage Guidelines
+
+By specifying the device to mount, directory, and file system format in the **mount** command, you can successfully mount the file system to the specified directory.
+
+## Note
+
+Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
+
+Run **mount -t nfs 192.168.1.3:/nfs nfs**.
+
+
+## Output
+
+Mount the **nfs** directory on the server with IP address of **192.168.1.3** to the newly created **/nfs** directory in the current system.
+
```
OHOS:/$ mkdir nfs
@@ -90,4 +53,3 @@ OHOS:/$ ls nfs/
OHOS_Image.bin hello rootfs_vfat.img
dev_tools mksh_rootfs_vfat.img test_demo
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md b/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
index 880b14485c22069f023f256961485e33f6afb82c..cd2a0950cc8122c93f4550df899c254d77c617e1 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-mv.md
@@ -1,96 +1,58 @@
# mv
-## Command Function
+## Command Function
This command is used to move files.
-## Syntax
-
-mv \[_-fivn_\] _SOURCE... DEST_
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--help
- |
-Displays help information.
- |
-N/A
- |
-
--f
- |
-Forcibly overwrites the target file.
- |
-N/A
- |
-
--i
- |
-Provides a prompt before moving a file that would overwrite an existing file. Enter y to overwrite the file or enter n to cancel the operation.
- |
-N/A
- |
-
--n
- |
-Do not overwrite any existing file or directory.
- |
-N/A
- |
-
--v
- |
-This parameter does not take effect although it is supported by the latest Toybox code.
- |
-N/A
- |
-
-SOURCE
- |
-Specifies the path of the source file.
- |
-This command cannot be used to move a directory. It can be used to move multiple files at a time.
- |
-
-DEST
- |
-Specifies the destination file path.
- |
-Both a directory and a file are supported.
- |
-
-
-
-
-## Usage
-
-- **SOURCE** supports wildcard characters \* and ?. The asterisk \(\*\) indicates any number of characters, and the question mark \(?\) represents a single character. **DEST** does not support wildcard characters. If the specified **SOURCE** matches multiple files, **DEST** must be a directory.
-- If **DEST** is a directory, this directory must exist. In this case, the destination file is named after the source file.
-- If **DEST** is a file, the directory for this file must exist.
-- If the destination file already exists, it will be overwritten.
-
-## Example
+
+## Syntax
+
+mv [_-fivn_] *SOURCE... DEST*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------ | ------------------------------------------------------------ | ----------------------------------------------- |
+| -help | Displays help information. | N/A |
+| -f | Forcibly overwrites the target file. | N/A |
+| -i | Provides information before moving a file that would overwrite an existing file or directory. Enter **y** to overwrite the file or directory, and enter **n** to cancel the operation.| N/A |
+| -n | Do not overwrite any existing file or directory. | N/A |
+| -v | This parameter does not take effect although it is supported by the latest Toybox code. | N/A |
+| SOURCE | Specifies the file to move. | This command cannot be used to move a directory. It can be used to move multiple files at a time.|
+| DEST | Specifies the destination file path. | Both a directory and a file are supported. |
+
+
+## Usage Guidelines
+
+- **SOURCEFILE** supports wildcard characters * and ?. The asterisk (*) indicates any number of characters, and the question mark (?) represents a single character. **DEST** does not support wildcard characters. If the specified **SOURCE** matches multiple files, **DEST** must be a directory.
+
+- If **DEST** is a directory, this directory must exist. In this case, the destination file is named after the source file.
+
+- If **DEST** is a file, the directory for this file must exist.
+
+- If the destination file already exists, it will be overwritten.
+
+## Note
+
+Currently, the shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- mv -i test.txt testpath/
-- mv test?.txt testpath/ \(Move **test3.txt**, **testA.txt**, and **test\_.txt**\)
+- mv -i test.txt testpath/
-## Output
+- mv test?.txt testpath/ (Move **test3.txt**, **testA.txt**, and **test_.txt**)
+
+
+## Output
+
+Example 1: Move a file.
-Example 1: moving a file
```
OHOS:/$ touch test.txt
@@ -112,7 +74,8 @@ bin etc proc storage test.txt userdata vendor
dev lib sdcard system testpath usr
```
-Example 2: moving files using wildcards
+Example 2: Move files.
+
```
OHOS:/$ ls
@@ -125,4 +88,3 @@ dev lib sdcard system testpath usr
OHOS:/$ ls testpath/
test.txt test3.txt testA.txt test_.txt
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md b/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
index 6f0ed999752060343314708afe218e1488cf0128..e4e329496a5bcd91754577a27b94a32abda1d162 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-partinfo.md
@@ -1,49 +1,40 @@
# partinfo
-## Command Function
+## Command Function
This command is used to query information about the partitions of a hard disk or SD card identified by the system.
-## Syntax
-partinfo <_dev\_inodename_\>
+## Syntax
-## Parameters
+partinfo <*dev*inodename_>
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-dev_inodename
- |
-Specifies the name of the partition to be queried.
- |
-A valid partition name
- |
-
-
-
+## Parameters
-## Usage
+ **Table 1** Parameter description
-None
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| dev_inodename | Specifies the name of the partition to be queried.| A valid partition name|
-## Example
-Run **partinfo /dev/mmcblk0p0**.
+## Usage Guidelines
-## Output
+None.
+
+
+## Example
+
+Run **partinfo /dev/mmcblk0p0**.
+
+
+## Output
System partition information:
+
```
OHOS # partinfo /dev/mmcblk0p0
part info :
@@ -55,4 +46,3 @@ part filesystem : 00
part sec start : 20480
part sec count : 102400
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md b/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
index 87513f7f67fe226d6b87c8281f0a31f6444b42e7..5315935c5b1f5f643ec2c6d9f7a695f8b51cb3ff 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-pwd.md
@@ -1,32 +1,37 @@
# pwd
-## Command Function
+## Command Function
This command is used to display the current path.
-## Syntax
+
+## Syntax
pwd
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
-## Usage
+The **pwd** command writes the full path (from the root directory) of the current directory to the standard output. The directories are separated by slashes (/). The directory following the first slash (/) indicates the root directory, and the last directory is the current directory.
-The **pwd** command writes the full path \(from the root directory\) of the current directory to the standard output. The directories are separated by slashes \(/\). The directory following the first slash \(/\) indicates the root directory, and the last directory is the current directory.
-## Example
+## Example
-Run **pwd**.
+Run **pwd**.
-## Output
+
+## Output
Current path:
+
```
OHOS:/sdcard/nfs$ pwd
/sdcard/nfs
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md b/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
index b535c90a4feab46cedd8f82d8398ef75da4b0777..c01d029ab70633ec6a50044abacb339403e3189c 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-rm.md
@@ -1,74 +1,53 @@
# rm
-## Command Function
+## Command Function
This command is used to delete a file or folder.
-## Syntax
-
-rm \[_-fv_\] _FILE or rm_ \[_-rv_\] \[_PATH_ | _filename_\]...
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--r
- |
-Deletes empty or non-empty directories.
- |
-N/A
- |
-
--f
- |
-Deletes a file or directory forcibly without confirmation. No error will be reported when a file that does not exist is to be deleted.
- |
-N/A
- |
-
--v
- |
-Displays the deletion process.
- |
-N/A
- |
-
-PATH/filename
- |
-Specifies the name of the file or directory to delete. The value can be a path.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **rm** command can be used to delete multiple files or folders at a time.
-- You can run **rm -r** to delete a non-empty directory.
-- If the **rm** command without **-f** is used to delete a file that does not exist, an error will be reported.
-
-## Example
+
+## Syntax
+
+rm [_-fv_] *FILE or rm* [_-rv_] [_PATH_ | _filename_]...
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description |
+| ------------- | ------------------------------------------------ |
+| -r | Deletes empty or non-empty directories. |
+| -f | Deletes a file or directory forcibly without confirmation. No error will be reported when a file that does not exist is to be deleted.|
+| -v | Displays the deletion process. |
+| PATH/filename | Specifies the name of the file or directory to delete. The value can be a path. |
+
+
+## Usage Guidelines
+
+- The **rm** command can be used to delete multiple files or folders at a time.
+
+- You can run **rm -r** to delete a non-empty directory.
+
+- If the **rm** command without **-f** is used to delete a file that does not exist, an error will be reported.
+
+## Note
+
+The shell does not support **-v** or **-f**. mksh supports them. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- rm testfile
-- rm -r testpath/
+- rm testfile
+
+- rm -r testpath/
-## Output
-Example 1: deleting **testfile**
+## Output
+
+Example 1: Delete **testfile**.
+
```
OHOS:/$ ls
@@ -80,7 +59,8 @@ bin etc proc storage userdata vendor
dev lib sdcard system usr
```
-Example 2: deleting **testpath**, a non-empty directory
+Example 2: Delete **testpath**, a non-empty directory.
+
```
OHOS:/$ ls
@@ -91,4 +71,3 @@ OHOS:/$ ls
bin etc proc storage userdata vendor
dev lib sdcard system usr
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md b/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
index 70cf25e12419964077362426fb5f15d58092ba50..f0ad3c729b29cc570368f6acdc878b3fbd0ba1e2 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-rmdir.md
@@ -1,71 +1,46 @@
# rmdir
-## Command Function
+## Command Function
This command is used to delete a directory.
-## Syntax
-
-rmdir \[_-p_\] \[_dirname..._\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the rmdir command.
- |
-N/A
- |
-
--p
- |
-Deletes a path.
- |
-N/A
- |
-
---ignore-fail-on-non-empty
- |
-Suppresses the error message when a non-empty directory is to be deleted.
- |
-N/A
- |
-
-dir
- |
-Specifies the name of the directory to delete. The directory must be empty. A path is supported.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **rmdir** command can only be used to delete directories.
-- The **rmdir** command can delete only one directory at a time.
-- The **rmdir** command can delete only empty directories.
-
-## Example
-
-Run **rmdir dir**.
-
-## Output
-
-Deleting the directory **dir**:
+
+## Syntax
+
+rmdir [_-p_] [_dirname..._]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| --help | Displays the parameters supported by the **rmdir** command.| N/A |
+| -p | Deletes a path.| N/A |
+| --ignore-fail-on-non-empty | Suppresses the error message when a non-empty directory is to be deleted.| N/A |
+| dir | Specifies the name of the directory to delete. The directory must be empty. A path is supported.| N/A |
+
+
+## Usage Guidelines
+
+- The **rmdir** command can only be used to delete directories.
+
+- The **rmdir** command can delete only one directory at a time.
+
+- The **rmdir** command can delete only empty directories.
+
+
+## Example
+
+Run **rmdir dir**.
+
+
+## Output
+
+Delete the directory **dir**.
+
```
OHOS:/test$ mkdir dir
@@ -74,4 +49,3 @@ dir
OHOS:/test$ rmdir dir/
OHOS:/test$ ls
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md b/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
index c38afd907c2de80ad20cf76d6af622462d398a9e..5b58c139561ba6bb1c27e4a44ad99fffc16e0722 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-statfs.md
@@ -1,48 +1,37 @@
# statfs
-## Command Function
+## Command Function
This command is used to print information about a file system, such as the type, total size, and available size.
-## Syntax
-statfs \[_directory_\]
+## Syntax
-## Parameters
+statfs [_directory_]
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-directory
- |
-Specifies the file system directory.
- |
-The file system must exist and support the statfs command. The supported file systems include JFFS2, FAT, and NFS.
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| directory | Specifies the file system directory.| The file system must exist and support the **statfs** command. The supported file systems include JFFS2, FAT, and NFS.|
+
+
+## Usage Guidelines
The printed information varies depending on the file system.
-## Example
+
+## Example
The following uses the NFS as an example:
-Run **statfs /nfs**.
+Run **statfs /nfs**.
-**statfs** command output
+**statfs** command output
```
OHOS # statfs ./nfs
@@ -57,4 +46,3 @@ statfs got:
total size: 808742490112 Bytes
free size: 255618461696 Bytes
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md b/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
index 33670c9ca1cf5026325f11b933ab7335e46a6539..524ddd7802d3c8bc315cd838c88dd57541dfee04 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-sync.md
@@ -1,28 +1,33 @@
# sync
-## Command Function
+## Command Function
-This command is used to synchronize cached data \(data in the file system\) to an SD card.
+This command is used to synchronize cached data (data in the file system) to an SD card.
-## Syntax
+
+## Syntax
sync
-## Parameters
-None
+## Parameters
+
+None.
+
+
+## Usage Guidelines
+
+- The **sync** command is used to refresh the cache. If no SD card is inserted, no operation will be performed.
-## Usage
+- When an SD card is inserted, the cache information is synchronized to the SD card. If the synchronization is successful, no information is displayed.
-- The **sync** command is used to refresh the cache. If no SD card is inserted, no operation will be performed.
-- When an SD card is inserted, the cache information is synchronized to the SD card. If the synchronization is successful, no information is displayed.
-## Example
+## Example
-Run **sync**. Data will be synchronized to the SD card if an SD card is available, and no operation will be performed if no SD card is available.
+Run **sync**. Data will be synchronized to the SD card if an SD card is available, and no operation will be performed if no SD card is available.
-## Output
-None
+## Output
+None.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md b/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
index e2ef6986f051af559c6af8c77f26309b53123371..e21f277dd4a8f78c54744d88a8570343b9355d7b 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-touch.md
@@ -1,64 +1,54 @@
# touch
-## Command Function
+## Command Function
-- This command is used to create an empty file in a specified directory.
-- If this command is executed to create an existing file, the execution will be successful but the timestamp will not be updated.
+- This command is used to create an empty file in a specified directory.
-## Syntax
+- If this command is executed to create an existing file, the execution will be successful but the timestamp will not be updated.
-touch \[_filename_\]
-## Parameters
+## Syntax
-**Table 1** Parameter description
+touch [_filename_]
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the touch command.
- |
-N/A
- |
-
-filename
- |
-Specifies the name of the file to create.
- |
-N/A
- |
-
-
-
-## Usage
+## Parameters
-- The **touch** command creates an empty file that is readable and writeable.
-- You can use the **touch** command to create multiple files at a time.
+ **Table 1** Parameter description
- > **NOTICE:**
- >If you run the **touch** command to create a file in a directory storing important system resources, unexpected results such as a system breakdown may occur. For example, if you run the **touch uartdev-0** command in the **/dev** directory, the system may stop responding.
+| Parameter | Description | Value Range|
+| -------- | --------------------------- | -------- |
+| --help | Displays the parameters supported by the **touch** command.| N/A |
+| filename | Specifies the name of the file to create. | N/A |
-## Example
+## Usage Guidelines
+
+- The **touch** command creates an empty file that is readable and writeable.
+
+- You can use the **touch** command to create multiple files at a time.
+
+ > **NOTICE**
+ > If you run the **touch** command to create a file in a directory storing important system resources, unexpected results such as a system breakdown may occur. For example, if you run the **touch uartdev-0** command in the **/dev** directory, the system may stop responding.
+
+## Note
+
+The shell does not support **--help** or creation of multiple files at the same time. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- touch file.c
-- touch testfile1 testfile2 testfile3
+- touch file.c
-## Output
+- touch testfile1 testfile2 testfile3
+
+
+## Output
+
+Example 1: Create a file named **file.c**.
-Example 1: creating the **file.c** file
```
OHOS:/tmp$ ls
@@ -70,7 +60,8 @@ total 0
-rwxrwxrwx 1 0 0 0 1979-12-31 00:00 file.c*
```
-Example 2: creating three files \(**testfile1**, **testfile2**, and **testfile3**\)
+Example 2: Create three files (**testfile1**, **testfile2**, and **testfile3**) at a time.
+
```
*OHOS:/tmp$
@@ -82,4 +73,3 @@ total 0
-rwxrwxrwx 1 0 0 0 1979-12-31 00:00 testfile3*
OHOS:/tmp$
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md b/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
index a3b41c10707376fc70af957aeb20adcd0fdbb797..1125ae02c52e19154a60a6b3174c480adcfa4af9 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-umount.md
@@ -1,84 +1,61 @@
# umount
-## Command Function
-
-This command is used to unmount a specified file system.
-
-## Syntax
-
-umount \[_-a \[-t TYPE\]_\] \[_dir_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the umount command.
- |
-N/A
- |
-
--a
- |
-Unmounts all file systems mounted.
- |
-N/A
- |
-
--t
- |
-Used together with the -a option to restrict the file systems specified by -a, allowing only the file system specified by -t to be unmounted.
- |
-N/A
- |
-
-dir
- |
-Specifies the directory from which the file system is to be unmounted.
- |
-Directory mounted with the file system
- |
-
-
-
-
-## Usage
-
-By specifying the **dir** parameter in the **unmount** command, you can unmount the specified file system from the directory.
-
-## Example
+## Command Function
+
+This command is used to unmount a file system.
+
+
+## Syntax
+
+umount [_-a [-t TYPE]_] [_dir_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------ | ------------------------------------------------------------ | -------------------------- |
+| --help | Displays the parameters supported by the **umount** command. | N/A |
+| -a | Unmounts all file systems mounted. | N/A |
+| -t | Used together with the **-a** option to restrict the file systems specified by **-a**, allowing only the file system specified by **-t** to be unmounted.| N/A |
+| dir | Specifies the directory from which the file system is to be unmounted. | Directory mounted with the file system|
+
+
+## Usage Guidelines
+
+By specifying the **dir** parameter in the **unmount** command, you can unmount the specified file system.
+
+## Note
+
+The shell does not support this command. mksh supports it. To switch to mksh, run **cd bin** and **./mksh**.
+
+## Example
Run the following commands:
-- umount ./nfs
-- umount -a -t nfs
+- umount ./nfs
+
+- umount -a -t nfs
-## Output
-**unmount** command output:
+## Output
+
+
+
+Example 1: Unmount the file system from **./nfs**.
-Example 1: unmounting the file system from **./nfs**
```
OHOS:/$ umount ./nfs/
umount ok
```
-Example 2: unmounting all NFS directories
+Example 2: Unmount all NFS directories.
+
```
OHOS:/$ umount -a -t nfs
umount ok
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-file-write.md b/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
index f48ee11f17a53f04a3e1a197942e43dc6e167af1..41174409524abf0e7f486abad36da5fb73709746 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-file-write.md
@@ -1,63 +1,52 @@
# writeproc
-## Command Function
+## Command Function
-This command is used to write data to a specified proc file system. The proc file system supports the input of string parameters. Each file needs to implement its own method.
+This command is used to write data to the specified proc file system. The proc file system supports data of strings. The method for writing data needs to be implemented.
-## Syntax
-writeproc <_data_\> \>\> /proc/<_filename_\>
+## Syntax
-## Parameters
+writeproc <*data*> >> /proc/<*filename*>
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-data
- |
-Specifies the string to be entered, which ends with a space. If you need to enter a space, use "" to enclose the space.
- |
-N/A
- |
-
-filename
- |
-Specifies the proc file to which data is to be passed.
- |
-N/A
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-The proc file implements its own **write** command. Calling the **writeproc** command will pass the input parameters to the **write** command.
+| Parameter | Description |
+| -------- | ---------------------------------------------------------- |
+| data | Specifies the string to write, which ends with a space. If you need to write a space, use **""** to enclose the space. |
+| filename | Specifies the proc file to which **data** is to write. |
-> **NOTE:**
->The procfs file system does not support multi-thread access.
-## Example
+## Usage Guidelines
-Run **writeproc test \>\> /proc/uptime**.
+The proc file system implements its own **write()** function. Calling the **writeproc** command will pass input parameters to the **write()** function.
-## Output
+> **NOTE**
+> The procfs file system does not support multi-thread access.
-OHOS \# writeproc test \>\> /proc/uptime
+## Note
-\[INFO\]write buf is: test
+Currently, the shell does not support this command.
-test \>\> /proc/uptime
+## Example
-> **NOTE:**
->The uptime proc file temporarily implements the **write** command. The **INFO** log is generated by the implemented **test** command.
+Run **writeproc test >> /proc/uptime**.
+
+
+## Output
+
+```
+OHOS \# writeproc test >> /proc/uptime
+
+[INFO]write buf is: test
+
+test >> /proc/uptime
+```
+
+> **NOTE**
+> The **uptime** proc file temporarily implements the **write()** function. The **INFO** log is generated by the **test()** function.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-magickey.md b/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
index 80248ba4e5fbc59fbef823ca8b34e8584709c243..9af3ed1cceb676fa0a39c20126184874eb3d6382 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-magickey.md
@@ -3,24 +3,30 @@
## When to Use
-When the system does not respond, you can use the magic key function to check whether the system is suspended by an interrupt lock (the magic key also does not respond) or view the system task running status.
+When the system does not respond, you can use the magic key to check whether the system is suspended by an interrupt lock or view the system task running status.
-If interrupts are responded, you can use the magic key to check the task CPU usage (**cpup**) and find out the task with the highest CPU usage. Generally, the task with a higher priority preempts the CPU resources.
+If interrupts are responded, you can use the magic key to check the task CPU percent (CPUP) and locate the task with the highest CPUP. Generally, the task with a higher priority preempts the CPU resources.
-## How to Use
+## How to Configure
-1. Configure the macro **LOSCFG_ENABLE_MAGICKEY**.
+The magic key depends on the macro **LOSCFG_ENABLE_MAGICKEY**.
- The magic key depends on the **LOSCFG_ENABLE_MAGICKEY** macro. Before using the magic key, select **Enable MAGIC KEY** (**Debug** ---> **Enable MAGIC KEY**) on **menuconfig**. The magic key cannot be used if this option is disabled.
+To configure **LOSCFG_ENABLE_MAGICKEY**:
- >  **NOTE**
- >
- > On **menuconfig**, you can move the cursor to **LOSCFG_ENABLE_MAGICKEY** and enter a question mark (?) to view help Information.
-
-2. Press **Ctrl+R** to enable the magic key.
+1. Run the **make menuconfig** command in **kernel/liteos_a**.
+2. Locate the **Debug** option and select **Enable MAGIC KEY**.
+
+This option is selected by default. If it is not selected, the magic key is invalid.
+
+> **NOTE**
+> On **menuconfig**, you can move the cursor to **LOSCFG_ENABLE_MAGICKEY** and enter a question mark (?) to view help information.
+
+## How to Use
+
+1. Press **Ctrl+R** to enable the magic key.
- When the UART or USB-to-virtual serial port is connected, press **Ctrl+R**. If "Magic key on" is displayed, the magic key is enabled. To disable it, press **Ctrl+R** again. If "Magic key off" is displayed, the magic key is disabled.
+ When the UART or USB-to-virtual serial port is connected, press **Ctrl+R**. If "Magic key on" is displayed, the magic key is enabled. To disable it, press **Ctrl+R** again. If "Magic key off" is displayed, the magic key is disabled.
The functions of the magic key are as follows:
@@ -32,5 +38,5 @@ If interrupts are responded, you can use the magic key to check the task CPU usa
- **Ctrl+E**: Checks the integrity of the memory pool. If an error is detected, the system displays an error message. If no error is detected, the system displays "system memcheck over, all passed!".
- >  **NOTICE**
- > If magic key is enabled, when special characters need to be entered through the UART or USB-to-virtual serial port, avoid using characters the same as the magic keys. Otherwise, the magic key may be triggered by mistake, causing errors in the original design.
+ > **NOTE**
+ > If magic key is enabled, when special characters need to be entered through the UART or USB-to-virtual serial port, avoid using characters the same as the magic keys. Otherwise, the magic key may be triggered by mistake, causing errors in design.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md b/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
index 87b2afa6260a345d8e47c09398acf62b08c2ada0..c4c6ce48042d9ff0783ecf36fa874e68bafb72d6 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-arp.md
@@ -1,73 +1,44 @@
# arp
-## Command Function
+## Command Function
-Hosts on an Ethernet communicate with each other using MAC addresses. IP addresses must be converted into MAC addresses to enable communication between hosts on a LAN \(Ethernet\). To achieve this purpose, the host stores a table containing the mapping between IP addresses and MAC addresses. This table is called an Address Resolution Protocol \(ARP\) cache table. Before sending an IP packet to a LAN, the host looks up the destination MAC address in the ARP cache table. The ARP cache table is maintained by the TCP/IP stack. You can run the **arp** command to view and modify the ARP cache table.
+Hosts on an Ethernet communicate with each other using MAC addresses. IP addresses must be converted into MAC addresses to enable communication between hosts on a LAN (Ethernet). To achieve this purpose, the host stores a table containing the mapping between IP addresses and MAC addresses. This table is called an Address Resolution Protocol (ARP) cache table. Before sending an IP packet to a LAN, the host looks up the destination MAC address in the ARP cache table. The ARP cache table is maintained by the TCP/IP stack. You can run the **arp** command to view and modify the ARP cache table.
-## Syntax
+
+## Syntax
arp
-arp \[_-i IF_\] -s _IPADDR HWADDR_
-
-arp \[_-i IF_\] -d _IPADDR_
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-No parameter
- |
-Queries the content of the ARP cache table.
- |
-N/A
- |
-
--i IF
- |
-Specifies the network port. This parameter is optional.
- |
-N/A
- |
-
--s IPADDR
-HWADDR
- |
-Adds an ARP entry. The second parameter is the IP address and MAC address of the other host on the LAN.
- |
-N/A
- |
-
--d IPADDR
- |
-Deletes an ARP entry.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **arp** command is used to query and modify the ARP cache table of the TCP/IP stack. If ARP entries for IP addresses on different subnets are added, the protocol stack returns a failure message.
-- This command can be used only after the TCP/IP stack is enabled.
-
-## Example
-
-Run the **arp** command.
-
-ARP cache table:
+arp [_-i IF_] -s *IPADDR HWADDR*
+
+arp [_-i IF_] -d *IPADDR*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| No parameter| Prints the content of the ARP cache table.| N/A |
+| -i IF | Specifies the network port. This parameter is optional.| N/A |
+| -s IPADDR
HWADDR | Adds an ARP entry. The second parameter is the IP address and MAC address of the other host on the LAN.| N/A |
+| -d IPADDR | Deletes an ARP entry.| N/A |
+
+
+## Usage Guidelines
+
+- The **arp** command is used to query and modify the ARP cache table of the TCP/IP stack. If ARP entries for IP addresses on different subnets are added, the protocol stack returns a failure message.
+
+- This command can be used only after the TCP/IP protocol stack is enabled.
+
+
+## Example
+
+Run **arp**.
+
+ARP cache table information:
```
OHOS # arp
@@ -75,35 +46,11 @@ Address HWaddress Iface Type
192.168.1.10 E6:2B:99:2C:4B:20 eth0 static
```
-**Table 2** Output description
-
-
-Parameter
- |
-Description
- |
-
-
-Address
- |
-IPv4 address of a network device.
- |
-
-HWaddress
- |
-MAC address of a network device.
- |
-
-Iface
- |
-Name of the port used by the ARP entry.
- |
-
-Type
- |
-Indicates whether the ARP entry is dynamic or static. A dynamic ARP entry is automatically created by the protocol stack, and a static ARP entry is added by the user.
- |
-
-
-
+**Table 2** Parameter description
+| Parameter| Description|
+| -------- | -------- |
+| Address | IPv4 address of the network device.|
+| HWaddress | MAC address of the network device.|
+| Iface | Name of the port used by the ARP entry.|
+| Type | Whether the ARP entry is dynamic or static. A dynamic ARP entry is automatically created by the protocol stack, and a static ARP entry is added by the user. |
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md b/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
index afb2a55f32fe6475e94f19765a822036c28fb4e1..d48ba68bb62e7ac2baceead92d7fa440b2c6417d 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-dhclient.md
@@ -1,62 +1,45 @@
# dhclient
-## Command Function
-
-This command is used to set and query **dhclient** parameters.
-
-## Syntax
-
-- dhclient <_netif name_\>
-- dhclient -x <_netif name_\>
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--h | --help
- |
-Displays parameters supported by the dhclient command and their usage.
- |
-N/A
- |
-
-<netif name>
- |
-Enables Dynamic Host Configuration Protocol (DHCP) for a network interface card (NIC).
- |
-NIC name, eth0
- |
-
--x <netif name>
- |
-Disables DHCP for a NIC.
- |
-NIC name, eth0
- |
-
-
-
-
-## Usage
+## Command Function
+
+This command is used to set and query **dhclient** parameters.
+
+
+## Syntax
+
+- dhclient <*netif name*>
+
+- dhclient -x <*netif name*>
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range |
+| ------------------------------- | -------------------------------------------- | ---------------- |
+| -h \| --help | Displays parameters supported by the **dhclient** command and their usage.| N/A |
+| <netif name> | Enables Dynamic Host Configuration Protocol (DHCP) for a network interface card (NIC). | NIC name, **eth0**|
+| -x <netif name> | Disables DHCP for a NIC. | NIC name, **eth0**|
+
+
+## Usage Guidelines
Run the following commands:
-- dhclient eth0
-- dhclient -x eth0
+- dhclient eth0
+
+- dhclient -x eth0
+
+## Note
+
+Currently, the shell does not support this command.
-## Example
+## Example
+
+Example 1: Enable DHCP for eth0.
-Example 1: enabling DHCP for eth0
```
OHOS:/$ dhclient eth0
@@ -69,7 +52,9 @@ eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
OHOS:/$
```
-Example 2: disabling DHCP for eth0
+
+Example 2: Disable DHCP for eth0.
+
```
OHOS:/$ dhclient -x eth0
@@ -81,4 +66,3 @@ lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
eth0 ip:0.0.0.0 netmask:0.0.0.0 gateway:0.0.0.0
HWaddr 42:da:81:bc:58:94 MTU:1500 Running Default Link UP
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
index be7d8a835a2944e3303cf6a4a182f8bebf42da94..017f799e49c00a0d8f75aef2b6b6af1ed701b86d 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ifconfig.md
@@ -1,313 +1,157 @@
# ifconfig
-## Command Function
+## Command Function
This command can be used to:
-- Query and set parameters of a network interface card \(NIC\), such as the IP address, network mask, gateway, and MAC address.
-- Enable or disable a NIC.
+- Query and set parameters of a network interface card (NIC), such as the IP address, network mask, gateway, and MAC address.
-## Syntax
+- Enable or disable a NIC.
-ifconfig \[option\]
+
+## Syntax
+
+ifconfig [option]
option:
-- \[_-a_\]
-- <_interface_\> <_address_\> \[_netmask _\] \[_gateway _\]
-- \[_hw ether _\] \[_mtu _\]
-- \[_inet6 add _\]
-- \[_inet6 del _\]
-- \[_up|down_\]
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-No parameter
- |
-Displays all NIC information, which includes the IP address, network mask, gateway, MAC address, maximum transmission unit (MTUs), and running status of each NIC.
- |
-N/A
- |
-
--a
- |
-Displays data sent and received by the protocol stack.
- |
-N/A
- |
-
-interface
- |
-Specifies the NIC name, for example, eth0.
- |
-N/A
- |
-
-address
- |
-Specifies the IP address, for example, 192.168.1.10. The NIC name must be specified.
- |
-N/A
- |
-
-netmask
- |
-Specifies the subnet mask, for example, 255.255.255.0.
- |
-N/A
- |
-
-gateway
- |
-Specifies the gateway, for example, 192.168.1.1.
- |
-N/A
- |
-
-hw ether
- |
-Specifies the MAC address, for example, 00:11:22:33:44:55. Currently, only the ether hardware type is supported.
- |
-N/A
- |
-
-mtu
- |
-Specifies the MTU size, for example, 1000.
- |
-- IPv4:
[68,1500]
- - IPv6:
[1280, 1500]
-
- |
-
-add
- |
-Specifies the IPv6 address, for example, 2001:a:b:c:d:e:f:d. The NIC name and inet6 must be specified.
- |
-N/A
- |
-
-del
- |
-Deletes an IPv6 address. You need to specify the NIC name and add the inet6 option. For details, see the example.
- |
-N/A
- |
-
-up
- |
-Enables the data processing function of the NIC. The NIC name must be specified.
- |
-N/A
- |
-
-down
- |
-Disables the data processing function of the NIC. The NIC name must be specified.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **ifconfig** command can be used only after the TCP/IP stack is enabled.
-- Detecting an IP address conflict takes time. Each time you run the **ifconfig** command to set an IP address, there is a delay of about 2 seconds.
-
-## Example
-
-- ifconfig eth0 192.168.100.31 netmask 255.255.255.0 gateway 192.168.100.1 hw ether 00:49:cb:6c:a1:31
-- ifconfig -a
-- ifconfig eth0 inet6 add 2001:a:b:c:d:e:f:d
-- ifconfig eth0 inet6 del 2001:a:b:c:d:e:f:d
-
-## Output
-
-- Example 1: setting network parameters
-
- ```
- OHOS:/$ ifconfig eth0 192.168.100.31 netmask 255.255.255.0 gateway 192.168.100.1 hw ether 00:49:cb:6c:a1:31
- OHOS:/$ ifconfig
- lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
- ip6: ::1/64
- HWaddr 00 MTU:0 Running Link UP
- eth0 ip:192.168.100.31 netmask:255.255.255.0 gateway:192.168.100.1
- HWaddr 00:49:cb:6c:a1:31 MTU:1500 Running Default Link UP
- ```
-
- The following table describes the output parameters.
-
- **Table 2** Output description
-
-
- Parameter
- |
- Description
- |
-
-
- ip
- |
- IP address of the board
- |
-
- netmask
- |
- Subnet mask
- |
-
- gateway
- |
- Gateway
- |
-
- HWaddr
- |
- MAC address of the board
- |
-
- MTU
- |
- Maximum transmission unit
- |
-
- Running/Stop
- |
- Indicates whether the NIC is running.
- |
-
- Default
- |
- Indicates that the NIC is connected to the default gateway.
- |
-
- Link UP/Down
- |
- Connection status of the NIC
- |
-
-
-
-
-- Example 2: obtaining protocol stack statistics
-
- ```
- OHOS # ifconfig -a
- RX packets:6922 errors:0 ip dropped:4312 link dropped:67 overrun:0 bytes:0 (0.0 B)
- RX packets(ip6):3 errors:0 dropped:0 overrun:0 bytes:0 (0.0 B)
- TX packets:1394 errors:0 link dropped:67 overrun:0 bytes:0(0.0 B)
- TX packets(ip6):3 errors:0 overrun:0 bytes:0(0.0 B)
- ```
-
- The following table describes the output parameters.
-
- **Table 3** ifconfig -a output description
-
-
- Parameter
- |
- Description
- |
-
-
- RX packets
- |
- Number of normal packets received at the IP layer.
- |
-
- RX error
- |
- Number of error packets received at the IP layer. The errors include the length error, verification error, IP option error, and IP header protocol error.
- |
-
- RX dropped
- |
- Number of packets discarded at the IP layer. Packets are discarded due to packet errors, packet forwarding failures, and disabled local NICs.
- |
-
- RX overrun
- |
- Number of packets that the MAC layer fails to deliver to the upper-layer protocol stack. The failure is caused by resource insufficiency at the protocol stack.
- |
-
- RX bytes
- |
- Total length of normal packets received at the IP layer, excluding the length of the fragments that are not reassembled.
- |
-
- TX packets
- |
- Number of packets that have been normally sent or forwarded at the IP layer.
- |
-
- TX error
- |
- Number of packets that the IP layer fails to send. Packets may fail to be sent because the packets cannot be routed or the packets fail to be processed in the protocol stack.
- |
-
- TX dropped
- |
- Number of packets that the MAC layer discards due to delivery failures, for example, the NIC driver fails to process the packets.
- |
-
- TX overrun
- |
- Reserved.
- |
-
- TX bytes
- |
- Total length of the packets successfully sent or forwarded at the IP layer.
- |
-
-
-
-
-- Example 3: setting an IPv6 address
-
- ```
- OHOS:/$ ifconfig eth0 inet6 add 2001:a:b:c:d:e:f:d
- NetifStatusCallback(eth0): nsc event: 0x8
- NetifStatusCallback(eth0): nsc status changed: 0
- NetifStatusCallback(eth0): nsc event: 0x200
- NetifStatusCallback(eth0): nsc event: 0x8
- NetifStatusCallback(eth0): nsc status changed: 1
- NetifStatusCallback(eth0): nsc event: 0x200
- NetifStatusCallback(eth0): nsc event: 0x200
- OHOS:/$ ifconfig
- lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
- ip6: ::1/64
- HWaddr 00 MTU:0 Running Link UP
- eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
- ip6: 2001:A:B:C:D:E:F:D/64
- HWaddr 66:2f:e5:bd:24:e6 MTU:1500 Running Default Link UP
- ```
-
-- Example 4: deleting an IPv6 address
-
- ```
- OHOS:/$ ifconfig eth0 inet6 del 2001:a:b:c:d:e:f:d
- NetifStatusCallback(eth0): nsc event: 0x200
- OHOS:/$ ifconfig
- lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
- ip6: ::1/64
- HWaddr 00 MTU:0 Running Link UP
- eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
- HWaddr 66:2f:e5:bd:24:e6 MTU:1500 Running Default Link UP
- ```
+- [_-a_]
+
+- <*interface*> <*address*> [_netmask <mask>_] [_gateway <address>_]
+
+- [_hw ether <address>_] [_mtu <size>_]
+
+- [_inet6 add <address>_]
+
+- [_inet6 del <address>_]
+
+- [_up|down_]
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| No parameter| Displays all NIC information, which includes the IP address, network mask, gateway, MAC address, maximum transmission unit (MTUs), and running status of each NIC.| N/A |
+| -a | Displays data sent and received by the protocol stack.| N/A |
+| interface | Specifies the NIC name, for example, **eth0**.| N/A |
+| address | Specifies the IP address, for example, **192.168.1.10**. The NIC name must be specified.| N/A |
+| netmask | Specifies the subnet mask, for example, **255.255.255.0**.| N/A |
+| gateway | Specifies the gateway, for example, **192.168.1.1**.| N/A |
+| hw ether | Specifies the MAC address, for example, **00:11:22:33:44:55**. Currently, only the **ether** hardware type is supported.| N/A |
+| mtu | Specifies the MTU size, for example, **1000**.| - IPv4: [68, 1500]
- IPv6:[1280, 1500] |
+| add | Specifies the IPv6 address, for example, **2001:a:b:c:d:e:f:d**. The NIC name and **inet6** must be specified.| N/A |
+| del | Deletes an IPv6 address. You need to specify the NIC name and add the **inet6** option. For details, see the example.| N/A |
+| up | Enables the data processing function of the NIC. The NIC name must be specified.| N/A |
+| down | Disables the data processing function of the NIC. The NIC name must be specified.| N/A |
+## Usage Guidelines
+
+- This command can be used only after the TCP/IP stack is enabled.
+
+- Detecting an IP address conflict takes time. Each time you run the **ifconfig** command to set an IP address, there is a delay of about 2 seconds.
+
+
+## Example
+
+- ifconfig eth0 192.168.100.31 netmask 255.255.255.0 gateway 192.168.100.1 hw ether 00:49:cb:6c:a1:31
+
+- ifconfig -a
+
+- ifconfig eth0 inet6 add 2001:a:b:c:d:e:f:d
+
+- ifconfig eth0 inet6 del 2001:a:b:c:d:e:f:d
+
+
+## Output
+
+- Example 1: Set network parameters.
+
+ ```
+ OHOS:/$ ifconfig eth0 192.168.100.31 netmask 255.255.255.0 gateway 192.168.100.1 hw ether 00:49:cb:6c:a1:31
+ OHOS:/$ ifconfig
+ lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
+ ip6: ::1/64
+ HWaddr 00 MTU:0 Running Link UP
+ eth0 ip:192.168.100.31 netmask:255.255.255.0 gateway:192.168.100.1
+ HWaddr 00:49:cb:6c:a1:31 MTU:1500 Running Default Link UP
+ ```
+
+
+
+ **Table 2** Parameter description
+
+ | Parameter| Description|
+ | -------- | -------- |
+ | ip | IP address of the board.|
+ | netmask | Subnet mask.|
+ | gateway | Gateway.|
+ | HWaddr | MAC address of the board.|
+ | MTU | Maximum transmission unit.|
+ | Running/Stop | Whether the NIC is running.|
+ | Default | Indicates that the NIC is connected to the default gateway.|
+ | Link UP/Down | Connection status of the NIC.|
+
+- Example 2: Obtain protocol stack statistics.
+
+ ```
+ OHOS # ifconfig -a
+ RX packets:6922 errors:0 ip dropped:4312 link dropped:67 overrun:0 bytes:0 (0.0 B)
+ RX packets(ip6):3 errors:0 dropped:0 overrun:0 bytes:0 (0.0 B)
+ TX packets:1394 errors:0 link dropped:67 overrun:0 bytes:0(0.0 B)
+ TX packets(ip6):3 errors:0 overrun:0 bytes:0(0.0 B)
+ ```
+
+
+
+ **Table 3** ifconfig -a parameter description
+
+ | Parameter| Description|
+ | -------- | -------- |
+ | RX packets | Number of normal packets received at the IP layer.|
+ | RX error | Number of error packets received at the IP layer. The errors include the length error, verification error, IP option error, and IP header protocol error.|
+ | RX dropped | Number of packets discarded at the IP layer. Packets are discarded due to packet errors, packet forwarding failures, and disabled local NICs.|
+ | RX overrun | Number of packets that the MAC layer fails to deliver to the upper-layer protocol stack. The failure is caused by resource insufficiency at the protocol stack.|
+ | RX bytes | Total length of normal packets received at the IP layer, excluding the length of the fragments that are not reassembled.|
+ | TX packets | Number of packets that have been normally sent or forwarded at the IP layer.|
+ | TX error | Number of packets that the IP layer fails to send. Packets may fail to be sent because the packets cannot be routed or the packets fail to be processed in the protocol stack.|
+ | TX dropped | Number of packets that the MAC layer discards due to delivery failures, for example, the NIC driver fails to process the packets.|
+ | TX overrun | Not used currently.|
+ | TX bytes | Total length of the packets successfully sent or forwarded at the IP layer.|
+
+- Example 3: Set an IPv6 address.
+
+ ```
+ OHOS:/$ ifconfig eth0 inet6 add 2001:a:b:c:d:e:f:d
+ NetifStatusCallback(eth0): nsc event: 0x8
+ NetifStatusCallback(eth0): nsc status changed: 0
+ NetifStatusCallback(eth0): nsc event: 0x200
+ NetifStatusCallback(eth0): nsc event: 0x8
+ NetifStatusCallback(eth0): nsc status changed: 1
+ NetifStatusCallback(eth0): nsc event: 0x200
+ NetifStatusCallback(eth0): nsc event: 0x200
+ OHOS:/$ ifconfig
+ lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
+ ip6: ::1/64
+ HWaddr 00 MTU:0 Running Link UP
+ eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
+ ip6: 2001:A:B:C:D:E:F:D/64
+ HWaddr 66:2f:e5:bd:24:e6 MTU:1500 Running Default Link UP
+ ```
+
+- Example 4: Delete an IPv6 address.
+
+ ```
+ OHOS:/$ ifconfig eth0 inet6 del 2001:a:b:c:d:e:f:d
+ NetifStatusCallback(eth0): nsc event: 0x200
+ OHOS:/$ ifconfig
+ lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
+ ip6: ::1/64
+ HWaddr 00 MTU:0 Running Link UP
+ eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
+ HWaddr 66:2f:e5:bd:24:e6 MTU:1500 Running Default Link UP
+ ```
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
index e3dcce0bd9ac649fa5fb5ad82b8f77d714afae9c..1fd84191a319b96a2459080e1834bf712a70e49e 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ipdebug.md
@@ -1,21 +1,24 @@
# ipdebug
-## Command Function
+## Command Function
-**ipdebug** is a console command and is used for IPv6 debugging. It can display IPv6 address prefixes, neighbor entries, destination entries, and default route entries.
+**ipdebug** is a console command and is used for IPv6 debugging. It can display IPv6 address prefixes, neighbor entries, destination entries, and default route entries.
-## Syntax
+
+## Syntax
ipdebug
-## Example
-Run the **ipdebug** command.
+## Example
+
+Run the **ipdebug** command.
-## Output
-**ipdebug** command output:
+## Output
+
+**ipdebug** command output:
```
OHOS # ipdebug
@@ -52,4 +55,3 @@ FE80::4639:C4FF:FE94:5D44 FE80::4639:C4FF:FE94:5D44 pmtu 1500 age 6
FE80::4639:C4FF:FE94:5D44 invalidation_timer 1784 flags 0
--------------------------------------------------------------------
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md b/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
index a383b945766d96178bdf52cd532a315bed2ed6b2..0e2052c802089979c566cba06648e2390700cc13 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-netstat.md
@@ -1,29 +1,37 @@
# netstat
-## Command Function
+## Command Function
-The **netstat** command is a console command and is used for monitoring the TCP/IP network. It can display the actual network connections and the status of each network interface device. This command displays statistics related to TCP and UDP and can be used to check the network connection to each port on the device \(board\).
+The **netstat** command is a console command and is used for monitoring the TCP/IP network. It can display the actual network connections and the status of each network interface device. This command displays statistics related to TCP and UDP connections and can be used to check the network connection to each port on a device (board).
-## Syntax
+
+## Syntax
netstat
-## Parameters
-None
+## Parameters
-## Usage
+None.
-netstat
-## Example
+## Usage Guidelines
+
+None.
+
+## Note
-Run **netstat**.
+Currently, the shell does not support this command.
-## Output
+## Example
-**netstat** print information
+Run **netstat**.
+
+
+## Output
+
+**netstat** output information:
```
OHOS # netstat
@@ -41,50 +49,16 @@ udp 0 0 127.0.0.1:62180 127.0.0.1:62179
udp 0 0 127.0.0.1:62178 127.0.0.1:62177
```
-**Table 1** Output description
-
-
-Parameter
- |
-Description
- |
-
-
-Proto
- |
-Protocol type.
- |
-
-Recv-Q
- |
-Amount of data that is not read by the user.
-For Listen TCP, the value indicates the number of TCP connections that have finished three-way handshake but are not accepted by users.
- |
-
-Send-Q
- |
-For a TCP connection, this value indicates the amount of data that has been sent but not acknowledged.
-For a UDP connection, this value indicates the amount of data buffered before IP address resolution is complete.
- |
-
-Local Address
- |
-Local IP address and port number.
- |
-
-Foreign Address
- |
-Remote IP address and port number.
- |
-
-State
- |
-TCP connection status. This parameter is meaningless for UDP.
- |
-
-
-
-
-> **NOTE:**
->The command output like "========== total sockets 32 ====== unused sockets 22 BootTime 27 s ==========" indicates that there are 32 sockets in total, 22 sockets are not used, and it has been 27 seconds since the system starts.
+**Table 1** Output description
+
+| Parameter | Description |
+| -------------------- | ------------------------------------------------------------ |
+| Proto | Protocol type. |
+| Recv-Q | Amount of data that is not read by the user.
For Listen TCP, the value indicates the number of TCP connections that have finished the three-way handshake but are not accepted by users. |
+| Send-Q | For a TCP connection, this value indicates the amount of data that has been sent but not acknowledged.
For a UDP connection, this value indicates the amount of data buffered before IP address resolution is complete.|
+| Local Address | Local IP address and port number. |
+| Foreign Address | Remote IP address and port number. |
+| State | TCP connection status. This parameter is meaningless for UDP. |
+> **NOTE**
+> The command output like "========== total sockets 32 ====== unused sockets 22 BootTime 27 s ==========" indicates that there are 32 sockets in total, 22 sockets are not used, and it has been 27 seconds since the system starts.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
index f3fa527279212dab09ad895b48872ca143a67926..5f6605457b77f0f71ca6b8f9d5bc1f0bba4f5089 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ntpdate.md
@@ -1,51 +1,41 @@
# ntpdate
-## Command Function
+## Command Function
This command is used to synchronize system time from the server.
-## Syntax
-ntpdate \[_SERVER\_IP1_\] \[_SERVER\_IP2_\]...
+## Syntax
-## Parameters
+ntpdate [_SERVER_IP1_] [_SERVER_IP2_]...
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-SERVER_IP
- |
-Specifies the IP address of the NTP server.
- |
-N/A
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-Run the **ntpdate **\[_SERVER\_IP1_\] \[_SERVER\_IP2_\]... command. **ntpdate** obtains and displays the time of the first server with a valid IP address.
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| SERVER_IP | Specifies the IP address of the NTP server.| N/A |
-## Example
-Run **ntpdate 192.168.1.3 **to update the system time.
+## Usage Guidelines
+
+Run the **ntpdate [_SERVER_IP1_] [_SERVER_IP2_]...** command to obtain and display the time of the first server with a valid IP address.
+
+
+## Example
+
+Run **ntpdate 192.168.1.3 **to update the system time.
+
+
+## Output
-## Output
```
OHOS # ntpdate 192.168.1.3
time server 192.168.1.3: Mon Jun 13 09:24:25 2016
```
-If the time zone of the board is different from that of the server, the displayed time may be several hours different from the obtained server time.
-
+If the time zone of the board is different from that of the server, the displayed time may be several hours different from the server time obtained.
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
index 5c709aaaf0bae7a78dda6e8cc5060c6832d176fb..2abc781addc72da998a4a4c89ba375a8c05c2263 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ping.md
@@ -1,100 +1,51 @@
# ping
-## Command Function
+## Command Function
This command is used to test an IPv4 connection.
-## Syntax
-
-ping _\[-4\] \[-c cnt\] \[-f\] \[-i interval\] \[-q\] \[-s size\] _
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
---help
- |
-Displays the parameters supported by the ping command.
- |
-N/A
- |
-
--4
- |
-Forcibly pings the destination address using the IPv4 protocol.
- |
-0-65500
- |
-
--c CNT
- |
-Specifies the number of execution times. The default value is 3.
- |
-1-65535
- |
-
--f
- |
-Pings an IPv4 address in implicit mode. The default parameter configuration is equivalent to -c 15 -i 0.2.
- |
-N/A
- |
-
--i interval
- |
-Specifies the interval (in ms) for sending a ping packet.
- |
-1-200
- |
-
--q
- |
-Implicitly pings an IPv4 address. If the host is active, the ping stops after true is received.
- |
-N/A
- |
-
--s SIZE
- |
-Specifies the size of a ping packet, in bytes. The default size is 56 bytes.
- |
-0-4088
- |
-
-IP
- |
-Specifies the IPv4 address to test.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- The **ping** command is used to check whether the destination IP address is reachable.
-- If the destination IP address is unreachable, the system displays a message indicating that the request times out.
-- If no route is available to the destination IP address, an error message is displayed.
-- This command can be used only after the TCP/IP stack is enabled.
-
-## Example
-
-Run **ping 192.168.1.3**.
-
-## Output
-
-Pinging a TFTP server IP address:
+
+## Syntax
+
+ping *[-4] [-c cnt] [-f] [-i interval] [-q] [-s size] <IP>*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| --help | Displays the parameters supported by the **ping** command.| N/A |
+| -4 | Forcibly pings the destination address using the IPv4 protocol.| 0-65500 |
+| -c CNT | Specifies the number of execution times. The default value is **3**.| 1-65535 |
+| -f | Pings an IPv4 address in implicit mode. The default parameter configuration is equivalent to **-c 15 -i 0.2**.| N/A |
+| -i interval | Specifies the interval (in ms) for sending a ping packet.| 1-200 |
+| -q | Implicitly pings an IPv4 address. If the host is still alive, the ping stops after **true** is returned.| N/A |
+| -s SIZE | Specifies the size of a ping packet, in bytes. The default size is **56** bytes.| 0-4088 |
+| IP | Specifies the IPv4 address of the network to test.| N/A |
+
+
+## Usage Guidelines
+
+- The **ping** command is used to check whether the destination IP address is reachable.
+
+- If the destination IP address is unreachable, the system displays a message indicating that the request times out.
+
+- If no route is available to the destination IP address, an error message is displayed.
+
+- This command can be used only after the TCP/IP protocol stack is enabled.
+
+
+## Example
+
+Run **ping 192.168.1.3**.
+
+
+## Output
+
+Ping a TFTP server IP address.
```
OHOS:/$ ping 192.168.1.3
@@ -106,4 +57,3 @@ Ping 192.168.1.3 (192.168.1.3): 56(84) bytes.
3 packets transmitted, 3 received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md b/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
index e1ec3b85298b9e1a10a048518f13339cf1f111a7..cc71b56b59673cbf9063097ae44c59ede5ea1abc 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-ping6.md
@@ -1,120 +1,98 @@
# ping6
-## Command Function
+## Command Function
This command is used to test an IPv6 network connection.
-## Syntax
-
-ping6 _\[-c count\] \[-I interface / sourceAddress\] destination_
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--c count
- |
-Specifies the number of execution times. If this parameter is not specified, the default value is 4.
- |
-1~65535
- |
-
--I interface
- |
-Performs an IPv6 ping operation for a specified NIC.
- |
-N/A
- |
-
--I sourceAddress
- |
-Specifies the source IPv6 address.
- |
-N/A
- |
-
-destination
- |
-Specifies the IP address of the destination host.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-- If the destination IPv6 address is unreachable, the system displays a message indicating that the request times out.
-- If no route is available to the destination IPv6 address, an error message is displayed.
-- This command can be used only after the TCP/IP protocol stack is enabled.
-
-## Example
-
-- ping6 2001:a:b:c:d:e:f:b
-- ping6 -c 3 2001:a:b:c:d:e:f:b
-- ping6 -I eth0 2001:a:b:c:d:e:f:b
-- ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b
-
-## Output
-
-1. Output of **ping6 2001:a:b:c:d:e:f:b**:
-
- ```
- OHOS # ping6 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
- --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
- 4 packets transmitted, 4 received, 0.00% packet loss, time 20ms
- rtt min/avg/max = 0/0.00/0 ms
- ```
-
-2. Output of **ping6 -c 3 2001:a:b:c:d:e:f:b**:
-
- ```
- OHOS # ping6 -c 3 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
- --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
- 3 packets transmitted, 3 received, 0.00% packet loss, time 20ms
- rtt min/avg/max = 0/0.00/0 ms
- ```
-
-3. Output of **ping6 -I eth0 2001:a:b:c:d:e:f:b**:
-
- ```
- OHOS # ping6 -I eth0 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time=10 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
- --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
- 4 packets transmitted, 4 received, 0.00% packet loss, time 30msrtt min/avg/max = 0/2.50/10 ms
- ```
-
-4. Output of **ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b**:
-
- ```
- OHOS # ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
- 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
- --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
- 4 packets transmitted, 4 received, 0.00% packet loss, time 20msrtt min/avg/max = 0/0.00/0 ms
- ```
+## Syntax
+ping6 *[-c count] [-I interface / sourceAddress] destination*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter | Description | Value Range|
+| --------------------- | ----------------------------------- | -------- |
+| -c count | Specifies the number of execution times. If this parameter is not specified, the default value is **4**.| [1, 65535] |
+| -I interface | Specifies the NIC for performing the ping operation. | N/A |
+| -I sourceAddress | Specifies the source IPv6 address. | N/A |
+| destination | Specifies the IP address of the destination host. | N/A |
+
+
+## Usage Guidelines
+
+- If the destination IPv6 address is unreachable, "Request Timed Out" will be displayed.
+
+- If no route is available to the destination IPv6 address, "Destinatin Host Unreachable" will be displayed.
+
+- This command can be used only after the TCP/IP stack is enabled.
+
+## Note
+
+Currently, the shell does not support this command.
+
+## Example
+
+- ping6 2001:a:b:c:d:e:f:b
+
+- ping6 -c 3 2001:a:b:c:d:e:f:b
+
+- ping6 -I eth0 2001:a:b:c:d:e:f:b
+
+- ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b
+
+
+## Output
+
+1. Output of **ping6 2001:a:b:c:d:e:f:b**:
+
+ ```
+ OHOS # ping6 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
+ --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
+ 4 packets transmitted, 4 received, 0.00% packet loss, time 20ms
+ rtt min/avg/max = 0/0.00/0 ms
+ ```
+
+2. Output of **ping6 -c 3 2001:a:b:c:d:e:f:b**:
+
+ ```
+ OHOS # ping6 -c 3 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
+ --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
+ 3 packets transmitted, 3 received, 0.00% packet loss, time 20ms
+ rtt min/avg/max = 0/0.00/0 ms
+ ```
+
+3. Output of **ping6 -I eth0 2001:a:b:c:d:e:f:b**:
+
+ ```
+ OHOS # ping6 -I eth0 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time=10 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
+ --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
+ 4 packets transmitted, 4 received, 0.00% packet loss, time 30msrtt min/avg/max = 0/2.50/10 ms
+ ```
+
+4. Output of **ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b**:
+
+ ```
+ OHOS # ping6 -I 2001:a:b:c:d:e:f:d 2001:a:b:c:d:e:f:b PING 2001:A:B:C:D:E:F:B with 56 bytes of data.
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=1 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=2 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=3 time<1 ms
+ 56 bytes from 2001:A:B:C:D:E:F:B : icmp_seq=4 time<1 ms
+ --- 2001:a:b:c:d:e:f:b/64 ping statistics ---
+ 4 packets transmitted, 4 received, 0.00% packet loss, time 20msrtt min/avg/max = 0/0.00/0 ms
+ ```
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md b/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
index 8f20d27c6d8f9f31ea7f77f27145e6aea87586c0..ff9fc0686ed420aca866b2691d31ea75720745ef 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-telnet.md
@@ -1,63 +1,46 @@
# telnet
-## Command Function
+## Command Function
This command is used to enable or disable the Telnet server service.
-## Syntax
-telnet \[_on | off_\]
+## Syntax
-## Parameters
+telnet [_on | off_]
-**Table 1** Parameter description
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
-on
- |
-Enables the Telnet server service.
- |
-N/A
- |
-
-off
- |
-Disables the Telnet server service.
- |
-N/A
- |
-
-
-
+## Parameters
-## Usage
+**Table 1** Parameter description
-- Before enabling Telnet, ensure that the network driver and network protocol stack have been initialized and the NIC of the board is in the **link up** state.
-- Currently, multiple clients \(Telnet + IP\) cannot connect to the development board at the same time.
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| on | Enables the telnet server service.| N/A |
+| off | Disables the telnet server service.| N/A |
- > **NOTICE:**
- >Telnet is used for debugging and is disabled by default. Do not use it in formal products.
+## Usage Guidelines
-## Example
+- Before enabling Telnet, ensure that the network driver and network protocol stack have been initialized and the NIC of the board is in the **link up** state.
-Run **telnet on**.
+- Currently, multiple clients (Telnet + IP) cannot connect to the development board at the same time.
+ > **NOTICE**
+ > Telnet is used for debugging and is disabled by default. Do not use it in formal products.
-## Output
+
+## Example
+
+Run **telnet on**.
+
+
+## Output
Command output:
+
```
OHOS # telnet on
OHOS # start telnet server successfully, waiting for connection.
```
-
diff --git a/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md b/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
index d5fd3fb26a5f92d87861acac6ac609c95d241ff0..ca0227eed99e2e0c6a162c867eff3a0d329b05eb 100644
--- a/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
+++ b/en/device-dev/kernel/kernel-small-debug-shell-net-tftp.md
@@ -1,81 +1,52 @@
# tftp
-## Command Function
-
-Trivial File Transfer Protocol \(TFTP\) is a protocol in the TCP/IP protocol suite for transferring files between clients and servers. TFTP provides simple and low-overhead file transfer services. The port number is 69.
-
-The **tftp** command is used to transfer files with a TFTP server.
-
-## Syntax
-
-./bin/tftp _<-g/-p\>_ _-l_ _\[FullPathLocalFile\] -r \[RemoteFile\] \[Host\]_
-
-## Parameters
-
-**Table 1** Parameter description
-
-
-Parameter
- |
-Description
- |
-Value Range
- |
-
-
--g/-p
- |
-Specifies the file transfer direction.
-- -g: downloads files from the TFTP server.
- -p: uploads files to the TFTP server.
- |
-N/A
- |
-
--l FullPathLocalFile
- |
-Specifies the complete path of a local file.
- |
-N/A
- |
-
--r RemoteFile
- |
-Specifies the file name on the server.
- |
-N/A
- |
-
-Host
- |
-Specifies the server IP address.
- |
-N/A
- |
-
-
-
-
-## Usage
-
-1. Deploy a TFTP server on the server and configure the TFTP server correctly.
-2. Use the **tftp** command to upload and download files on the OpenHarmony board.
-3. The size of the file to be transferred cannot exceed 32 MB.
-
- > **NOTICE:**
- >TFTP is used for debugging and disabled by default. Do not use it in formal products.
-
-
-## Example
-
-Download the **out** file from the server.
-
-## Output
+## Command Function
+
+Trivial File Transfer Protocol (TFTP) is a protocol in the TCP/IP protocol suite for transferring files between clients and servers. TFTP provides simple and low-overhead file transfer services. The port number is 69.
+
+The **tftp** command is used to transfer files with a TFTP server.
+
+
+## Syntax
+
+./bin/tftp *<-g/-p>**-l**[FullPathLocalFile] -r [RemoteFile] [Host]*
+
+
+## Parameters
+
+**Table 1** Parameter description
+
+| Parameter| Description| Value Range|
+| -------- | -------- | -------- |
+| -g/-p | Specifies the file transfer direction.
- **-g**: obtains a file from the TFTP server.
- **-p**: uploads a file to the TFTP server.| N/A |
+| -l FullPathLocalFile | Specifies the complete path of a local file.| N/A |
+| -r RemoteFile | Specifies the file name on the server.| N/A |
+| Host | Specifies the server IP address.| N/A |
+
+
+## Usage Guidelines
+
+1. Deploy a TFTP server on the server and configure the TFTP server correctly.
+
+2. Use the **tftp** command to upload files from or download files to an OpenHarmony board.
+
+3. The size of the file to be transferred cannot exceed 32 MB.
+ > **NOTICE**
+ > TFTP is used for debugging and disabled by default. Do not use it in formal products.
+
+
+## Example
+
+Download the **out** file from the server.
+
+
+## Output
+
```
OHOS # ./bin/tftp -g -l /nfs/out -r out 192.168.1.2
TFTP transfer finish
```
-After the **tftp** command is executed, **TFTP transfer finish** is displayed if the file transfer is complete. If the file transfer fails, other information is displayed to help locate the fault.
-
+After the **tftp** command is executed, **TFTP transfer finish** is displayed if the file transfer is complete. If the file transfer fails, other information is displayed to help locate the fault.