更新 ipcs 命令 (#310)

补充 `ipcs`命令的参数
This commit is contained in:
烟草的香味 2021-11-17 22:16:43 +08:00 committed by GitHub
parent 077e5a8d50
commit 75690fae1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 9 deletions

View File

@ -1,7 +1,7 @@
ipcs
===
分析消息队列共享内存和信号量
分析消息队列共享内存和信号量
## 补充说明
@ -15,11 +15,33 @@ ipcs(选项)
### 选项
#### 资源选项
```shell
-a显示全部可显示的信息
-q显示活动的消息队列信息
-m显示活动的共享内存信息
-s显示活动的信号量信息。
-a, --all 显示全部(默认值)
-q, --queues 消息队列
-m, --shmems 共享内存
-s, --semaphores 信号量
```
#### 输出选项
```shell
-t, --time 显示最后一次操作时间
-p, --pid 显示创建者和最后一次操作者的PID
-c, --creator 显示创建者和拥有者的 userid, groupid
-l, --limits 显示对资源的限制
-u, --summary 显示当前状态摘要
--human 以友好的方式显示大小(eg: 500K)
-b, --bytes 以字节为单位显示大小(仅影响`-l`选项)
```
#### 通用选项
```shell
-i, --id <id> 显示指定ID的资源
-h, --help 显示帮助文档并退出
-V, --version 显示版本信息并退出
```
### 实例
@ -27,11 +49,15 @@ ipcs(选项)
```shell
ipcs -a
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x7401833d 2654208 root 600 4 0
0x00000000 3145729 root 600 4194304 9 dest
0x7401833c 2621442 root 600 4 0
key shmid owner perms bytes nattch status
0x7401833d 2654208 root 600 4 0
0x00000000 3145729 root 600 4194304 9 dest
0x7401833c 2621442 root 600 4 0
0xd201012b 3080195 root 600 1720 2
```
### 相关命令
* `ipcrm`: 删除 IPC 资源
* `ipcmk`: 创建 IPC 资源