提交 e4de3207 编写于 作者: A amyMaYun 提交者: Gitee

描述更新

上级 9230abb3
......@@ -7,23 +7,23 @@
## 参数说明<a name="zh-cn_topic_0182200840_section14494191892512"></a>
<a name="zh-cn_topic_0182200840_table1869210387418"></a>
<table><thead align="left"><tr id="zh-cn_topic_0182200840_row1569373816419"><th class="cellrowborder" valign="top" width="16.77%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0182200840_p106936387415"><a name="zh-cn_topic_0182200840_p106936387415"></a><a name="zh-cn_topic_0182200840_p106936387415"></a>命令</p>
</th>
<th class="cellrowborder" valign="top" width="38.47%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0182200840_p15693173814112"><a name="zh-cn_topic_0182200840_p15693173814112"></a><a name="zh-cn_topic_0182200840_p15693173814112"></a>参数</p>
</th>
<th class="cellrowborder" valign="top" width="44.76%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0182200840_p1626682291619"><a name="zh-cn_topic_0182200840_p1626682291619"></a><a name="zh-cn_topic_0182200840_p1626682291619"></a>参数指定值说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0182200840_row12693163810415"><td class="cellrowborder" valign="top" width="16.77%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0182200840_p66931838134110"><a name="zh-cn_topic_0182200840_p66931838134110"></a><a name="zh-cn_topic_0182200840_p66931838134110"></a>lcrc create/run</p>
</td>
<td class="cellrowborder" valign="top" width="38.47%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0182200840_p08101647154218"><a name="zh-cn_topic_0182200840_p08101647154218"></a><a name="zh-cn_topic_0182200840_p08101647154218"></a>--files-limit</p>
<p id="zh-cn_topic_0182200840_p5810124718426"><a name="zh-cn_topic_0182200840_p5810124718426"></a><a name="zh-cn_topic_0182200840_p5810124718426"></a></p>
</td>
<td class="cellrowborder" valign="top" width="44.76%" headers="mcps1.1.4.1.3 "><a name="zh-cn_topic_0182200840_ul2964134315162"></a><a name="zh-cn_topic_0182200840_ul2964134315162"></a><ul id="zh-cn_topic_0182200840_ul2964134315162"><li>整数值,不能为负数。</li><li>指定为0表示不受限制,最大值限制由当前内核files cgroup决定。</li></ul>
</td>
</tr>
</tbody>
<table><thead align="left"><tr id="zh-cn_topic_0182200840_row1569373816419"><th class="cellrowborder" valign="top" width="16.77%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0182200840_p106936387415"><a name="zh-cn_topic_0182200840_p106936387415"></a><a name="zh-cn_topic_0182200840_p106936387415"></a>命令</p>
</th>
<th class="cellrowborder" valign="top" width="38.47%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0182200840_p15693173814112"><a name="zh-cn_topic_0182200840_p15693173814112"></a><a name="zh-cn_topic_0182200840_p15693173814112"></a>参数</p>
</th>
<th class="cellrowborder" valign="top" width="44.76%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0182200840_p1626682291619"><a name="zh-cn_topic_0182200840_p1626682291619"></a><a name="zh-cn_topic_0182200840_p1626682291619"></a>参数指定值说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0182200840_row12693163810415"><td class="cellrowborder" valign="top" width="16.77%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0182200840_p66931838134110"><a name="zh-cn_topic_0182200840_p66931838134110"></a><a name="zh-cn_topic_0182200840_p66931838134110"></a>lcrc create/run</p>
</td>
<td class="cellrowborder" valign="top" width="38.47%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0182200840_p08101647154218"><a name="zh-cn_topic_0182200840_p08101647154218"></a><a name="zh-cn_topic_0182200840_p08101647154218"></a>--files-limit</p>
<p id="zh-cn_topic_0182200840_p5810124718426"><a name="zh-cn_topic_0182200840_p5810124718426"></a><a name="zh-cn_topic_0182200840_p5810124718426"></a></p>
</td>
<td class="cellrowborder" valign="top" width="44.76%" headers="mcps1.1.4.1.3 "><a name="zh-cn_topic_0182200840_ul2964134315162"></a><a name="zh-cn_topic_0182200840_ul2964134315162"></a><ul id="zh-cn_topic_0182200840_ul2964134315162"><li>整数值,不能为负数。</li><li>指定为0表示不受限制,最大值限制由当前内核files cgroup决定。</li></ul>
</td>
</tr>
</tbody>
</table>
## 约束限制<a name="zh-cn_topic_0182200840_section11526131712"></a>
......@@ -45,14 +45,12 @@
容器启动指定--files-limit参数,并检查files.limit参数是否成功写入:
```
[root@localhost ~]# lcrc run -tid --files-limit 1024 --system-container --external-rootfs /tmp/root-fs empty init 01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d
[root@localhost ~]# lcrc run -tid --files-limit 1024 --system-container --external-rootfs /tmp/root-fs empty init
01e82fcf97d4937aa1d96eb8067f9f23e4707b92de152328c3fc0ecb5f64e91d
[root@localhost ~]# lcrc exec -it 01e82fcf97d4 bash
[root@localhost ~]# cat /sys/fs/cgroup/files/files.limit
1024
[root@01e82fcf97d4 /]# ./nofile 1026
pid [18] has used [4] fds, limit is [1024]
test limit for [1026]
file limit test pass, new allow 1020 limit 1020
```
可以看出,容器内文件句柄数被成功限制。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册