Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1743103
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 3006
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

分类: LINUX

2015-06-03 16:06:39

man proc 可以看到下面的解释:
/proc/sys/fs/file-nr
              This (read-only) file contains three numbers: the number of allocated file handles (i.e.,  the  number  of  files  presently
              opened); the number of free file handles; and the maximum number of file handles (i.e., the same value as /proc/sys/fs/file-
              max).  If the number of allocated file handles is close to the maximum, you should consider increasing the maximum.   Before
              Linux 2.6, the kernel allocated file handles dynamically, but it didn't free them again.  Instead the free file handles were
              kept in a list for reallocation; the "free file handles" value indicates the size of that list.  A large number of free file
              handles indicates that there was a past peak in the usage of open file handles.  Since Linux 2.6, the kernel does deallocate
              freed file handles, and the "free file handles" value is always zero.

sysctl fs.file-nr
sysctl fs.file-max
可以看到同样的file handles数目,也可以通过sysctl 修改。

这里看到的是全局的,如果是单个用户的,则可以通过ulimit -a 查看。
ulimit -Hn (hard limit)
ulimit -Sn(soft limit)

阅读(1231) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~