提交 86d0a0e3 编写于 作者: O openharmony_ci 提交者: Gitee

!866 fix:修改shell命令指导手册规范问题

Merge pull request !866 from Kiita/shell_docs_1112
......@@ -57,7 +57,7 @@ cpup \[_mode_\] \[_taskID_\]
## 输出说明<a name="section19871522144219"></a>
**示例 1** 指令输出结果
**示例** 指令输出结果
```shell
OHOS # cpup 1 5
......
......@@ -13,13 +13,14 @@ date命令用于查询系统日期和时间。
## 命令格式<a name="section16635112512316"></a>
date
- date
date --help
- date --help
date +\[_Format_\]
- date +\[_Format_\]
- date -u
date -u
## 参数说明<a name="section15896030039"></a>
......@@ -67,13 +68,11 @@ date -u
## 使用实例<a name="section021711411237"></a>
举例:
输入 date +%Y--%m--%d
举例:输入 date +%Y--%m--%d
## 输出说明<a name="section17950184414312"></a>
**示例 1** 按指定格式打印系统日期
**示例** 按指定格式打印系统日期
```shell
OHOS:/$ date +%Y--%m--%d
......
......@@ -13,15 +13,16 @@ dmesg命令用于控制内核dmesg缓存区。
## 命令格式<a name="section02"></a>
dmesg
- dmesg
dmesg \[_-c/-C/-D/-E/-L/-U_\]
- dmesg \[_-c/-C/-D/-E/-L/-U_\]
dmesg -s \[_size_\]
- dmesg -s \[_size_\]
dmesg -l \[_level_\]
- dmesg -l \[_level_\]
- dmesg \> \[_fileA_\]
dmesg \> \[_fileA_\]
## 参数说明<a name="section03"></a>
......@@ -102,13 +103,11 @@ dmesg \> \[_fileA_\]
## 使用实例<a name="section05"></a>
举例:
输入dmesg \> dmesg.log。
举例:输入dmesg \> dmesg.log。
## 输出说明<a name="section06"></a>
**示例 1** dmesg重定向到文件。
**示例** dmesg重定向到文件。
```shell
OHOS # dmesg > dmesg.log
......
......@@ -90,7 +90,7 @@ free \[_-b | -k | -m | -g | -t_\]
## 输出说明<a name="section06"></a>
**示例 1** 以三种方式显示内存使用情况
**示例** 以三种方式显示内存使用情况
```shell
OHOS:/$ free
......
......@@ -29,36 +29,35 @@ help用于显示当前操作系统内所有操作指令。
## 输出说明<a name="section06"></a>
**示例1** 查看系统内所有操作指令
**示例** 查看系统内所有操作指令
```shell
OHOS:/$ help
OHOS:/$ help
*******************shell commands:*************************
arp cat cat_logmpp cd chgrp chmod chown cp
cpup date dhclient dmesg dns format free help
hi3881 hwi ifconfig ipdebug kill log ls lsfd
memcheck mkdir mount netstat oom panicreset partinfo partition
ping ping6 pmm pwd reset rm rmdir sem
shm stack statfs su swtmr sync systeminfo task
telnet touch umount uname v2p vmm watch writeproc
usage: help [command]
Show usage information for toybox commands.
Run "toybox" with no arguments for a list of available commands.
```
**内容声明:**
arp cat cat_logmpp cd chgrp chmod
chown cp cpup date dhclient dmesg
dns format free help hi3881 hwi
ifconfig ipdebug kill log ls lsfd
memcheck mkdir mount netstat oom panicreset
partinfo partition ping ping6 pmm pwd
reset rm rmdir sem shm stack
statfs su swtmr sync systeminfo task
telnet touch umount uname v2p vmm
watch writeproc
展示toybox指令请使用toybox。
After shell prompt "OHOS # ":
Use `<cmd> [args ...]` to run built-in shell commands listed above.
Use `exec <cmd> [args ...]` or `./<cmd> [args ...]` to run external commands.
**示例2** toybox指令集
*******************toybox commands:************************
```shell
OHOS:/$ toybox
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.
```
......@@ -71,13 +71,14 @@ kill \[-l \[_signo_\] | _-s signo_ | _-signo_\] _pid..._
## 使用指南<a name="section04"></a>
必须指定发送的信号编号及进程号。
- 必须指定发送的信号编号及进程号。
- 进程编号取值范围根据系统配置变化,例如系统最大支持pid为256,则取值范围缩小为\[1-256\]
进程编号取值范围根据系统配置变化,例如系统最大支持pid为256,则取值范围缩小为\[1-256\]
## 使用实例<a name="section05"></a>
1. 查看当前进程列表,查看需要杀死的进程PID(42)。
- 查看当前进程列表,查看需要杀死的进程PID(42)。
```
OHOS:/$ ps
......@@ -102,7 +103,7 @@ OHOS:/$ ps
43 8 43 2 Running 0x1d7000 0x3a000 0x1e577 0.0 toybox
```
2. 发送信号9(SIGKILL默认行为为立即终止进程)给42号进程**test\_demo**(用户态进程):**kill -s 9 42**(kill -9 42效果相同),并查看当前进程列表,42号进程已终止。
发送信号9(SIGKILL默认行为为立即终止进程)给42号进程**test\_demo**(用户态进程):**kill -s 9 42**(kill -9 42效果相同),并查看当前进程列表,42号进程已终止。
```
OHOS:/$ kill -s 9 42
......@@ -129,6 +130,8 @@ OHOS:/$ ps
45 8 45 2 Running 0x1d7000 0x3a000 0x1e9f5 0.0 toybox
```
- 发送不存在的信号值 kill -100 31
## 输出说明<a name="section06"></a>
发送成功或失败输出结果如下。
......
......@@ -66,12 +66,12 @@ log level \[_levelNum_\]
## 使用实例<a name="section176301333259"></a>
举例:
输入log level 3
举例:输入log level 3
## 输出说明<a name="section14354765415"></a>
**示例** 设置当前日志打印级别为3
```shell
OHOS # log level 3
Set current log level WARN
......
......@@ -26,7 +26,10 @@ memcheck
## 使用实例<a name="section17373205314515"></a>
举例:输入memcheck
举例:
- 输入memcheck
- 输入memcheck出现内存越界
## 输出说明<a name="section13406205385413"></a>
......
......@@ -12,15 +12,16 @@
## 命令格式<a name="section8833164614615"></a>
oom
- 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
oom -h | --help
## 参数说明<a name="section12809111019453"></a>
......@@ -73,11 +74,25 @@ oom -h | --help
>![](../public_sys-resources/icon-note.gif) **说明:**
>当系统内存不足时,会打印出内存不足的提示信息。
- oom -i 100
## 输出说明<a name="section12742311179"></a>
**示例 1** oom缺省打印配置信息
```shell
OHOS:/$ oom
[oom] oom loop task status: enabled
oom low memory threshold: 0x80000(byte)
oom reclaim memory threshold: 0x500000(byte)
oom check interval: 100(microsecond)
```
系统内存不足时打印提示信息
```shell
T:20 Enter:IT MEM 00M 001
[oom] 0S is in low memory state
[oom] OS is in low memory state
total physical memory: 0x1bcf000(byte), used: 0x1b50000(byte) ,free: 0x7f000(byte), low memory threshold: 0x80000(byte)
[oom] candidate victim process init pid: 1, actual phy mem byte:82602
[oom] candidate victim process shell pid: 3, actual phy mem byte:14950e
......@@ -120,6 +135,13 @@ 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
```
**示例 2** 设置 oom 线程任务检查的时间间隔
```shell
OHOS:/$ oom -i 100
[oom] set oom check interval (100)ms successful
```
**表 2** 输出说明
<a name="table487mcpsimp"></a>
......
......@@ -25,11 +25,11 @@ Debug版本才具备的命令。
## 使用实例<a name="section11545171957"></a>
输入pmm
举例:输入pmm
## 输出说明<a name="section075617368542"></a>
**示例 1** 查看物理页使用情况
**示例** 查看物理页使用情况
```shell
OHOS # pmm
......
......@@ -56,11 +56,11 @@ sem \[_ID__ / fulldata_\]
## 使用实例<a name="section79281818476"></a>
举例1:输入 sem fulldata
举例:输入 sem fulldata
## 输出说明<a name="section1975118519456"></a>
**示例 1** 查询所有在用的信号量信息
**示例** 查询所有在用的信号量信息
```shell
OHOS # sem
......
......@@ -25,11 +25,11 @@ stack
## 使用实例<a name="section11545171957"></a>
输入:stack
举例:输入stack
## 输出说明<a name="section075617368542"></a>
**示例 1** 系统堆栈使用情况
**示例** 系统堆栈使用情况
```shell
OHOS # stack
......
......@@ -57,7 +57,7 @@ su \[_uid_\] \[_gid_\]
## 输出说明<a name="section125021924194613"></a>
**示例 1** **切换到**uid为1000,gid为1000的用户
**示例** 从当前用户切换至uid为1000,gid为1000的用户
```shell
OHOS # ls
......
......@@ -45,7 +45,10 @@ swtmr \[_ID_\]
## 使用实例<a name="section16676026389"></a>
举例:输入swtmr和swtmr 1
举例:
- swtmr
- swtmr 1
## 输出说明<a name="section1541991614710"></a>
......
......@@ -29,8 +29,18 @@ systeminfo
## 输出说明<a name="section1657011114915"></a>
**图 1** 查看系统资源使用情况<a name="fig15631172415455"></a>
![](figure/查看系统资源使用情况.png "查看系统资源使用情况")
**示例** 查看系统资源使用情况
```shell
OHOS:/$ systeminfo
Module Used Total Enabled
--------------------------------------------
Task 96 256 YES
Sem 435 1024 YES
Queue 13 1024 YES
SwTmr 20 1024 YES
```
**表 1** 输出说明
......@@ -88,4 +98,3 @@ systeminfo
</tr>
</tbody>
</table>
......@@ -40,7 +40,7 @@ task/task -a
## 使用指南<a name="section2053502951112"></a>
- 参数缺省时默认打印部分任务信息。
参数缺省时默认打印部分任务信息。
## 使用实例<a name="section12629113381116"></a>
......@@ -48,7 +48,7 @@ task/task -a
## 输出说明<a name="section19299103465015"></a>
**示例 1** 查询任务部分信息
**示例** 查询任务部分信息
```shell
OHOS # task
......
......@@ -47,7 +47,7 @@ top \[_-a_\]
## 使用指南<a name="section04"></a>
- 参数缺省时默认打印部分任务信息。
参数缺省时默认打印部分任务信息。
## 使用实例<a name="section05"></a>
......@@ -55,7 +55,7 @@ top \[_-a_\]
## 输出说明<a name="section06"></a>
**示例 1** top 命令显示详情
**示例** top 命令显示详情
```shell
OHOS:/$ top
......
......@@ -12,7 +12,7 @@ uname命令用于显示当前操作系统的名称,版本创建时间,系统
## 命令格式<a name="section02"></a>
uname \[_-a | -s | -r | -m | -n | -v --help_\]
uname \[_-a | -s | -r | -m | -n | -v | --help_\]
**表 1** 参数说明
......@@ -68,15 +68,21 @@ uname \[_-a | -s | -r | -m | -n | -v --help_\]
## 使用指南<a name="section03"></a>
uname用于显示当前操作系统名称。语法uname -a | -s | -r | -m | -n | -v 描述uname 命令将正在使用的操作系统名写到标准输出中。
- uname用于显示当前操作系统名称。
- 除参数--help和-a以外,其他参数可以相互搭配使用;uname -a 等价于 uname -srmnv。
## 使用实例<a name="section04"></a>
举例:输入uname -a 、uname -ms
举例:
- uname -a
- uname -ms
## 输出说明<a name="section05"></a>
**示例 1** 查看系统信息
**示例 1** 查看系统详细信息
```shell
OHOS:/$ uname -a
......
......@@ -13,9 +13,10 @@
## 命令格式<a name="section1795712553416"></a>
vmm \[_-a / -h / --help_\]
- vmm \[_-a / -h / --help_\]
- vmm \[_pid_\]
vmm \[_pid_\]
## 参数说明<a name="section92544592410"></a>
......@@ -60,11 +61,11 @@ vmm \[_pid_\]
## 使用实例<a name="section11545171957"></a>
输入vmm 3
举例:输入vmm 3
## 输出说明<a name="section075617368542"></a>
**示例 1** PID为3的进程虚拟内存使用信息
**示例** PID为3的进程虚拟内存使用信息
```shell
OHOS # vmm 3
......
......@@ -13,9 +13,10 @@ watch命令用于周期性的监视一个命令的运行结果。
## 命令格式<a name="section1075441721316"></a>
watch
- watch
- watch \[_-c/-n/-t/--count/--interval/-no-title/--over_\] \[_command_\]
watch \[_-c/-n/-t/--count/--interval/-no-title/--over_\] \[_command_\]
## 参数说明<a name="section1472810220135"></a>
......@@ -86,13 +87,11 @@ watch运行过程中可以执行**watch --over**结束本次watch命令。
## 使用实例<a name="section4764192791314"></a>
输入举例:
watch -n 2 -c 6 task
举例:watch -n 2 -c 6 task
## 输出说明<a name="section5791253155517"></a>
**示例 1** watch task 结果
**示例** watch task 结果
```shell
OHOS # watch -n 2 -c 6 task
......
......@@ -48,7 +48,7 @@ cat用于显示文本文件的内容。
## 输出说明<a name="section183926225561"></a>
**示例 1** 查看 hello-harmony.txt 文件的信息
**示例** 查看 hello-harmony.txt 文件的信息
```shell
OHOS # cat hello-harmony.txt
......
......@@ -53,7 +53,7 @@ cd \[_path_\]
## 输出说明<a name="section1968117214577"></a>
**示例 1** 显示结果如下
**示例** 显示结果如下
```shell
OHOS:/nfs$ cd ../
......
......@@ -57,7 +57,7 @@ chgrp \[_group_\] \[_pathname_\]
## 输出说明<a name="section06"></a>
**示例 1** 修改 dev/目录下testfile 文件的群组为100
**示例** 修改 /dev目录下testfile 文件的群组为100
```shell
OHOS:/dev$ ll testfile
......
......@@ -52,11 +52,11 @@ chmod \[_mode_\] \[_filename_\]
## 使用实例<a name="section05"></a>
举例:chmod 644 hello-harmony.txt ; chmod 777 hello-harmony.txt
举例:修改hello-harmony.txt 文件权限为644和777。
## 输出说明<a name="section06"></a>
**示例 1** 修改/dev目录下 hello-harmony.txt 文件的权限
**示例** 修改/dev目录下 hello-harmony.txt 文件的权限
```shell
OHOS:/dev$ chmod 644 hello-harmony.txt
......
......@@ -13,8 +13,6 @@
## 命令格式<a name="section02"></a>
cp --help
cp \[_SOURCEFILE_\] \[_DESTFILE_\]
## 参数说明<a name="section03"></a>
......@@ -73,7 +71,7 @@ cp \[_SOURCEFILE_\] \[_DESTFILE_\]
## 输出说明<a name="section06"></a>
**示例 1** 显示结果如下
**示例** 同时拷贝两个文件至指定目录
```shell
OHOS:/$ ls
......
......@@ -84,7 +84,7 @@ du \[_-kKmh_\] \[_file..._\]
## 输出说明<a name="section06"></a>
**示例 1** 显示结果如下
**示例** 显示结果如下
```shell
OHOS:/$ du -h testfile
......
......@@ -63,7 +63,7 @@ format <_dev\_inodename_\> <_sectors_\> <_option_\> \[_label_\]
## 输出说明<a name="section06"></a>
结果如下:
**示例** 格式化mmc卡
```shell
OHOS # format /dev/mmcblk1 128 2
......
......@@ -286,7 +286,10 @@ ls \[_-ACHLSZacdfhiklmnopqrstux1_\] \[_--color_\[_=auto_\]\] \[_directory..._\]
## 使用实例<a name="section05"></a>
举例:输入ls、ll
举例:
- ls
- ll
## 输出说明<a name="section06"></a>
......
......@@ -24,7 +24,7 @@ lsfd命令显示当前已经打开文件的fd号以及文件的名字。
## 输出说明<a name="section42491639151813"></a>
**示例 1** lsfd输出说明
**示例** lsfd输出说明
```shell
OHOS # lsfd
......
......@@ -84,7 +84,7 @@ mount后加需要挂载的设备信息、指定目录以及设备文件格式,
## 输出说明<a name="section06"></a>
**示例 1** 将服务器端nfs目录192.168.1.3:/nfs挂载到当前系统下新建的/nfs目录:
**示例** 将服务器端nfs目录192.168.1.3:/nfs挂载到当前系统下新建的/nfs目录:
```shell
OHOS:/$ mkdir nfs
......
......@@ -91,9 +91,10 @@ mv \[_-fivn_\] _SOURCE... DEST_
举例:
mv -i test.txt testpath/
- mv -i test.txt testpath/
- mv test?.txt testpath/ (移动 test3.txt testA.txt test_.txt)
mv test?.txt testpath/ (移动 test3.txt testA.txt test_.txt)
## 输出说明<a name="section06"></a>
......
......@@ -40,14 +40,16 @@ partinfo <_dev\_inodename_\>
## 使用指南<a name="section4566131982520"></a>
## 使用实例<a name="section4351134942514"></a>
partinfo /dev/mmcblk0p0
举例:partinfo /dev/mmcblk0p0
## 输出说明<a name="section66689331412"></a>
**示例** 查看系统分区信息
```shell
OHOS # partinfo /dev/mmcblk0p0
......
......@@ -29,7 +29,7 @@ pwd 命令将当前目录的全路径名称(从根目录)写入标准输出
## 输出说明<a name="section116313389418"></a>
**示例 1** 查看当前路径
**示例** 查看当前路径
```shell
OHOS:/sdcard/nfs$ pwd
......
......@@ -69,8 +69,8 @@ rm \[_-fv_\] _FILE or rm_ \[_-rv_\] \[_PATH_ | _filename_\]...
举例:
1. 输入rm testfile
2. 输入rm -r testpath/
- 输入rm testfile
- 输入rm -r testpath/
## 输出说明<a name="section06"></a>
......
......@@ -71,7 +71,7 @@ rmdir \[_-p_\] \[_dirname..._\]
## 输出说明<a name="section06"></a>
**示例 1** 删除一个名为 dir 的目录
**示例** 删除一个名为 dir 的目录
```shell
OHOS:/test$ mkdir dir
......
......@@ -45,9 +45,9 @@ statfs \[_directory_\]
以nfs文件系统为例:
statfs /nfs
输入statfs /nfs
**示例 1** statfs输出说明
**示例** 但因nfs文件系统信息
```shell
OHOS # statfs ./nfs
......
......@@ -57,7 +57,10 @@ touch \[_filename_\]
## 使用实例<a name="section05"></a>
举例:输入touch file.c 输出说明
举例:
- touch file.c
- touch testfile1 testfile2 testfile3
## 输出说明<a name="section06"></a>
......
......@@ -66,11 +66,14 @@ umount后加上需要卸载的指定文件系统的目录,即将指定文件
## 使用实例<a name="section05"></a>
举例:umount ./nfs 、umount -a -t nfs ./nfs
举例:
- umount ./nfs
- umount -a -t nfs ./nfs
## 输出说明<a name="section06"></a>
将已在./nfs挂载的文件系统卸载
将已在./nfs挂载的文件系统卸载掉。
**示例 1** umount输出示例
......
......@@ -12,11 +12,12 @@
## 命令格式<a name="section579813484364"></a>
arp
- arp
arp \[_-i IF_\] -s _IPADDR HWADDR_
- arp \[_-i IF_\] -s _IPADDR HWADDR_
- arp \[_-i IF_\] -d _IPADDR_
arp \[_-i IF_\] -d _IPADDR_
## 参数说明<a name="section168065311366"></a>
......@@ -72,45 +73,45 @@ arp \[_-i IF_\] -d _IPADDR_
举例:
1. 输入arp
**示例 1** 打印整个 ARP 缓存表
```shell
OHOS # arp
Address HWaddress Iface Type
192.168.1.10 E6:2B:99:2C:4B:20 eth0 static
```
**表 2** 参数说明
<a name="table1901mcpsimp"></a>
<table><thead align="left"><tr id="row1906mcpsimp"><th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.1"><p id="p1908mcpsimp"><a name="p1908mcpsimp"></a><a name="p1908mcpsimp"></a>参数</p>
</th>
<th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.2"><p id="p1910mcpsimp"><a name="p1910mcpsimp"></a><a name="p1910mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="row1911mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1913mcpsimp"><a name="p1913mcpsimp"></a><a name="p1913mcpsimp"></a>Address</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1915mcpsimp"><a name="p1915mcpsimp"></a><a name="p1915mcpsimp"></a>表示网络设备的IPv4地址。</p>
</td>
</tr>
<tr id="row1916mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1918mcpsimp"><a name="p1918mcpsimp"></a><a name="p1918mcpsimp"></a>HWaddress</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1920mcpsimp"><a name="p1920mcpsimp"></a><a name="p1920mcpsimp"></a>表示网络设备的MAC地址。</p>
</td>
</tr>
<tr id="row1921mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1923mcpsimp"><a name="p1923mcpsimp"></a><a name="p1923mcpsimp"></a>Iface</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1925mcpsimp"><a name="p1925mcpsimp"></a><a name="p1925mcpsimp"></a>表示该ARP表项使用的接口名。</p>
</td>
</tr>
<tr id="row1926mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1928mcpsimp"><a name="p1928mcpsimp"></a><a name="p1928mcpsimp"></a>Type</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1930mcpsimp"><a name="p1930mcpsimp"></a><a name="p1930mcpsimp"></a>表示该ARP表项是动态的还是静态的,动态是指ARP表项由协议栈自动创建,静态是指ARP表项是由用户增加的。</p>
</td>
</tr>
</tbody>
</table>
输入arp
**示例** 打印整个 ARP 缓存表
```shell
OHOS # arp
Address HWaddress Iface Type
192.168.1.10 E6:2B:99:2C:4B:20 eth0 static
```
**表 2** 参数说明
<a name="table1901mcpsimp"></a>
<table><thead align="left"><tr id="row1906mcpsimp"><th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.1"><p id="p1908mcpsimp"><a name="p1908mcpsimp"></a><a name="p1908mcpsimp"></a>参数</p>
</th>
<th class="cellrowborder" valign="top" width="50%" id="mcps1.2.3.1.2"><p id="p1910mcpsimp"><a name="p1910mcpsimp"></a><a name="p1910mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="row1911mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1913mcpsimp"><a name="p1913mcpsimp"></a><a name="p1913mcpsimp"></a>Address</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1915mcpsimp"><a name="p1915mcpsimp"></a><a name="p1915mcpsimp"></a>表示网络设备的IPv4地址。</p>
</td>
</tr>
<tr id="row1916mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1918mcpsimp"><a name="p1918mcpsimp"></a><a name="p1918mcpsimp"></a>HWaddress</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1920mcpsimp"><a name="p1920mcpsimp"></a><a name="p1920mcpsimp"></a>表示网络设备的MAC地址。</p>
</td>
</tr>
<tr id="row1921mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1923mcpsimp"><a name="p1923mcpsimp"></a><a name="p1923mcpsimp"></a>Iface</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1925mcpsimp"><a name="p1925mcpsimp"></a><a name="p1925mcpsimp"></a>表示该ARP表项使用的接口名。</p>
</td>
</tr>
<tr id="row1926mcpsimp"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.1 "><p id="p1928mcpsimp"><a name="p1928mcpsimp"></a><a name="p1928mcpsimp"></a>Type</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.2.3.1.2 "><p id="p1930mcpsimp"><a name="p1930mcpsimp"></a><a name="p1930mcpsimp"></a>表示该ARP表项是动态的还是静态的,动态是指ARP表项由协议栈自动创建,静态是指ARP表项是由用户增加的。</p>
</td>
</tr>
</tbody>
</table>
......@@ -13,9 +13,9 @@
## 命令格式<a name="section02"></a>
dhclient <_netif name_\>
- dhclient <_netif name_\>
dhclient -x <_netif name_\>
- dhclient -x <_netif name_\>
## 参数说明<a name="section03"></a>
......@@ -56,12 +56,20 @@ dhclient -x <_netif name_\>
## 使用指南<a name="section04"></a>
dhclient eth0
dhclient -x eth0
无。
## 使用实例<a name="section05"></a>
举例:
- dhclient eth0
- dhclient -x eth0
## 输出说明<a name="section06"></a>
**示例 1** 启动网卡eth0的dhcp请求
```shell
OHOS:/$ dhclient eth0
OHOS:/$ ifconfig
......@@ -71,6 +79,11 @@ lo ip:127.0.0.1 netmask:255.0.0.0 gateway:127.0.0.1
eth0 ip:192.168.1.10 netmask:255.255.255.0 gateway:192.168.1.1
HWaddr 42:da:81:bc:58:94 MTU:1500 Running Default Link UP
OHOS:/$
```
**示例 2** 关闭网卡eth0的dhcp请求
```shell
OHOS:/$ dhclient -x eth0
NetifStatusCallback(eth0): nsc event: 0xf0
OHOS:/$ ifconfig
......@@ -81,6 +94,3 @@ 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
```
## 输出说明<a name="section06"></a>
无。
\ No newline at end of file
......@@ -15,11 +15,11 @@ ipdebug
## 使用指南<a name="section171837113810"></a>
输入命令ipdebug。
举例:输入命令ipdebug。
## 输出说明<a name="section561416467104"></a>
ipdebug打印信息如下:
**示例** ipdebug打印信息如下:
```shell
OHOS # ipdebug
......
......@@ -17,17 +17,19 @@ netstat
## 参数说明<a name="section17629431193817"></a>
## 使用指南<a name="section5277153519380"></a>
直接输入命令
## 使用实例<a name="section108141437163820"></a>
举例:输入netstat
**示例 1** netstat 打印信息
## 输出说明<a name="section1357015107117"></a>
**示例** netstat 打印信息
```shell
OHOS # netstat
......@@ -46,8 +48,6 @@ 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
```
## 输出说明<a name="section1357015107117"></a>
**表 1** 输出说明
<a name="table2526mcpsimp"></a>
......@@ -94,4 +94,3 @@ udp 0 0 127.0.0.1:62178 127.0.0.1:62177
>![](../public_sys-resources/icon-note.gif) **说明:**
>形如“========== total sockets 32 ====== unused sockets 22 BootTime 27 s ========== ”,表示一共32个套接字,未使用套接字22个,距系统启动已经过27秒。
......@@ -100,7 +100,7 @@ ping _\[-4\] \[-c cnt\] \[-f\] \[-i interval\] \[-q\] \[-s size\] <IP\>_
## 输出说明<a name="section06"></a>
**示例 1** ping tftp 服务器地址
**示例** ping tftp 服务器地址
```shell
OHOS:/$ ping 192.168.1.3
......
......@@ -60,7 +60,7 @@ telnet \[_on | off_\]
## 输出说明<a name="section11846624191310"></a>
**示例 1** 输入 telnet on
**示例** 输入 telnet on
```shell
OHOS # telnet on
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册