ulimit -a /proc/sys/fs/file-nr 数字解析 - aobai219的专栏 - CSDN博客
来源:百度文库 编辑:神马文学网 时间:2024/04/29 01:27:58
file-nr:
Historically, the three values in file-nr denoted the number ofallocated file handles, the number of allocated but unused filehandles, and the maximum number of file handles. Linux 2.6 alwaysreports 0 as the number of free file handles – this is not an error, itjust means that the number of allocated file handles exactly matchesthe number of used file handles.
ulimit -c : 该结果中nofile是当前程序file handler资源限制 ,默认一般为1024
对普通用户是不能够超过这个值的(1024) 但是对超级用户是可以超过这个值的。
file-max : 文件系统最大file handler 数目
/proc/pid/fd/ 目录下面详细显示了pid进程所占用的file handler ,当然一般file handler 太大都是因为socket忘记关闭导致。
综合以上分析, 也就会出现 在一个程序中, socket 资源被占用完,同时, 其他程序能够正常的运行 。 这是因为对每个程序都有1024 个file handler的限制, 同时,所有程序的总和用file-max 现在, 所以, 一个程序socket 资源用完了一般不影响其他的程序,但是当这样的程序太多了导致超过文件系统规定的最大数目(file-max) , 其他的程序当然就会受影响了
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/aobai219/archive/2010/09/07/5868640.aspx
Historically, the three values in file-nr denoted the number ofallocated file handles, the number of allocated but unused filehandles, and the maximum number of file handles. Linux 2.6 alwaysreports 0 as the number of free file handles – this is not an error, itjust means that the number of allocated file handles exactly matchesthe number of used file handles.
ulimit -c : 该结果中nofile是当前程序file handler资源限制 ,默认一般为1024
对普通用户是不能够超过这个值的(1024) 但是对超级用户是可以超过这个值的。
file-max : 文件系统最大file handler 数目
/proc/pid/fd/ 目录下面详细显示了pid进程所占用的file handler ,当然一般file handler 太大都是因为socket忘记关闭导致。
综合以上分析, 也就会出现 在一个程序中, socket 资源被占用完,同时, 其他程序能够正常的运行 。 这是因为对每个程序都有1024 个file handler的限制, 同时,所有程序的总和用file-max 现在, 所以, 一个程序socket 资源用完了一般不影响其他的程序,但是当这样的程序太多了导致超过文件系统规定的最大数目(file-max) , 其他的程序当然就会受影响了
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/aobai219/archive/2010/09/07/5868640.aspx
ulimit -a /proc/sys/fs/file-nr 数字解析 - aobai219的专栏 - CSDN博客
英语数字表达方式大全 - Jenhy的专栏 - CSDN博客
英语数字表达方式大全 - Jenhy的专栏 - CSDN博客
MP3文件格式解析 - 李世平的专栏 - CSDN博客
MP3文件格式解析 - 李世平的专栏 - CSDN博客
dlopen dlsym dlclose解析 - yujixi123的专栏 - CSDN博客
baozhengw的专栏 - CSDN博客
漫谈.NET开发中的字符串编码 - bitfan(数字世界一凡人)的专栏 - CSDN博客
详细解析Java中抽象类和接口的区别 - fpy_061625的专栏 - CSDN博客
几种Linux 的开关机状态解析 - winnie的专栏 - CSDN博客
AGPS简介 - kv110的专栏 - CSDN博客
OpenMAX简介 - shenbin1430的专栏 - CSDN博客
Android flinger - simmer_ken的专栏 - CSDN博客
windows 命令 - orangeman1982112的专栏 - CSDN博客
JNDI概述 - tanghongru1983的专栏 - CSDN博客
指针 - syhhl007的专栏 - CSDN博客
变量命名 - yszwn的专栏 - CSDN博客
什么是PLL - JasonCao的专栏 - CSDN博客
VC积累 - cherryt的专栏 - CSDN博客
fms技术 - wanglilin2000的专栏 - CSDN博客
关于numeric_limits - qianlong88的专栏 - CSDN博客
gcc - sportmanmanman44的专栏 - CSDN博客
mtk中的一些函数作用 - fs'Idea - CSDN博客
STL之vector的使用 - wxdvc的专栏 - CSDN博客