aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sysctl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /Documentation/sysctl
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'Documentation/sysctl')
-rw-r--r--Documentation/sysctl/README75
-rw-r--r--Documentation/sysctl/abi.txt54
-rw-r--r--Documentation/sysctl/fs.txt150
-rw-r--r--Documentation/sysctl/kernel.txt314
-rw-r--r--Documentation/sysctl/sunrpc.txt20
-rw-r--r--Documentation/sysctl/vm.txt104
6 files changed, 717 insertions, 0 deletions
diff --git a/Documentation/sysctl/README b/Documentation/sysctl/README
new file mode 100644
index 000000000000..8c3306e01d52
--- /dev/null
+++ b/Documentation/sysctl/README
@@ -0,0 +1,75 @@
1Documentation for /proc/sys/ kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4'Why', I hear you ask, 'would anyone even _want_ documentation
5for them sysctl files? If anybody really needs it, it's all in
6the source...'
7
8Well, this documentation is written because some people either
9don't know they need to tweak something, or because they don't
10have the time or knowledge to read the source code.
11
12Furthermore, the programmers who built sysctl have built it to
13be actually used, not just for the fun of programming it :-)
14
15==============================================================
16
17Legal blurb:
18
19As usual, there are two main things to consider:
201. you get what you pay for
212. it's free
22
23The consequences are that I won't guarantee the correctness of
24this document, and if you come to me complaining about how you
25screwed up your system because of wrong documentation, I won't
26feel sorry for you. I might even laugh at you...
27
28But of course, if you _do_ manage to screw up your system using
29only the sysctl options used in this file, I'd like to hear of
30it. Not only to have a great laugh, but also to make sure that
31you're the last RTFMing person to screw up.
32
33In short, e-mail your suggestions, corrections and / or horror
34stories to: <riel@nl.linux.org>
35
36Rik van Riel.
37
38==============================================================
39
40Introduction:
41
42Sysctl is a means of configuring certain aspects of the kernel
43at run-time, and the /proc/sys/ directory is there so that you
44don't even need special tools to do it!
45In fact, there are only four things needed to use these config
46facilities:
47- a running Linux system
48- root access
49- common sense (this is especially hard to come by these days)
50- knowledge of what all those values mean
51
52As a quick 'ls /proc/sys' will show, the directory consists of
53several (arch-dependent?) subdirs. Each subdir is mainly about
54one part of the kernel, so you can do configuration on a piece
55by piece basis, or just some 'thematic frobbing'.
56
57The subdirs are about:
58abi/ execution domains & personalities
59debug/ <empty>
60dev/ device specific information (eg dev/cdrom/info)
61fs/ specific filesystems
62 filehandle, inode, dentry and quota tuning
63 binfmt_misc <Documentation/binfmt_misc.txt>
64kernel/ global kernel info / tuning
65 miscellaneous stuff
66net/ networking stuff, for documentation look in:
67 <Documentation/networking/>
68proc/ <empty>
69sunrpc/ SUN Remote Procedure Call (NFS)
70vm/ memory management tuning
71 buffer and cache management
72
73These are the subdirs I have on my system. There might be more
74or other subdirs in another setup. If you see another dir, I'd
75really like to hear about it :-)
diff --git a/Documentation/sysctl/abi.txt b/Documentation/sysctl/abi.txt
new file mode 100644
index 000000000000..63f4ebcf652c
--- /dev/null
+++ b/Documentation/sysctl/abi.txt
@@ -0,0 +1,54 @@
1Documentation for /proc/sys/abi/* kernel version 2.6.0.test2
2 (c) 2003, Fabian Frederick <ffrederick@users.sourceforge.net>
3
4For general info : README.
5
6==============================================================
7
8This path is binary emulation relevant aka personality types aka abi.
9When a process is executed, it's linked to an exec_domain whose
10personality is defined using values available from /proc/sys/abi.
11You can find further details about abi in include/linux/personality.h.
12
13Here are the files featuring in 2.6 kernel :
14
15- defhandler_coff
16- defhandler_elf
17- defhandler_lcall7
18- defhandler_libcso
19- fake_utsname
20- trace
21
22===========================================================
23defhandler_coff:
24defined value :
25PER_SCOSVR3
260x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE
27
28===========================================================
29defhandler_elf:
30defined value :
31PER_LINUX
320
33
34===========================================================
35defhandler_lcall7:
36defined value :
37PER_SVR4
380x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
39
40===========================================================
41defhandler_libsco:
42defined value:
43PER_SVR4
440x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO,
45
46===========================================================
47fake_utsname:
48Unused
49
50===========================================================
51trace:
52Unused
53
54===========================================================
diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
new file mode 100644
index 000000000000..0b62c62142cf
--- /dev/null
+++ b/Documentation/sysctl/fs.txt
@@ -0,0 +1,150 @@
1Documentation for /proc/sys/fs/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains documentation for the sysctl files in
9/proc/sys/fs/ and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to tune and monitor
12miscellaneous and general things in the operation of the Linux
13kernel. Since some of the files _can_ be used to screw up your
14system, it is advisable to read both documentation and source
15before actually making adjustments.
16
17Currently, these files are in /proc/sys/fs:
18- dentry-state
19- dquot-max
20- dquot-nr
21- file-max
22- file-nr
23- inode-max
24- inode-nr
25- inode-state
26- overflowuid
27- overflowgid
28- super-max
29- super-nr
30
31Documentation for the files in /proc/sys/fs/binfmt_misc is
32in Documentation/binfmt_misc.txt.
33
34==============================================================
35
36dentry-state:
37
38From linux/fs/dentry.c:
39--------------------------------------------------------------
40struct {
41 int nr_dentry;
42 int nr_unused;
43 int age_limit; /* age in seconds */
44 int want_pages; /* pages requested by system */
45 int dummy[2];
46} dentry_stat = {0, 0, 45, 0,};
47--------------------------------------------------------------
48
49Dentries are dynamically allocated and deallocated, and
50nr_dentry seems to be 0 all the time. Hence it's safe to
51assume that only nr_unused, age_limit and want_pages are
52used. Nr_unused seems to be exactly what its name says.
53Age_limit is the age in seconds after which dcache entries
54can be reclaimed when memory is short and want_pages is
55nonzero when shrink_dcache_pages() has been called and the
56dcache isn't pruned yet.
57
58==============================================================
59
60dquot-max & dquot-nr:
61
62The file dquot-max shows the maximum number of cached disk
63quota entries.
64
65The file dquot-nr shows the number of allocated disk quota
66entries and the number of free disk quota entries.
67
68If the number of free cached disk quotas is very low and
69you have some awesome number of simultaneous system users,
70you might want to raise the limit.
71
72==============================================================
73
74file-max & file-nr:
75
76The kernel allocates file handles dynamically, but as yet it
77doesn't free them again.
78
79The value in file-max denotes the maximum number of file-
80handles that the Linux kernel will allocate. When you get lots
81of error messages about running out of file handles, you might
82want to increase this limit.
83
84The three values in file-nr denote the number of allocated
85file handles, the number of unused file handles and the maximum
86number of file handles. When the allocated file handles come
87close to the maximum, but the number of unused file handles is
88significantly greater than 0, you've encountered a peak in your
89usage of file handles and you don't need to increase the maximum.
90
91==============================================================
92
93inode-max, inode-nr & inode-state:
94
95As with file handles, the kernel allocates the inode structures
96dynamically, but can't free them yet.
97
98The value in inode-max denotes the maximum number of inode
99handlers. This value should be 3-4 times larger than the value
100in file-max, since stdin, stdout and network sockets also
101need an inode struct to handle them. When you regularly run
102out of inodes, you need to increase this value.
103
104The file inode-nr contains the first two items from
105inode-state, so we'll skip to that file...
106
107Inode-state contains three actual numbers and four dummies.
108The actual numbers are, in order of appearance, nr_inodes,
109nr_free_inodes and preshrink.
110
111Nr_inodes stands for the number of inodes the system has
112allocated, this can be slightly more than inode-max because
113Linux allocates them one pageful at a time.
114
115Nr_free_inodes represents the number of free inodes (?) and
116preshrink is nonzero when the nr_inodes > inode-max and the
117system needs to prune the inode list instead of allocating
118more.
119
120==============================================================
121
122overflowgid & overflowuid:
123
124Some filesystems only support 16-bit UIDs and GIDs, although in Linux
125UIDs and GIDs are 32 bits. When one of these filesystems is mounted
126with writes enabled, any UID or GID that would exceed 65535 is translated
127to a fixed value before being written to disk.
128
129These sysctls allow you to change the value of the fixed UID and GID.
130The default is 65534.
131
132==============================================================
133
134super-max & super-nr:
135
136These numbers control the maximum number of superblocks, and
137thus the maximum number of mounted filesystems the kernel
138can have. You only need to increase super-max if you need to
139mount more filesystems than the current value in super-max
140allows you to.
141
142==============================================================
143
144aio-nr & aio-max-nr:
145
146aio-nr shows the current system-wide number of asynchronous io
147requests. aio-max-nr allows you to change the maximum value
148aio-nr can grow to.
149
150==============================================================
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
new file mode 100644
index 000000000000..35159176997b
--- /dev/null
+++ b/Documentation/sysctl/kernel.txt
@@ -0,0 +1,314 @@
1Documentation for /proc/sys/kernel/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains documentation for the sysctl files in
9/proc/sys/kernel/ and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to tune and monitor
12miscellaneous and general things in the operation of the Linux
13kernel. Since some of the files _can_ be used to screw up your
14system, it is advisable to read both documentation and source
15before actually making adjustments.
16
17Currently, these files might (depending on your configuration)
18show up in /proc/sys/kernel:
19- acct
20- core_pattern
21- core_uses_pid
22- ctrl-alt-del
23- dentry-state
24- domainname
25- hostname
26- hotplug
27- java-appletviewer [ binfmt_java, obsolete ]
28- java-interpreter [ binfmt_java, obsolete ]
29- l2cr [ PPC only ]
30- modprobe ==> Documentation/kmod.txt
31- msgmax
32- msgmnb
33- msgmni
34- osrelease
35- ostype
36- overflowgid
37- overflowuid
38- panic
39- pid_max
40- powersave-nap [ PPC only ]
41- printk
42- real-root-dev ==> Documentation/initrd.txt
43- reboot-cmd [ SPARC only ]
44- rtsig-max
45- rtsig-nr
46- sem
47- sg-big-buff [ generic SCSI device (sg) ]
48- shmall
49- shmmax [ sysv ipc ]
50- shmmni
51- stop-a [ SPARC only ]
52- sysrq ==> Documentation/sysrq.txt
53- tainted
54- threads-max
55- version
56
57==============================================================
58
59acct:
60
61highwater lowwater frequency
62
63If BSD-style process accounting is enabled these values control
64its behaviour. If free space on filesystem where the log lives
65goes below <lowwater>% accounting suspends. If free space gets
66above <highwater>% accounting resumes. <Frequency> determines
67how often do we check the amount of free space (value is in
68seconds). Default:
694 2 30
70That is, suspend accounting if there left <= 2% free; resume it
71if we got >=4%; consider information about amount of free space
72valid for 30 seconds.
73
74==============================================================
75
76core_pattern:
77
78core_pattern is used to specify a core dumpfile pattern name.
79. max length 64 characters; default value is "core"
80. core_pattern is used as a pattern template for the output filename;
81 certain string patterns (beginning with '%') are substituted with
82 their actual values.
83. backward compatibility with core_uses_pid:
84 If core_pattern does not include "%p" (default does not)
85 and core_uses_pid is set, then .PID will be appended to
86 the filename.
87. corename format specifiers:
88 %<NUL> '%' is dropped
89 %% output one '%'
90 %p pid
91 %u uid
92 %g gid
93 %s signal number
94 %t UNIX time of dump
95 %h hostname
96 %e executable filename
97 %<OTHER> both are dropped
98
99==============================================================
100
101core_uses_pid:
102
103The default coredump filename is "core". By setting
104core_uses_pid to 1, the coredump filename becomes core.PID.
105If core_pattern does not include "%p" (default does not)
106and core_uses_pid is set, then .PID will be appended to
107the filename.
108
109==============================================================
110
111ctrl-alt-del:
112
113When the value in this file is 0, ctrl-alt-del is trapped and
114sent to the init(1) program to handle a graceful restart.
115When, however, the value is > 0, Linux's reaction to a Vulcan
116Nerve Pinch (tm) will be an immediate reboot, without even
117syncing its dirty buffers.
118
119Note: when a program (like dosemu) has the keyboard in 'raw'
120mode, the ctrl-alt-del is intercepted by the program before it
121ever reaches the kernel tty layer, and it's up to the program
122to decide what to do with it.
123
124==============================================================
125
126domainname & hostname:
127
128These files can be used to set the NIS/YP domainname and the
129hostname of your box in exactly the same way as the commands
130domainname and hostname, i.e.:
131# echo "darkstar" > /proc/sys/kernel/hostname
132# echo "mydomain" > /proc/sys/kernel/domainname
133has the same effect as
134# hostname "darkstar"
135# domainname "mydomain"
136
137Note, however, that the classic darkstar.frop.org has the
138hostname "darkstar" and DNS (Internet Domain Name Server)
139domainname "frop.org", not to be confused with the NIS (Network
140Information Service) or YP (Yellow Pages) domainname. These two
141domain names are in general different. For a detailed discussion
142see the hostname(1) man page.
143
144==============================================================
145
146hotplug:
147
148Path for the hotplug policy agent.
149Default value is "/sbin/hotplug".
150
151==============================================================
152
153l2cr: (PPC only)
154
155This flag controls the L2 cache of G3 processor boards. If
1560, the cache is disabled. Enabled if nonzero.
157
158==============================================================
159
160osrelease, ostype & version:
161
162# cat osrelease
1632.1.88
164# cat ostype
165Linux
166# cat version
167#5 Wed Feb 25 21:49:24 MET 1998
168
169The files osrelease and ostype should be clear enough. Version
170needs a little more clarification however. The '#5' means that
171this is the fifth kernel built from this source base and the
172date behind it indicates the time the kernel was built.
173The only way to tune these values is to rebuild the kernel :-)
174
175==============================================================
176
177overflowgid & overflowuid:
178
179if your architecture did not always support 32-bit UIDs (i.e. arm, i386,
180m68k, sh, and sparc32), a fixed UID and GID will be returned to
181applications that use the old 16-bit UID/GID system calls, if the actual
182UID or GID would exceed 65535.
183
184These sysctls allow you to change the value of the fixed UID and GID.
185The default is 65534.
186
187==============================================================
188
189panic:
190
191The value in this file represents the number of seconds the
192kernel waits before rebooting on a panic. When you use the
193software watchdog, the recommended setting is 60.
194
195==============================================================
196
197panic_on_oops:
198
199Controls the kernel's behaviour when an oops or BUG is encountered.
200
2010: try to continue operation
202
2031: delay a few seconds (to give klogd time to record the oops output) and
204 then panic. If the `panic' sysctl is also non-zero then the machine will
205 be rebooted.
206
207==============================================================
208
209pid_max:
210
211PID allocation wrap value. When the kenrel's next PID value
212reaches this value, it wraps back to a minimum PID value.
213PIDs of value pid_max or larger are not allocated.
214
215==============================================================
216
217powersave-nap: (PPC only)
218
219If set, Linux-PPC will use the 'nap' mode of powersaving,
220otherwise the 'doze' mode will be used.
221
222==============================================================
223
224printk:
225
226The four values in printk denote: console_loglevel,
227default_message_loglevel, minimum_console_loglevel and
228default_console_loglevel respectively.
229
230These values influence printk() behavior when printing or
231logging error messages. See 'man 2 syslog' for more info on
232the different loglevels.
233
234- console_loglevel: messages with a higher priority than
235 this will be printed to the console
236- default_message_level: messages without an explicit priority
237 will be printed with this priority
238- minimum_console_loglevel: minimum (highest) value to which
239 console_loglevel can be set
240- default_console_loglevel: default value for console_loglevel
241
242==============================================================
243
244printk_ratelimit:
245
246Some warning messages are rate limited. printk_ratelimit specifies
247the minimum length of time between these messages (in jiffies), by
248default we allow one every 5 seconds.
249
250A value of 0 will disable rate limiting.
251
252==============================================================
253
254printk_ratelimit_burst:
255
256While long term we enforce one message per printk_ratelimit
257seconds, we do allow a burst of messages to pass through.
258printk_ratelimit_burst specifies the number of messages we can
259send before ratelimiting kicks in.
260
261==============================================================
262
263reboot-cmd: (Sparc only)
264
265??? This seems to be a way to give an argument to the Sparc
266ROM/Flash boot loader. Maybe to tell it what to do after
267rebooting. ???
268
269==============================================================
270
271rtsig-max & rtsig-nr:
272
273The file rtsig-max can be used to tune the maximum number
274of POSIX realtime (queued) signals that can be outstanding
275in the system.
276
277rtsig-nr shows the number of RT signals currently queued.
278
279==============================================================
280
281sg-big-buff:
282
283This file shows the size of the generic SCSI (sg) buffer.
284You can't tune it just yet, but you could change it on
285compile time by editing include/scsi/sg.h and changing
286the value of SG_BIG_BUFF.
287
288There shouldn't be any reason to change this value. If
289you can come up with one, you probably know what you
290are doing anyway :)
291
292==============================================================
293
294shmmax:
295
296This value can be used to query and set the run time limit
297on the maximum shared memory segment size that can be created.
298Shared memory segments up to 1Gb are now supported in the
299kernel. This value defaults to SHMMAX.
300
301==============================================================
302
303tainted:
304
305Non-zero if the kernel has been tainted. Numeric values, which
306can be ORed together:
307
308 1 - A module with a non-GPL license has been loaded, this
309 includes modules with no license.
310 Set by modutils >= 2.4.9 and module-init-tools.
311 2 - A module was force loaded by insmod -f.
312 Set by modutils >= 2.4.9 and module-init-tools.
313 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
314
diff --git a/Documentation/sysctl/sunrpc.txt b/Documentation/sysctl/sunrpc.txt
new file mode 100644
index 000000000000..ae1ecac6f85a
--- /dev/null
+++ b/Documentation/sysctl/sunrpc.txt
@@ -0,0 +1,20 @@
1Documentation for /proc/sys/sunrpc/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains the documentation for the sysctl files in
9/proc/sys/sunrpc and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to (re)set the debug
12flags of the SUN Remote Procedure Call (RPC) subsystem in
13the Linux kernel. This stuff is used for NFS, KNFSD and
14maybe a few other things as well.
15
16The files in there are used to control the debugging flags:
17rpc_debug, nfs_debug, nfsd_debug and nlm_debug.
18
19These flags are for kernel hackers only. You should read the
20source code in net/sunrpc/ for more information.
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
new file mode 100644
index 000000000000..2f1aae32a5d9
--- /dev/null
+++ b/Documentation/sysctl/vm.txt
@@ -0,0 +1,104 @@
1Documentation for /proc/sys/vm/* kernel version 2.2.10
2 (c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
3
4For general info and legal blurb, please look in README.
5
6==============================================================
7
8This file contains the documentation for the sysctl files in
9/proc/sys/vm and is valid for Linux kernel version 2.2.
10
11The files in this directory can be used to tune the operation
12of the virtual memory (VM) subsystem of the Linux kernel and
13the writeout of dirty data to disk.
14
15Default values and initialization routines for most of these
16files can be found in mm/swap.c.
17
18Currently, these files are in /proc/sys/vm:
19- overcommit_memory
20- page-cluster
21- dirty_ratio
22- dirty_background_ratio
23- dirty_expire_centisecs
24- dirty_writeback_centisecs
25- max_map_count
26- min_free_kbytes
27- laptop_mode
28- block_dump
29
30==============================================================
31
32dirty_ratio, dirty_background_ratio, dirty_expire_centisecs,
33dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode,
34block_dump, swap_token_timeout:
35
36See Documentation/filesystems/proc.txt
37
38==============================================================
39
40overcommit_memory:
41
42This value contains a flag that enables memory overcommitment.
43
44When this flag is 0, the kernel attempts to estimate the amount
45of free memory left when userspace requests more memory.
46
47When this flag is 1, the kernel pretends there is always enough
48memory until it actually runs out.
49
50When this flag is 2, the kernel uses a "never overcommit"
51policy that attempts to prevent any overcommit of memory.
52
53This feature can be very useful because there are a lot of
54programs that malloc() huge amounts of memory "just-in-case"
55and don't use much of it.
56
57The default value is 0.
58
59See Documentation/vm/overcommit-accounting and
60security/commoncap.c::cap_vm_enough_memory() for more information.
61
62==============================================================
63
64overcommit_ratio:
65
66When overcommit_memory is set to 2, the committed address
67space is not permitted to exceed swap plus this percentage
68of physical RAM. See above.
69
70==============================================================
71
72page-cluster:
73
74The Linux VM subsystem avoids excessive disk seeks by reading
75multiple pages on a page fault. The number of pages it reads
76is dependent on the amount of memory in your machine.
77
78The number of pages the kernel reads in at once is equal to
792 ^ page-cluster. Values above 2 ^ 5 don't make much sense
80for swap because we only cluster swap data in 32-page groups.
81
82==============================================================
83
84max_map_count:
85
86This file contains the maximum number of memory map areas a process
87may have. Memory map areas are used as a side-effect of calling
88malloc, directly by mmap and mprotect, and also when loading shared
89libraries.
90
91While most applications need less than a thousand maps, certain
92programs, particularly malloc debuggers, may consume lots of them,
93e.g., up to one or two maps per allocation.
94
95The default value is 65536.
96
97==============================================================
98
99min_free_kbytes:
100
101This is used to force the Linux VM to keep a minimum number
102of kilobytes free. The VM uses this number to compute a pages_min
103value for each lowmem zone in the system. Each lowmem zone gets
104a number of reserved free pages based proportionally on its size.