This subdirectory contains specific file system, file handle, inode, dentry and quota information.

1,/proc/sys/fs/aio-max-nr

aio-max-nr allows you to change the maximum value/proc/sys/fs/aio-nr can grow to.

2,/proc/sys/fs/aio-nr

aio-nr shows the current system-wide number of asynchronous io requests.

3,/proc/sys/fs/bio_netoops

4,/proc/sys/fs/dentry-state

tatus of the directory cache. Since directory entries are dynamically allocated and deallocated, this file indicates the current status. It holds six values of which only the first three are used:

  • nr_dentry - number of dentries currently allocated
  • nr_unused - nuber of unused dentries
  • age_limit - seconds after the entry may be reclaimed, when memory is short

Last three values are not used and are always zero.

5,/proc/sys/fs/dir-notify-enable

This file controls dnotify, a directory notification mechanism, and will not appear if dnotify support is compiled out. It was introduced with inotify in case some people want to disable dnotify support at runtime.

There are two possible values:

  • 1 - dnotify is enabled (default)
  • 0 - dnotify is disabled

6,/proc/sys/fs/file-max

The kernel allocates file handles dynamically, but doesn't free them again at this time.

The value in file-max denotes the maximum number of file handles that the Linux kernel will allocate. When you get a lot of error messages about running out of file handles, you might want to raise this limit. The default value is 10% of RAM in kilobytes.

7,/proc/sys/fs/file-nr

Historically, the three values in file-nr denoted the number of allocated file handles, the number of allocated but unused file handles, and the maximum number of file handles. Linux 2.6 always reports 0 as the number of free file handles - this is not an error, it just means that the number of allocated file handles exactly matches the number of used file handles.

8,/proc/sys/fs/inode-nr

The file inode-nr contains the first two items from/proc/sys/fs/inode-state.

9,/proc/sys/fs/inode-state

inode-state contains two actual numbers and five dummy values. The numbers are:

  • nr_inodes - denotes the number of inodes the system has allocated. This number will grow and shrink dynamically.
  • nr_free_inodes - represents the number of free inodes. Ie. the number of inuse inodes is (nr_inodes - nr_free_inodes).

10,/proc/sys/fs/lease-break-time

This file specifies the grace period (in seconds) that the kernel grants to a process holding a file lease after it has sent a signal to that process notifying it that another process is waiting to open the file. If the lease holder does not remove or downgrade the lease within this grace period, the kernel forcibly breaks the lease.

11,/proc/sys/fs/leases-enable

This file can be used to enable or disable file leases on a system-wide basis. If this file contains the value 0, leases are disabled. A non-zero value enables leases.

12,/proc/sys/fs/nr_open

This denotes the maximum number of file-handles a process can allocate. Default value is 1024*1024 (1048576) which should be enough for most machines. Actual limit depends on RLIMIT_NOFILE resource limit.

13,/proc/sys/fs/overflowgid

Some filesystems only support 16-bit GIDs, although in Linux GIDs are 32 bits. When one of these filesystems is mounted with writes enabled, any GID that would exceed 65535 is translated to a fixed value before being written to disk.

This sysctl allows you to change the value of the fixed GID. The default is 65534.

14,/proc/sys/fs/overflowuid

Some filesystems only support 16-bit UIDs, although in Linux UIDs are 32 bits. When one of these filesystems is mounted with writes enabled, any UID that would exceed 65535 is translated to a fixed value before being written to disk.

This sysctl allows you to change the value of the fixed UID. The default is 65534.

15,/proc/sys/fs/suid_dumpable

The value in this file determines whether core dump files are produced for set-user-ID or otherwise protected/tainted binaries. Three different integer values can be specified:

  • 0 (default) - This provides the traditional behaviour. A core dump will not be produced for a process which has changed credentials (by calling seteuid(2), setgid(2), or similar, or by executing a set-user-ID or set-group-ID program) or whose binary does not have read permission enabled.
  • 1 ("debug") - All processes dump core when possible. The core dump is owned by the file system user ID of the dumping process and no security is applied. This is intended for system debugging situations only. Ptrace is unchecked.
  • 2 ("suidsafe") - Any binary which normally would not be dumped (see "0" above) is dumped readable by root only. This allows the user to remove the core dump file but not to read it. For security reasons core dumps in this mode will not overwrite one another or other files. This mode is appropriate when administrators are attempting to debug problems in a normal environment.

16,/proc/sys/fs/inotify

The following interfaces can be used to limit the amount of kernel memory consumed by the inotify file system event-monitoring mechanism.

16.1 /proc/sys/fs/inotify/max_queued_events

The value in this file is used when an application calls inotify_init(2) to set an upper limit on the number of events that can be queued to the corresponding inotify instance. Events in excess of this limit are dropped, but an IN_Q_OVERFLOW event is always generated.

16.2 /proc/sys/fs/inotify/max_user_instances

This specifies an upper limit on the number of inotify instances that can be created per real user ID.

16.3 /proc/sys/fs/inotify/max_user_watches

This specifies a limit on the number of watches that can be associated with each inotify instance.

17,/proc/sys/fs/epoll

Used to limit the amount of kernel memory consumed by epoll

17.1 /proc/sys/fs/epoll/max_user_watches

This specifies a limit on the total number of file descriptors that a user can register across all epoll instances on the system. The limit is per real user ID. Each registered file descriptor costs roughly 90 bytes on a 32-bit kernel, and roughly 160 bytes on a 64-bit kernel. Currently, the default value for max_user_watches is 1/25 (4%) of the available low memory, divided by the registration cost in bytes.

18,/proc/sys/fs/mqueue/

This subdirectory contains files that are used for controlling the resources used by POSIX message queues.

    18.1 /proc/sys/fs/mqueue/msg_default

