⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proc.txt

📁 linux 内核源代码
💻 TXT
📖 第 1 页 / 共 5 页
字号:
The location  where  the  modprobe  binary  is  located.  The kernel uses thisprogram to load modules on demand.unknown_nmi_panic-----------------The value in this file affects behavior of handling NMI. When the value isnon-zero, unknown NMI is trapped and then panic occurs. At that time, kerneldebugging information is displayed on console.NMI switch that most IA32 servers have fires unknown NMI up, for example.If a system hangs up, try pressing the NMI switch.nmi_watchdog------------Enables/Disables the NMI watchdog on x86 systems.  When the value is non-zerothe NMI watchdog is enabled and will continuously test all online cpus todetermine whether or not they are still functioning properly.Because the NMI watchdog shares registers with oprofile, by disabling the NMIwatchdog, oprofile may have more registers to utilize.maps_protect------------Enables/Disables the protection of the per-process proc entries "maps" and"smaps".  When enabled, the contents of these files are visible only toreaders that are allowed to ptrace() the given process.2.4 /proc/sys/vm - The virtual memory subsystem-----------------------------------------------The files  in  this directory can be used to tune the operation of the virtualmemory (VM)  subsystem  of  the  Linux  kernel.vfs_cache_pressure------------------Controls the tendency of the kernel to reclaim the memory which is used forcaching of directory and inode objects.At the default value of vfs_cache_pressure=100 the kernel will attempt toreclaim dentries and inodes at a "fair" rate with respect to pagecache andswapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to preferto retain dentry and inode caches.  Increasing vfs_cache_pressure beyond 100causes the kernel to prefer to reclaim dentries and inodes.dirty_background_ratio----------------------Contains, as a percentage of total system memory, the number of pages at whichthe pdflush background writeback daemon will start writing out dirty data.dirty_ratio-----------------Contains, as a percentage of total system memory, the number of pages at whicha process which is generating disk writes will itself start writing out dirtydata.dirty_writeback_centisecs-------------------------The pdflush writeback daemons will periodically wake up and write `old' dataout to disk.  This tunable expresses the interval between those wakeups, in100'ths of a second.Setting this to zero disables periodic writeback altogether.dirty_expire_centisecs----------------------This tunable is used to define when dirty data is old enough to be eligiblefor writeout by the pdflush daemons.  It is expressed in 100'ths of a second. Data which has been dirty in-memory for longer than this interval will bewritten out next time a pdflush daemon wakes up.legacy_va_layout----------------If non-zero, this sysctl disables the new 32-bit mmap mmap layout - the kernelwill use the legacy (2.4) layout for all processes.lower_zone_protection---------------------For some specialised workloads on highmem machines it is dangerous forthe kernel to allow process memory to be allocated from the "lowmem"zone.  This is because that memory could then be pinned via the mlock()system call, or by unavailability of swapspace.And on large highmem machines this lack of reclaimable lowmem memorycan be fatal.So the Linux page allocator has a mechanism which prevents allocationswhich _could_ use highmem from using too much lowmem.  This means thata certain amount of lowmem is defended from the possibility of beingcaptured into pinned user memory.(The same argument applies to the old 16 megabyte ISA DMA region.  Thismechanism will also defend that region from allocations which could usehighmem or lowmem).The `lower_zone_protection' tunable determines how aggressive the kernel isin defending these lower zones.  The default value is zero - noprotection at all.If you have a machine which uses highmem or ISA DMA and yourapplications are using mlock(), or if you are running with no swap thenyou probably should increase the lower_zone_protection setting.The units of this tunable are fairly vague.  It is approximately equalto "megabytes," so setting lower_zone_protection=100 will protect around 100megabytes of the lowmem zone from user allocations.  It will also makethose 100 megabytes unavailable for use by applications and bypagecache, so there is a cost.The effects of this tunable may be observed by monitoring/proc/meminfo:LowFree.  Write a single huge file and observe the pointat which LowFree ceases to fall.A reasonable value for lower_zone_protection is 100.page-cluster------------page-cluster controls the number of pages which are written to swap ina single attempt.  The swap I/O size.It is a logarithmic value - setting it to zero means "1 page", settingit to 1 means "2 pages", setting it to 2 means "4 pages", etc.The default value is three (eight pages at a time).  There may be somesmall benefits in tuning this to a different value if your workload isswap-intensive.overcommit_memory-----------------Controls overcommit of system memory, possibly allowing processesto allocate (but not use) more memory than is actually available.0	-	Heuristic overcommit handling. Obvious overcommits of		address space are refused. Used for a typical system. It		ensures a seriously wild allocation fails while allowing		overcommit to reduce swap usage.  root is allowed to		allocate slightly more memory in this mode. This is the		default.1	-	Always overcommit. Appropriate for some scientific		applications.2	-	Don't overcommit. The total address space commit		for the system is not permitted to exceed swap plus a		configurable percentage (default is 50) of physical RAM.		Depending on the percentage you use, in most situations		this means a process will not be killed while attempting		to use already-allocated memory but will receive errors		on memory allocation as	appropriate.overcommit_ratio----------------Percentage of physical memory size to include in overcommit calculations(see above.)Memory allocation limit = swapspace + physmem * (overcommit_ratio / 100)	swapspace = total size of all swap areas	physmem = size of physical memory in systemnr_hugepages and hugetlb_shm_group----------------------------------nr_hugepages configures number of hugetlb page reserved for the system.hugetlb_shm_group contains group id that is allowed to create SysV sharedmemory segment using hugetlb page.hugepages_treat_as_movable--------------------------This parameter is only useful when kernelcore= is specified at boot time tocreate ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pagesare not movable so are not normally allocated from ZONE_MOVABLE. A non-zerovalue written to hugepages_treat_as_movable allows huge pages to be allocatedfrom ZONE_MOVABLE.Once enabled, the ZONE_MOVABLE is treated as an area of memory the hugepages pool can easily grow or shrink within. Assuming that applications arenot running that mlock() a lot of memory, it is likely the huge pages poolcan grow to the size of ZONE_MOVABLE by repeatedly entering the desired valueinto nr_hugepages and triggering page reclaim.laptop_mode-----------laptop_mode is a knob that controls "laptop mode". All the things that arecontrolled by this knob are discussed in Documentation/laptop-mode.txt.block_dump----------block_dump enables block I/O debugging when set to a nonzero value. Moreinformation on block I/O debugging is in Documentation/laptop-mode.txt.swap_token_timeout------------------This file contains valid hold time of swap out protection token. The LinuxVM has token based thrashing control mechanism and uses the token to preventunnecessary page faults in thrashing situation. The unit of the value issecond. The value would be useful to tune thrashing behavior.drop_caches-----------Writing to this will cause the kernel to drop clean caches, dentries andinodes from memory, causing that memory to become free.To free pagecache:	echo 1 > /proc/sys/vm/drop_cachesTo free dentries and inodes:	echo 2 > /proc/sys/vm/drop_cachesTo free pagecache, dentries and inodes:	echo 3 > /proc/sys/vm/drop_cachesAs this is a non-destructive operation and dirty objects are not freeable, theuser should run `sync' first.2.5 /proc/sys/dev - Device specific parameters----------------------------------------------Currently there is only support for CDROM drives, and for those, there is onlyone read-only  file containing information about the CD-ROM drives attached tothe system:  >cat /proc/sys/dev/cdrom/info   CD-ROM information, Id: cdrom.c 2.55 1999/04/25      drive name:             sr0     hdb   drive speed:            32      40   drive # of slots:       1       0   Can close tray:         1       1   Can open tray:          1       1   Can lock tray:          1       1   Can change speed:       1       1   Can select disk:        0       1   Can read multisession:  1       1   Can read MCN:           1       1   Reports media changed:  1       1   Can play audio:         1       1 You see two drives, sr0 and hdb, along with a list of their features.2.6 /proc/sys/sunrpc - Remote procedure calls---------------------------------------------This directory  contains four files, which enable or disable debugging for theRPC functions NFS, NFS-daemon, RPC and NLM. The default values are 0. They canbe set to one to turn debugging on. (The default value is 0 for each)2.7 /proc/sys/net - Networking stuff------------------------------------The interface  to  the  networking  parts  of  the  kernel  is  located  in/proc/sys/net. Table  2-3  shows all possible subdirectories. You may see onlysome of them, depending on your kernel's configuration.Table 2-3: Subdirectories in /proc/sys/net .............................................................................. Directory Content             Directory  Content             core      General parameter   appletalk  Appletalk protocol  unix      Unix domain sockets netrom     NET/ROM             802       E802 protocol       ax25       AX25                ethernet  Ethernet protocol   rose       X.25 PLP layer      ipv4      IP version 4        x25        X.25 protocol       ipx       IPX                 token-ring IBM token ring      bridge    Bridging            decnet     DEC net             ipv6      IP version 6                   ..............................................................................We will  concentrate  on IP networking here. Since AX15, X.25, and DEC Net areonly minor players in the Linux world, we'll skip them in this chapter. You'llfind some  short  info on Appletalk and IPX further on in this chapter. Reviewthe online  documentation  and the kernel source to get a detailed view of theparameters for  those  protocols.  In  this  section  we'll  discuss  thesubdirectories printed  in  bold letters in the table above. As default valuesare suitable for most needs, there is no need to change these values./proc/sys/net/core - Network core options-----------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -