码迷,mamicode.com
首页 > 其他好文 > 详细

/proc/sys/fs 内容解析

时间:2016-08-06 19:04:03      阅读:1302      评论:0      收藏:0      [点我收藏+]

标签:

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

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 

 

   16.3 /proc/sys/fs/inotify/max_user_watches

 

/proc/sys/fs 内容解析

标签:

原文地址:http://www.cnblogs.com/cobbliu/p/5744656.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!