18.2 /proc/sys/fs/mqueue/msgsize_default

18.3 /proc/sys/fs/mqueue/msg_max

msg_max is a read/write file for setting/getting the maximum number of messages in a queue value. In fact it is the limiting value for another (user) limit which is set in mq_open invocation. This attribute of a queue must be less or equal than msg_max.

18.4 /proc/sys/fs/mqueue/msgsize_max

msgsize_max is a read/write file for setting/getting the maximum message size value (it is every message queue's attribute set during its creation).

18.5 /proc/sys/fs/mqueue/queues_max

queues_max is a read/write file for setting/getting the maximum number of message queues allowed on the system.

stuff in /proc/sys/fs/的更多相关文章

  1. linux /proc/sys/fs/file-nr /proc/sys/fs/file-max /etc/security/limits.conf 三者的关联

    ulimit -n 对应 /etc/security/limits.conf 文件设置 问题: Can’t open so many files 对于linux运维的同学们,相信都遇到过这个问题. 在 ...

  2. 设置Linux打开文件句柄/proc/sys/fs/file-max和ulimit -n的区别

    max-file 表示系统级别的能够打开的文件句柄的数量.是对整个系统的限制,并不是针对用户的. ulimit -n 控制进程级别能够打开的文件句柄的数量.提供对shell及其启动的进程的可用文件句柄 ...

  3. /proc/sys/fs/file-max

    Linux的/proc/sys/fs/file-max决定了当前内核可以打开的最大的文件句柄数. 查看当前的值: cat /proc/sys/fs/file-max 这个值在kernel的文档里是这样 ...

  4. Linux打开文件句柄/proc/sys/fs/file-max和ulimit -n的区别

    max-file 表示系统级别的能够打开的文件句柄的数量.是对整个系统的限制,并不是针对用户的.ulimit -n 控制进程级别能够打开的文件句柄的数量.提供对shell及其启动的进程的可用文件句柄的 ...

  5. Difference between ulimit, lsof, cat /proc/sys/fs/file-max

    https://unix.stackexchange.com/questions/476351/difference-between-ulimit-lsof-cat-proc-sys-fs-file- ...

  6. Linux TCP/IP调优参数 /proc/sys/net/目录

    所有的TCP/IP调优参数都位于/proc/sys/net/目录. 例如, 下面是最重要的一些调优参数,后面是它们的含义: /proc/sys/net/core/rmem_default " ...

  7. /proc/sys目录下各文件参数说明

    linux 其他知识目录 原文链接:https://blog.csdn.net/hshl1214/article/details/4596583 一.前言本文档针对OOP8生产环境,具体优化策略需要根 ...

  8. [转帖]/proc/sys目录下各文件参数说明

    /proc/sys目录下各文件参数说明 https://blog.csdn.net/luteresa/article/details/68061881   一.前言 本文档针对OOP8生产环境,具体优 ...

  9. /proc/sys/kernel/sysrq /proc/sysrq-trigger----强制重启/触发器

    LINUX远程强制重启/proc/sys/kernel/sysrq /proc/sysrq-trigger----触发器 ttp://blog.csdn.net/beckdon/article/det ...

随机推荐

  1. 推荐朋友 - LintCode

    拼多多笔试第三题 除了题目具体方法值得注意外,数据的输入格外注意 题目 描述 给n个人的朋友名单,告诉你user,请找出user最可能认识的人.(他和user有最多的共同好友且他不是user的朋友) ...

  2. Hadoop家族学习路线、实践案例

    作者:Han Hsiao链接:https://www.zhihu.com/question/19795366/answer/24524910来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商 ...

  3. Ios开发之Category

    Category是在不改变已存在类的情况下,对其添加方法来达到对类进行功能扩展的目的. 对类功能进行拓展的时候,我们会有多种方式,比如说可以通过继承也可以进行功能扩展,但是在Category和继承上我 ...

  4. Python爬虫实例(三)代理的使用

    一些网站会有相应的反爬虫措施,例如很多网站会检测某一段时间某个IP的访问次数,如果访问频率太快以至于看起来不像正常访客,它可能就会会禁止这个IP的访问.所以我们需要设置一些代理服务器,每隔一段时间换一 ...

  5. 移动端 h5开发相关内容总结——CSS篇

    1.移动端开发视窗体的加入 h5端开发以下这段话是必须配置的 <meta name="viewport" content="width=device-width, ...

  6. LAMP架构之PHP-FPM 服务器

    PHP简介 安装PHP 解决依赖关系 # 请配置好yum源(系统安装源及epel源)后执行如下命令: yum -y groupinstall "Desktop Platform Develo ...

  7. JS构造函数内的方法与构造函数prototype属性上方法的对比

    本文的目的是让大家理解什么情况下把函数的方法写在JavaScript的构造函数上,什么时候把方法写在函数的 prototype 属性上;以及这样做的好处. 为了阅读方便,我们约定一下:把方法写在构造函 ...

  8. 虚拟机Linux下解决ping时出现 unknown host问题

    在虚拟机中使用CentOS6.5时,ping www.baidu.com出现报错信息:“ping: unknown hostwww.baidu.com”,虚拟机和物理机网络连接是NAT方式,物理机访问 ...

  9. URAL 1224. Spiral (规律)

    1224. Spiral Time limit: 1.0 second Memory limit: 64 MB A brand new sapper robot is able to neutrali ...

  10. Jenkins Xcode 证书设置错误 Code Sign error: No matching codesigning identity found: No codesigning identities

    Jenkins 集成Xcode 项目的时候在证书上遇到了问题.实际上如果在本地的话.只要Xcode工程里选择了项目就不需要重新设置证书了.jenkins会自动找到这个证书,只要在build setti ...