linux资源限制

centos7 资源限制
cat /etc/security/limits.conf

*               soft    core           unlimited
*               hard    core           unlimited
*               soft    nofile         655350      #表示任何一个用户可以打开的最大的文件描述符数量
*               hard    nofile         655350
*               soft    nproc          655350      #表示任何一个用户可以打开的最大的进程数
*               hard    nproc          655350
*               hard    memlock        32000
*               soft    memlock        32000
*               hard    msgqueue       8192000
*               soft    msgqueue       8192000

#@student        hard    nofile          65535       #student组中的任何人最多能打开文件描述符数量是65535,并且会在打开65000个时发出警告
#@student        soft    nofile          65000
#@student        hard    nproc           50             #student组中的任何人不能拥有超过50个进程,并且会在拥有30个进程时发出警告
#@student        soft    nproc           30

在Ubuntu下 不能用* ,代表所有用户,只能写具体用户,centos可以用*

 

posted @ 2021-12-20 00:00  不会跳舞的胖子  阅读(105)  评论(0编辑  收藏  举报