1PROC(5)                    Linux Programmer's Manual                   PROC(5)
2
3
4

NAME

6       proc - process information pseudo-file system
7

DESCRIPTION

9       The proc file system is a pseudo-file system which is used as an inter‐
10       face to kernel data structures.  It is commonly mounted at /proc.  Most
11       of  it  is  read-only,  but  some  files  allow  kernel variables to be
12       changed.
13
14       The following outline gives a quick tour through the /proc hierarchy.
15
16       /proc/[pid]
17              There is a numerical subdirectory for each running process;  the
18              subdirectory is named by the process ID.  Each such subdirectory
19              contains the following pseudo-files and directories.
20
21       /proc/[pid]/auxv (since 2.6.0-test7)
22              This contains the contents of the  ELF  interpreter  information
23              passed  to the process at exec time.  The format is one unsigned
24              long ID plus one unsigned long value for each entry.   The  last
25              entry contains two zeros.
26
27       /proc/[pid]/cgroup (since Linux 2.6.24)
28              This  file  describes  control  groups to which the process/task
29              belongs.  For each cgroup hierarchy there is one entry  contain‐
30              ing colon-separated fields of the form:
31
32                  5:cpuacct,cpu,cpuset:/daemons
33
34              The colon-separated fields are, from left to right:
35
36                  1. hierarchy ID number
37
38                  2. set of subsystems bound to the hierarchy
39
40                  3. control  group  in  the  hierarchy  to  which the process
41                     belongs
42
43              This file is present only if the CONFIG_CGROUPS kernel  configu‐
44              ration option is enabled.
45
46       /proc/[pid]/cmdline
47              This holds the complete command line for the process, unless the
48              process is a zombie.  In the latter case, there  is  nothing  in
49              this  file:  that  is, a read on this file will return 0 charac‐
50              ters.  The command-line arguments appear in this file as  a  set
51              of  strings  separated by null bytes ('\0'), with a further null
52              byte after the last string.
53
54       /proc/[pid]/coredump_filter (since kernel 2.6.23)
55              See core(5).
56
57       /proc/[pid]/cpuset (since kernel 2.6.12)
58              See cpuset(7).
59
60       /proc/[pid]/cwd
61              This is a symbolic link to the current working directory of  the
62              process.   To  find out the current working directory of process
63              20, for instance, you can do this:
64
65                  $ cd /proc/20/cwd; /bin/pwd
66
67              Note that the pwd command is often a shell built-in,  and  might
68              not work properly.  In bash(1), you may use pwd -P.
69
70              In  a  multithreaded process, the contents of this symbolic link
71              are not available if the  main  thread  has  already  terminated
72              (typically by calling pthread_exit(3)).
73
74       /proc/[pid]/environ
75              This file contains the environment for the process.  The entries
76              are separated by null bytes ('\0'), and there may be a null byte
77              at  the  end.   Thus, to print out the environment of process 1,
78              you would do:
79
80                  $ strings /proc/1/environ
81
82       /proc/[pid]/exe
83              Under Linux 2.2 and later, this file is a symbolic link contain‐
84              ing  the actual pathname of the executed command.  This symbolic
85              link can be dereferenced normally; attempting to  open  it  will
86              open  the  executable.  You can even type /proc/[pid]/exe to run
87              another copy of the same executable as is being run  by  process
88              [pid].   In  a  multithreaded process, the contents of this sym‐
89              bolic link are not available if the main thread has already ter‐
90              minated (typically by calling pthread_exit(3)).
91
92              Under  Linux 2.0 and earlier /proc/[pid]/exe is a pointer to the
93              binary which was executed, and appears as a  symbolic  link.   A
94              readlink(2)  call  on this file under Linux 2.0 returns a string
95              in the format:
96
97                  [device]:inode
98
99              For example, [0301]:1502 would be inode 1502 on device major  03
100              (IDE,  MFM,  etc. drives) minor 01 (first partition on the first
101              drive).
102
103              find(1) with the -inum option can be used to locate the file.
104
105       /proc/[pid]/fd/
106              This is a subdirectory containing one entry for each file  which
107              the process has open, named by its file descriptor, and which is
108              a symbolic link to the actual file.  Thus, 0 is standard  input,
109              1 standard output, 2 standard error, etc.
110
111              For  file descriptors for pipes and sockets, the entries will be
112              symbolic links whose content is the file type with the inode.  A
113              readlink(2) call on this file returns a string in the format:
114
115                  type:[inode]
116
117              For  example, socket:[2248868] will be a socket and its inode is
118              2248868.  For sockets, that inode  can  be  used  to  find  more
119              information in one of the files under /proc/net/.
120
121              For  file  descriptors  that  have no corresponding inode (e.g.,
122              file descriptors produced by epoll_create(2),  eventfd(2),  ino‐
123              tify_init(2),  signalfd(2), and timerfd(2)), the entry will be a
124              symbolic link with contents of the form
125
126                  anon_inode:<file-type>
127
128              In some cases, the file-type is surrounded by square brackets.
129
130              For example, an epoll file descriptor will have a symbolic  link
131              whose content is the string anon_inode:[eventpoll].
132
133              In  a  multithreaded process, the contents of this directory are
134              not available if the main thread has already  terminated  (typi‐
135              cally by calling pthread_exit(3)).
136
137              Programs  that  will take a filename as a command-line argument,
138              but will not take input from standard input if  no  argument  is
139              supplied,  or that write to a file named as a command-line argu‐
140              ment, but will not send their output to standard  output  if  no
141              argument  is  supplied, can nevertheless be made to use standard
142              input or standard out using /proc/[pid]/fd.  For example, assum‐
143              ing  that -i is the flag designating an input file and -o is the
144              flag designating an output file:
145
146                  $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...
147
148              and you have a working filter.
149
150              /proc/self/fd/N is approximately the same as /dev/fd/N  in  some
151              UNIX and UNIX-like systems.  Most Linux MAKEDEV scripts symboli‐
152              cally link /dev/fd to /proc/self/fd, in fact.
153
154              Most systems provide symbolic links /dev/stdin, /dev/stdout, and
155              /dev/stderr, which respectively link to the files 0, 1, and 2 in
156              /proc/self/fd.  Thus the example command above could be  written
157              as:
158
159                  $ foobar -i /dev/stdin -o /dev/stdout ...
160
161       /proc/[pid]/fdinfo/ (since kernel 2.6.22)
162              This  is a subdirectory containing one entry for each file which
163              the process has open, named by its file  descriptor.   The  con‐
164              tents  of  each file can be read to obtain information about the
165              corresponding file descriptor, for example:
166
167                  $ cat /proc/12015/fdinfo/4
168                  pos:    1000
169                  flags:  01002002
170
171              The pos field is a decimal number showing the current file  off‐
172              set.   The flags field is an octal number that displays the file
173              access mode and file status flags (see open(2)).
174
175              The files in this directory are readable only by  the  owner  of
176              the process.
177
178       /proc/[pid]/io (since kernel 2.6.20)
179              This file contains I/O statistics for the process, for example:
180
181                  # cat /proc/3828/io
182                  rchar: 323934931
183                  wchar: 323929600
184                  syscr: 632687
185                  syscw: 632675
186                  read_bytes: 0
187                  write_bytes: 323932160
188                  cancelled_write_bytes: 0
189
190              The fields are as follows:
191
192              rchar: characters read
193                     The number of bytes which this task has caused to be read
194                     from storage.  This is simply the sum of bytes which this
195                     process  passed  to read(2) and similar system calls.  It
196                     includes things such as terminal I/O and is unaffected by
197                     whether or not actual physical disk I/O was required (the
198                     read might have been satisfied from pagecache).
199
200              wchar: characters written
201                     The number of bytes which this task has caused, or  shall
202                     cause  to be written to disk.  Similar caveats apply here
203                     as with rchar.
204
205              syscr: read syscalls
206                     Attempt to count the number of read  I/O  operations—that
207                     is, system calls such as read(2) and pread(2).
208
209              syscw: write syscalls
210                     Attempt  to count the number of write I/O operations—that
211                     is, system calls such as write(2) and pwrite(2).
212
213              read_bytes: bytes read
214                     Attempt to count the number of bytes which  this  process
215                     really  did  cause  to be fetched from the storage layer.
216                     This is accurate for block-backed filesystems.
217
218              write_bytes: bytes written
219                     Attempt to count the number of bytes which  this  process
220                     caused to be sent to the storage layer.
221
222              cancelled_write_bytes:
223                     The big inaccuracy here is truncate.  If a process writes
224                     1MB to a file and then deletes the file, it will in  fact
225                     perform  no writeout.  But it will have been accounted as
226                     having caused 1MB of write.  In other words:  this  field
227                     represents  the number of bytes which this process caused
228                     to not happen, by truncating pagecache.  A task can cause
229                     "negative"  I/O  too.   If this task truncates some dirty
230                     pagecache, some I/O which another task has been accounted
231                     for (in its write_bytes) will not be happening.
232
233              Note:  In  the  current implementation, things are a bit racy on
234              32-bit systems: if process A reads  process  B's  /proc/[pid]/io
235              while  process  B  is  updating  one  of  these 64-bit counters,
236              process A could see an intermediate result.
237
238       /proc/[pid]/limits (since kernel 2.6.24)
239              This file displays the soft limit, hard limit, and units of mea‐
240              surement  for  each  of the process's resource limits (see getr‐
241              limit(2)).  Up to and including Linux 2.6.35, this file is  pro‐
242              tected  to  allow  reading  only by the real UID of the process.
243              Since Linux 2.6.36, this file is readable by all  users  on  the
244              system.
245
246       /proc/[pid]/map_files/ (since kernel 3.3)
247              This  subdirectory  contains  entries  corresponding  to memory-
248              mapped files (see mmap(2)).  Entries are named by memory  region
249              start  and  end address pair (expressed as hexadecimal numbers),
250              and are symbolic links to the mapped files themselves.  Here  is
251              an example, with the output wrapped and reformatted to fit on an
252              80-column display:
253
254                  $ ls -l /proc/self/map_files/
255                  lr--------. 1 root root 64 Apr 16 21:31
256                              3252e00000-3252e20000 -> /usr/lib64/ld-2.15.so
257                  ...
258
259              Although these entries are present for memory regions that  were
260              mapped  with  the MAP_FILE flag, the way anonymous shared memory
261              (regions created with the MAP_ANON | MAP_SHARED flags) is imple‐
262              mented  in  Linux  means  that  such regions also appear on this
263              directory.  Here is an example where  the  target  file  is  the
264              deleted /dev/zero one:
265
266
267                  lrw-------. 1 root root 64 Apr 16 21:33
268                              7fc075d2f000-7fc075e6f000 -> /dev/zero (deleted)
269
270              This  directory  appears  only  if the CONFIG_CHECKPOINT_RESTORE
271              kernel configuration option is enabled.
272
273       /proc/[pid]/maps
274              A file containing the currently mapped memory regions and  their
275              access  permissions.   See  mmap(2) for some further information
276              about memory mappings.
277
278              The format of the file is:
279
280       address           perms offset  dev   inode       pathname
281       00400000-00452000 r-xp 00000000 08:02 173521      /usr/bin/dbus-daemon
282       00651000-00652000 r--p 00051000 08:02 173521      /usr/bin/dbus-daemon
283       00652000-00655000 rw-p 00052000 08:02 173521      /usr/bin/dbus-daemon
284       00e03000-00e24000 rw-p 00000000 00:00 0           [heap]
285       00e24000-011f7000 rw-p 00000000 00:00 0           [heap]
286       ...
287       35b1800000-35b1820000 r-xp 00000000 08:02 135522  /usr/lib64/ld-2.15.so
288       35b1a1f000-35b1a20000 r--p 0001f000 08:02 135522  /usr/lib64/ld-2.15.so
289       35b1a20000-35b1a21000 rw-p 00020000 08:02 135522  /usr/lib64/ld-2.15.so
290       35b1a21000-35b1a22000 rw-p 00000000 00:00 0
291       35b1c00000-35b1dac000 r-xp 00000000 08:02 135870  /usr/lib64/libc-2.15.so
292       35b1dac000-35b1fac000 ---p 001ac000 08:02 135870  /usr/lib64/libc-2.15.so
293       35b1fac000-35b1fb0000 r--p 001ac000 08:02 135870  /usr/lib64/libc-2.15.so
294       35b1fb0000-35b1fb2000 rw-p 001b0000 08:02 135870  /usr/lib64/libc-2.15.so
295       ...
296       f2c6ff8c000-7f2c7078c000 rw-p 00000000 00:00 0    [stack:986]
297       ...
298       7fffb2c0d000-7fffb2c2e000 rw-p 00000000 00:00 0   [stack]
299       7fffb2d48000-7fffb2d49000 r-xp 00000000 00:00 0   [vdso]
300
301              The address field is the address space in the process  that  the
302              mapping occupies.  The perms field is a set of permissions:
303
304                   r = read
305                   w = write
306                   x = execute
307                   s = shared
308                   p = private (copy on write)
309
310              The  offset  field  is the offset into the file/whatever; dev is
311              the device (major:minor); inode is the inode on that device.   0
312              indicates that no inode is associated with the memory region, as
313              would be the case with BSS (uninitialized data).
314
315              The pathname field will usually be the file that is backing  the
316              mapping.  For ELF files, you can easily coordinate with the off‐
317              set field by looking at the Offset  field  in  the  ELF  program
318              headers (readelf -l).
319
320              There are additional helpful pseudo-paths:
321
322                   [stack]
323                          The  initial  process's  (also  known  as  the  main
324                          thread's) stack.
325
326                   [stack:<tid>] (since Linux 3.4)
327                          A thread's stack (where the <tid> is a  thread  ID).
328                          It corresponds to the /proc/[pid]/task/[tid]/ path.
329
330                   [vdso] The virtual dynamically linked shared object.
331
332                   [heap] The process's heap.
333
334              If  the pathname field is blank, this is an anonymous mapping as
335              obtained via the mmap(2) function.  There  is  no  easy  way  to
336              coordinate  this back to a process's source, short of running it
337              through gdb(1), strace(1), or similar.
338
339              Under Linux 2.0 there is no field giving pathname.
340
341       /proc/[pid]/mem
342              This file can be used to access the pages of a process's  memory
343              through open(2), read(2), and lseek(2).
344
345       /proc/[pid]/mountinfo (since Linux 2.6.26)
346              This  file contains information about mount points.  It contains
347              lines of the form:
348
349              36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
350              (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
351
352              The numbers in  parentheses  are  labels  for  the  descriptions
353              below:
354
355              (1)  mount  ID:  unique  identifier  of the mount (may be reused
356                   after umount(2)).
357
358              (2)  parent ID: ID of parent mount (or of self for  the  top  of
359                   the mount tree).
360
361              (3)  major:minor:  value of st_dev for files on file system (see
362                   stat(2)).
363
364              (4)  root: root of the mount within the file system.
365
366              (5)  mount point: mount point relative to the process's root.
367
368              (6)  mount options: per-mount options.
369
370              (7)  optional  fields:  zero  or  more  fields   of   the   form
371                   "tag[:value]".
372
373              (8)  separator: marks the end of the optional fields.
374
375              (9)  file   system  type:  name  of  file  system  in  the  form
376                   "type[.subtype]".
377
378              (10) mount source: file system-specific information or "none".
379
380              (11) super options: per-super block options.
381
382              Parsers should ignore all unrecognized  optional  fields.   Cur‐
383              rently the possible optional fields are:
384
385                   shared:X          mount is shared in peer group X
386
387                   master:X          mount is slave to peer group X
388
389                   propagate_from:X  mount  is  slave and receives propagation
390                                     from peer group X (*)
391
392                   unbindable        mount is unbindable
393
394              (*) X is the closest dominant peer  group  under  the  process's
395              root.  If X is the immediate master of the mount, or if there is
396              no dominant peer group under the same root, then only the  "mas‐
397              ter:X" field is present and not the "propagate_from:X" field.
398
399              For  more  information  on  mount  propagation  see:  Documenta‐
400              tion/filesystems/sharedsubtree.txt in the  Linux  kernel  source
401              tree.
402
403       /proc/[pid]/mounts (since Linux 2.4.19)
404              This  is a list of all the file systems currently mounted in the
405              process's mount namespace.  The format of  this  file  is  docu‐
406              mented  in  fstab(5).  Since kernel version 2.6.15, this file is
407              pollable: after opening the file for reading, a change  in  this
408              file  (i.e., a file system mount or unmount) causes select(2) to
409              mark  the  file  descriptor  as  readable,   and   poll(2)   and
410              epoll_wait(2) mark the file as having an error condition.
411
412       /proc/[pid]/mountstats (since Linux 2.6.17)
413              This  file exports information (statistics, configuration infor‐
414              mation) about the mount points  in  the  process's  name  space.
415              Lines in this file have the form:
416
417              device /dev/sda7 mounted on /home with fstype ext3 [statistics]
418              (       1      )            ( 2 )             (3 ) (4)
419
420              The fields in each line are:
421
422              (1)  The  name  of the mounted device (or "nodevice" if there is
423                   no corresponding device).
424
425              (2)  The mount point within the file system tree.
426
427              (3)  The file system type.
428
429              (4)  Optional statistics and  configuration  information.   Cur‐
430                   rently  (as  at Linux 2.6.26), only NFS file systems export
431                   information via this field.
432
433              This file is readable only by the owner of the process.
434
435       /proc/[pid]/ns/ (since Linux 3.0)
436              This is a subdirectory containing one entry for  each  namespace
437              that  supports  being  manipulated by setns(2).  For information
438              about namespaces, see clone(2).
439
440       /proc/[pid]/ns/ipc (since Linux 3.0)
441              Bind mounting this file (see mount(2)) to somewhere else in  the
442              filesystem  keeps  the IPC namespace of the process specified by
443              pid alive even if all processes currently in the namespace  ter‐
444              minate.
445
446              Opening this file returns a file handle for the IPC namespace of
447              the process specified by pid.  As long as this  file  descriptor
448              remains  open,  the IPC namespace will remain alive, even if all
449              processes in the namespace terminate.  The file  descriptor  can
450              be passed to setns(2).
451
452       /proc/[pid]/ns/net (since Linux 3.0)
453              Bind  mounting this file (see mount(2)) to somewhere else in the
454              filesystem keeps the network namespace of the process  specified
455              by pid alive even if all processes in the namespace terminate.
456
457              Opening  this  file returns a file handle for the network names‐
458              pace of the process specified by pid.   As  long  as  this  file
459              descriptor  remains  open,  the  network  namespace  will remain
460              alive, even if all processes in the  namespace  terminate.   The
461              file descriptor can be passed to setns(2).
462
463       /proc/[pid]/ns/uts (since Linux 3.0)
464              Bind  mounting this file (see mount(2)) to somewhere else in the
465              filesystem keeps the UTS namespace of the process  specified  by
466              pid  alive even if all processes currently in the namespace ter‐
467              minate.
468
469              Opening this file returns a file handle for the UTS namespace of
470              the  process  specified by pid.  As long as this file descriptor
471              remains open, the UTS namespace will remain alive, even  if  all
472              processes  in  the namespace terminate.  The file descriptor can
473              be passed to setns(2).
474
475       /proc/[pid]/numa_maps (since Linux 2.6.14)
476              See numa(7).
477
478       /proc/[pid]/oom_adj (since Linux 2.6.11)
479              This file can be used to adjust the score used to  select  which
480              process  should  be  killed in an out-of-memory (OOM) situation.
481              The kernel uses this value for  a  bit-shift  operation  of  the
482              process's  oom_score value: valid values are in the range -16 to
483              +15, plus the special  value  -17,  which  disables  OOM-killing
484              altogether  for  this  process.   A positive score increases the
485              likelihood of this process being killed  by  the  OOM-killer;  a
486              negative score decreases the likelihood.
487
488              The default value for this file is 0; a new process inherits its
489              parent's  oom_adj  setting.   A  process  must   be   privileged
490              (CAP_SYS_RESOURCE) to update this file.
491
492              Since  Linux  2.6.36, use of this file is deprecated in favor of
493              /proc/[pid]/oom_score_adj.
494
495       /proc/[pid]/oom_score (since Linux 2.6.11)
496              This file displays the current score that the  kernel  gives  to
497              this process for the purpose of selecting a process for the OOM-
498              killer.  A higher score means that the process is more likely to
499              be  selected by the OOM-killer.  The basis for this score is the
500              amount of memory used by the  process,  with  increases  (+)  or
501              decreases (-) for factors including:
502
503              * whether  the  process  creates a lot of children using fork(2)
504                (+);
505
506              * whether the process has been running a long time, or has  used
507                a lot of CPU time (-);
508
509              * whether the process has a low nice value (i.e., > 0) (+);
510
511              * whether the process is privileged (-); and
512
513              * whether the process is making direct hardware access (-).
514
515              The  oom_score  also  reflects  the  adjustment specified by the
516              oom_score_adj or oom_adj setting for the process.
517
518       /proc/[pid]/oom_score_adj (since Linux 2.6.36)
519              This file can be used to adjust the badness  heuristic  used  to
520              select which process gets killed in out-of-memory conditions.
521
522              The  badness  heuristic  assigns  a value to each candidate task
523              ranging from 0 (never kill) to 1000 (always kill)  to  determine
524              which  process  is targeted.  The units are roughly a proportion
525              along that range of allowed  memory  the  process  may  allocate
526              from, based on an estimation of its current memory and swap use.
527              For example, if a task is using all allowed memory, its  badness
528              score  will be 1000.  If it is using half of its allowed memory,
529              its score will be 500.
530
531              There is an additional factor included  in  the  badness  score:
532              root processes are given 3% extra memory over other tasks.
533
534              The  amount  of "allowed" memory depends on the context in which
535              the OOM-killer was called.  If it is due to the memory  assigned
536              to  the  allocating  task's  cpuset being exhausted, the allowed
537              memory represents the set of mems assigned to that  cpuset  (see
538              cpuset(7)).   If  it  is  due  to  a  mempolicy's  node(s) being
539              exhausted, the allowed memory represents the  set  of  mempolicy
540              nodes.   If  it  is  due to a memory limit (or swap limit) being
541              reached, the allowed memory is that configured limit.   Finally,
542              if  it  is  due  to  the  entire system being out of memory, the
543              allowed memory represents all allocatable resources.
544
545              The value of oom_score_adj is added to the badness score  before
546              it  is  used to determine which task to kill.  Acceptable values
547              range    from     -1000     (OOM_SCORE_ADJ_MIN)     to     +1000
548              (OOM_SCORE_ADJ_MAX).   This  allows  user  space  to control the
549              preference for OOM-killing, ranging  from  always  preferring  a
550              certain  task  or completely disabling it from OOM-killing.  The
551              lowest possible value, -1000, is equivalent  to  disabling  OOM-
552              killing  entirely  for  that task, since it will always report a
553              badness score of 0.
554
555              Consequently, it is very simple for user  space  to  define  the
556              amount   of  memory  to  consider  for  each  task.   Setting  a
557              oom_score_adj value of +500, for example, is roughly  equivalent
558              to  allowing  the  remainder  of  tasks sharing the same system,
559              cpuset, mempolicy, or memory  controller  resources  to  use  at
560              least  50%  more  memory.   A  value of -500, on the other hand,
561              would be roughly equivalent to discounting  50%  of  the  task's
562              allowed  memory  from  being  considered  as scoring against the
563              task.
564
565              For    backward    compatibility    with    previous    kernels,
566              /proc/[pid]/oom_adj can still be used to tune the badness score.
567              Its value is scaled linearly with oom_score_adj.
568
569              Writing to /proc/[pid]/oom_score_adj or /proc/[pid]/oom_adj will
570              change the other with its scaled value.
571
572       /proc/[pid]/root
573              UNIX  and  Linux  support  the idea of a per-process root of the
574              file system, set by the chroot(2) system call.  This file  is  a
575              symbolic  link  that points to the process's root directory, and
576              behaves as exe, fd/*, etc. do.
577
578              In a multithreaded process, the contents of this  symbolic  link
579              are  not  available  if  the  main thread has already terminated
580              (typically by calling pthread_exit(3)).
581
582       /proc/[pid]/smaps (since Linux 2.6.14)
583              This file shows memory consumption for  each  of  the  process's
584              mappings.   For each of mappings there is a series of lines such
585              as the following:
586
587                  08048000-080bc000 r-xp 00000000 03:02 13130      /bin/bash
588                  Size:               464 kB
589                  Rss:                424 kB
590                  Shared_Clean:       424 kB
591                  Shared_Dirty:         0 kB
592                  Private_Clean:        0 kB
593                  Private_Dirty:        0 kB
594
595              The first of these lines shows the same information as  is  dis‐
596              played for the mapping in /proc/[pid]/maps.  The remaining lines
597              show the size of the mapping, the amount of the mapping that  is
598              currently  resident in RAM, the number of clean and dirty shared
599              pages in the mapping, and the number of clean and dirty  private
600              pages in the mapping.
601
602              This file is present only if the CONFIG_MMU kernel configuration
603              option is enabled.
604
605       /proc/[pid]/stat
606              Status information about the process.  This is  used  by  ps(1).
607              It is defined in /usr/src/linux/fs/proc/array.c.
608
609              The  fields,  in order, with their proper scanf(3) format speci‐
610              fiers, are:
611
612              pid %d      (1) The process ID.
613
614              comm %s     (2) The filename of the executable, in  parentheses.
615                          This  is  visible  whether  or not the executable is
616                          swapped out.
617
618              state %c    (3) One character from the string "RSDZTW"  where  R
619                          is  running, S is sleeping in an interruptible wait,
620                          D is waiting in uninterruptible  disk  sleep,  Z  is
621                          zombie,  T is traced or stopped (on a signal), and W
622                          is paging.
623
624              ppid %d     (4) The PID of the parent.
625
626              pgrp %d     (5) The process group ID of the process.
627
628              session %d  (6) The session ID of the process.
629
630              tty_nr %d   (7) The controlling terminal of the  process.   (The
631                          minor  device number is contained in the combination
632                          of bits 31 to 20 and 7 to 0; the major device number
633                          is in bits 15 to 8.)
634
635              tpgid %d    (8)  The  ID  of the foreground process group of the
636                          controlling terminal of the process.
637
638              flags %u (%lu before Linux 2.6.22)
639                          (9) The kernel flags word of the process.   For  bit
640                          meanings,  see  the PF_* defines in the Linux kernel
641                          source file include/linux/sched.h.   Details  depend
642                          on the kernel version.
643
644              minflt %lu  (10) The number of minor faults the process has made
645                          which have not required loading a memory  page  from
646                          disk.
647
648              cminflt %lu (11)  The  number of minor faults that the process's
649                          waited-for children have made.
650
651              majflt %lu  (12) The number of major faults the process has made
652                          which have required loading a memory page from disk.
653
654              cmajflt %lu (13)  The  number of major faults that the process's
655                          waited-for children have made.
656
657              utime %lu   (14) Amount of  time  that  this  process  has  been
658                          scheduled  in  user  mode,  measured  in clock ticks
659                          (divide  by  sysconf(_SC_CLK_TCK)).   This  includes
660                          guest time, guest_time (time spent running a virtual
661                          CPU, see below), so that applications that  are  not
662                          aware  of the guest time field do not lose that time
663                          from their calculations.
664
665              stime %lu   (15) Amount of  time  that  this  process  has  been
666                          scheduled  in  kernel  mode, measured in clock ticks
667                          (divide by sysconf(_SC_CLK_TCK)).
668
669              cutime %ld  (16) Amount of time that this  process's  waited-for
670                          children  have been scheduled in user mode, measured
671                          in clock  ticks  (divide  by  sysconf(_SC_CLK_TCK)).
672                          (See  also  times(2).)   This  includes  guest time,
673                          cguest_time (time spent running a virtual  CPU,  see
674                          below).
675
676              cstime %ld  (17)  Amount  of time that this process's waited-for
677                          children have been scheduled in  kernel  mode,  mea‐
678                          sured      in     clock     ticks     (divide     by
679                          sysconf(_SC_CLK_TCK)).
680
681              priority %ld
682                          (18) (Explanation for Linux 2.6) For processes  run‐
683                          ning  a  real-time  scheduling policy (policy below;
684                          see  sched_setscheduler(2)),  this  is  the  negated
685                          scheduling priority, minus one; that is, a number in
686                          the range -2 to  -100,  corresponding  to  real-time
687                          priorities  1  to 99.  For processes running under a
688                          non-real-time scheduling policy,  this  is  the  raw
689                          nice  value  (setpriority(2))  as represented in the
690                          kernel.  The kernel stores nice values as numbers in
691                          the range 0 (high) to 39 (low), corresponding to the
692                          user-visible nice range of -20 to 19.
693
694                          Before Linux 2.6, this was a scaled value  based  on
695                          the scheduler weighting given to this process.
696
697              nice %ld    (19) The nice value (see setpriority(2)), a value in
698                          the range 19 (low priority) to -20 (high priority).
699
700              num_threads %ld
701                          (20) Number of threads in this process (since  Linux
702                          2.6).   Before kernel 2.6, this field was hard coded
703                          to 0 as a placeholder for an earlier removed field.
704
705              itrealvalue %ld
706                          (21) The time in jiffies before the next SIGALRM  is
707                          sent to the process due to an interval timer.  Since
708                          kernel 2.6.17, this field is no  longer  maintained,
709                          and is hard coded as 0.
710
711              starttime %llu (was %lu before Linux 2.6)
712                          (22) The time the process started after system boot.
713                          In  kernels  before  Linux  2.6,  this   value   was
714                          expressed in jiffies.  Since Linux 2.6, the value is
715                          expressed    in    clock    ticks     (divide     by
716                          sysconf(_SC_CLK_TCK)).
717
718              vsize %lu   (23) Virtual memory size in bytes.
719
720              rss %ld     (24)  Resident Set Size: number of pages the process
721                          has in real memory.  This is just  the  pages  which
722                          count  toward text, data, or stack space.  This does
723                          not include pages which have not been  demand-loaded
724                          in, or which are swapped out.
725
726              rsslim %lu  (25)  Current  soft limit in bytes on the rss of the
727                          process; see the description of RLIMIT_RSS in  getr‐
728                          limit(2).
729
730              startcode %lu
731                          (26) The address above which program text can run.
732
733              endcode %lu (27) The address below which program text can run.
734
735              startstack %lu
736                          (28)  The address of the start (i.e., bottom) of the
737                          stack.
738
739              kstkesp %lu (29) The current value of ESP  (stack  pointer),  as
740                          found in the kernel stack page for the process.
741
742              kstkeip %lu (30) The current EIP (instruction pointer).
743
744              signal %lu  (31)  The  bitmap of pending signals, displayed as a
745                          decimal number.  Obsolete, because it does not  pro‐
746                          vide   information   on   real-time   signals;   use
747                          /proc/[pid]/status instead.
748
749              blocked %lu (32) The bitmap of blocked signals, displayed  as  a
750                          decimal  number.  Obsolete, because it does not pro‐
751                          vide   information   on   real-time   signals;   use
752                          /proc/[pid]/status instead.
753
754              sigignore %lu
755                          (33)  The  bitmap of ignored signals, displayed as a
756                          decimal number.  Obsolete, because it does not  pro‐
757                          vide   information   on   real-time   signals;   use
758                          /proc/[pid]/status instead.
759
760              sigcatch %lu
761                          (34) The bitmap of caught signals,  displayed  as  a
762                          decimal  number.  Obsolete, because it does not pro‐
763                          vide   information   on   real-time   signals;   use
764                          /proc/[pid]/status instead.
765
766              wchan %lu   (35)  This  is the "channel" in which the process is
767                          waiting.  It is the address of a  system  call,  and
768                          can be looked up in a namelist if you need a textual
769                          name.  (If you have an  up-to-date  /etc/psdatabase,
770                          then try ps -l to see the WCHAN field in action.)
771
772              nswap %lu   (36) Number of pages swapped (not maintained).
773
774              cnswap %lu  (37) Cumulative nswap for child processes (not main‐
775                          tained).
776
777              exit_signal %d (since Linux 2.1.22)
778                          (38) Signal to be sent to parent when we die.
779
780              processor %d (since Linux 2.2.8)
781                          (39) CPU number last executed on.
782
783              rt_priority %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
784                          (40) Real-time scheduling priority, a number in  the
785                          range  1 to 99 for processes scheduled under a real-
786                          time policy, or 0, for non-real-time processes  (see
787                          sched_setscheduler(2)).
788
789              policy %u (since Linux 2.5.19; was %lu before Linux 2.6.22)
790                          (41)  Scheduling policy (see sched_setscheduler(2)).
791                          Decode using the SCHED_* constants in linux/sched.h.
792
793              delayacct_blkio_ticks %llu (since Linux 2.6.18)
794                          (42) Aggregated block I/O delays, measured in  clock
795                          ticks (centiseconds).
796
797              guest_time %lu (since Linux 2.6.24)
798                          (43) Guest time of the process (time spent running a
799                          virtual CPU for a guest operating system),  measured
800                          in clock ticks (divide by sysconf(_SC_CLK_TCK)).
801
802              cguest_time %ld (since Linux 2.6.24)
803                          (44)  Guest time of the process's children, measured
804                          in clock ticks (divide by sysconf(_SC_CLK_TCK)).
805
806       /proc/[pid]/statm
807              Provides information about memory usage, measured in pages.  The
808              columns are:
809
810                  size       (1) total program size
811                             (same as VmSize in /proc/[pid]/status)
812                  resident   (2) resident set size
813                             (same as VmRSS in /proc/[pid]/status)
814                  share      (3) shared pages (i.e., backed by a file)
815                  text       (4) text (code)
816                  lib        (5) library (unused in Linux 2.6)
817                  data       (6) data + stack
818                  dt         (7) dirty pages (unused in Linux 2.6)
819
820       /proc/[pid]/status
821              Provides   much  of  the  information  in  /proc/[pid]/stat  and
822              /proc/[pid]/statm in a format that's easier for humans to parse.
823              Here's an example:
824
825                  $ cat /proc/$$/status
826                  Name:   bash
827                  State:  S (sleeping)
828                  Tgid:   3515
829                  Pid:    3515
830                  PPid:   3452
831                  TracerPid:      0
832                  Uid:    1000    1000    1000    1000
833                  Gid:    100     100     100     100
834                  FDSize: 256
835                  Groups: 16 33 100
836                  VmPeak:     9136 kB
837                  VmSize:     7896 kB
838                  VmLck:         0 kB
839                  VmHWM:      7572 kB
840                  VmRSS:      6316 kB
841                  VmData:     5224 kB
842                  VmStk:        88 kB
843                  VmExe:       572 kB
844                  VmLib:      1708 kB
845                  VmPTE:        20 kB
846                  Threads:        1
847                  SigQ:   0/3067
848                  SigPnd: 0000000000000000
849                  ShdPnd: 0000000000000000
850                  SigBlk: 0000000000010000
851                  SigIgn: 0000000000384004
852                  SigCgt: 000000004b813efb
853                  CapInh: 0000000000000000
854                  CapPrm: 0000000000000000
855                  CapEff: 0000000000000000
856                  CapBnd: ffffffffffffffff
857                  Cpus_allowed:   00000001
858                  Cpus_allowed_list:      0
859                  Mems_allowed:   1
860                  Mems_allowed_list:      0
861                  voluntary_ctxt_switches:        150
862                  nonvoluntary_ctxt_switches:     545
863
864              The fields are as follows:
865
866              * Name: Command run by this process.
867
868              * State: Current state of the process.  One of "R (running)", "S
869                (sleeping)", "D (disk  sleep)",  "T  (stopped)",  "T  (tracing
870                stop)", "Z (zombie)", or "X (dead)".
871
872              * Tgid: Thread group ID (i.e., Process ID).
873
874              * Pid: Thread ID (see gettid(2)).
875
876              * PPid: PID of parent process.
877
878              * TracerPid: PID of process tracing this process (0 if not being
879                traced).
880
881              * Uid, Gid: Real, effective, saved set,  and  file  system  UIDs
882                (GIDs).
883
884              * FDSize: Number of file descriptor slots currently allocated.
885
886              * Groups: Supplementary group list.
887
888              * VmPeak: Peak virtual memory size.
889
890              * VmSize: Virtual memory size.
891
892              * VmLck: Locked memory size (see mlock(3)).
893
894              * VmHWM: Peak resident set size ("high water mark").
895
896              * VmRSS: Resident set size.
897
898              * VmData, VmStk, VmExe: Size of data, stack, and text segments.
899
900              * VmLib: Shared library code size.
901
902              * VmPTE: Page table entries size (since Linux 2.6.10).
903
904              * Threads: Number of threads in process containing this thread.
905
906              * SigQ:  This  field  contains  two slash-separated numbers that
907                relate to queued signals for the real user ID of this process.
908                The  first  of these is the number of currently queued signals
909                for this real user ID, and the second is the resource limit on
910                the  number  of  queued  signals  for  this  process  (see the
911                description of RLIMIT_SIGPENDING in getrlimit(2)).
912
913              * SigPnd, ShdPnd: Number of signals pending for thread  and  for
914                process as a whole (see pthreads(7) and signal(7)).
915
916              * SigBlk,   SigIgn,   SigCgt:  Masks  indicating  signals  being
917                blocked, ignored, and caught (see signal(7)).
918
919              * CapInh, CapPrm,  CapEff:  Masks  of  capabilities  enabled  in
920                inheritable,  permitted,  and  effective  sets  (see capabili‐
921                ties(7)).
922
923              * CapBnd: Capability Bounding  set  (since  kernel  2.6.26,  see
924                capabilities(7)).
925
926              * Cpus_allowed:  Mask  of  CPUs  on  which  this process may run
927                (since Linux 2.6.24, see cpuset(7)).
928
929              * Cpus_allowed_list: Same as  previous,  but  in  "list  format"
930                (since Linux 2.6.26, see cpuset(7)).
931
932              * Mems_allowed:  Mask  of  memory  nodes allowed to this process
933                (since Linux 2.6.24, see cpuset(7)).
934
935              * Mems_allowed_list: Same as  previous,  but  in  "list  format"
936                (since Linux 2.6.26, see cpuset(7)).
937
938              * voluntary_context_switches,     nonvoluntary_context_switches:
939                Number of voluntary and involuntary  context  switches  (since
940                Linux 2.6.23).
941
942       /proc/[pid]/task (since Linux 2.6.0-test6)
943              This  is  a  directory  that  contains one subdirectory for each
944              thread in the process.  The name of  each  subdirectory  is  the
945              numerical  thread  ID  ([tid])  of  the  thread (see gettid(2)).
946              Within each of these subdirectories, there is  a  set  of  files
947              with the same names and contents as under the /proc/[pid] direc‐
948              tories.  For attributes that are shared by all threads, the con‐
949              tents  for each of the files under the task/[tid] subdirectories
950              will be the same as in the  corresponding  file  in  the  parent
951              /proc/[pid]  directory (e.g., in a multithreaded process, all of
952              the task/[tid]/cwd  files  will  have  the  same  value  as  the
953              /proc/[pid]/cwd  file  in the parent directory, since all of the
954              threads in a process share a working directory).  For attributes
955              that are distinct for each thread, the corresponding files under
956              task/[tid] may have different values (e.g.,  various  fields  in
957              each  of  the  task/[tid]/status files may be different for each
958              thread).
959
960              In a multithreaded process, the contents of the /proc/[pid]/task
961              directory  are not available if the main thread has already ter‐
962              minated (typically by calling pthread_exit(3)).
963
964       /proc/apm
965              Advanced power management version and battery  information  when
966              CONFIG_APM is defined at kernel compilation time.
967
968       /proc/bus
969              Contains subdirectories for installed busses.
970
971       /proc/bus/pccard
972              Subdirectory  for  PCMCIA  devices  when CONFIG_PCMCIA is set at
973              kernel compilation time.
974
975       /proc/bus/pccard/drivers
976
977       /proc/bus/pci
978              Contains various bus subdirectories and pseudo-files  containing
979              information  about  PCI  busses,  installed  devices, and device
980              drivers.  Some of these files are not ASCII.
981
982       /proc/bus/pci/devices
983              Information about PCI devices.  They  may  be  accessed  through
984              lspci(8) and setpci(8).
985
986       /proc/cmdline
987              Arguments  passed  to the Linux kernel at boot time.  Often done
988              via a boot manager such as lilo(8) or grub(8).
989
990       /proc/config.gz (since Linux 2.6)
991              This file exposes the configuration options that  were  used  to
992              build  the  currently running kernel, in the same format as they
993              would be shown in the .config file that resulted when  configur‐
994              ing  the  kernel  (using make xconfig, make config, or similar).
995              The file contents are compressed;  view  or  search  them  using
996              zcat(1), zgrep(1), etc.  As long as no changes have been made to
997              the following file, the contents of /proc/config.gz are the same
998              as those provided by :
999
1000                  cat /lib/modules/$(uname -r)/build/.config
1001
1002              /proc/config.gz  is  provided  only  if the kernel is configured
1003              with CONFIG_IKCONFIG_PROC.
1004
1005       /proc/cpuinfo
1006              This is a collection of CPU and  system  architecture  dependent
1007              items,  for  each  supported architecture a different list.  Two
1008              common  entries  are  processor  which  gives  CPU  number   and
1009              bogomips;  a  system  constant  that is calculated during kernel
1010              initialization.  SMP machines have  information  for  each  CPU.
1011              The lscpu(1) command gathers its information from this file.
1012
1013       /proc/devices
1014              Text  listing  of  major numbers and device groups.  This can be
1015              used by MAKEDEV scripts for consistency with the kernel.
1016
1017       /proc/diskstats (since Linux 2.5.69)
1018              This file contains disk I/O statistics  for  each  disk  device.
1019              See  the  Linux kernel source file Documentation/iostats.txt for
1020              further information.
1021
1022       /proc/dma
1023              This is a list of the registered ISA DMA (direct memory  access)
1024              channels in use.
1025
1026       /proc/driver
1027              Empty subdirectory.
1028
1029       /proc/execdomains
1030              List of the execution domains (ABI personalities).
1031
1032       /proc/fb
1033              Frame buffer information when CONFIG_FB is defined during kernel
1034              compilation.
1035
1036       /proc/filesystems
1037              A text listing of the file systems which are  supported  by  the
1038              kernel,  namely file systems which were compiled into the kernel
1039              or  whose  kernel  modules  are  currently  loaded.   (See  also
1040              filesystems(5).)   If a file system is marked with "nodev", this
1041              means that it does not require a  block  device  to  be  mounted
1042              (e.g., virtual file system, network file system).
1043
1044              Incidentally,  this  file  may  be used by mount(8) when no file
1045              system is specified and it didn't manage to determine  the  file
1046              system type.  Then file systems contained in this file are tried
1047              (excepted those that are marked with "nodev").
1048
1049       /proc/fs
1050              Empty subdirectory.
1051
1052       /proc/ide
1053              This directory exists on systems with the IDE  bus.   There  are
1054              directories  for  each  IDE  channel and attached device.  Files
1055              include:
1056
1057                  cache              buffer size in KB
1058                  capacity           number of sectors
1059                  driver             driver version
1060                  geometry           physical and logical geometry
1061                  identify           in hexadecimal
1062                  media              media type
1063                  model              manufacturer's model number
1064                  settings           drive settings
1065                  smart_thresholds   in hexadecimal
1066                  smart_values       in hexadecimal
1067
1068              The hdparm(8) utility provides access to this information  in  a
1069              friendly format.
1070
1071       /proc/interrupts
1072              This  is  used to record the number of interrupts per CPU per IO
1073              device.  Since Linux 2.6.24, for the i386 and  x86_64  architec‐
1074              tures,  at  least, this also includes interrupts internal to the
1075              system (that is, not associated with a device as such), such  as
1076              NMI  (nonmaskable  interrupt),  LOC (local timer interrupt), and
1077              for SMP systems, TLB (TLB flush  interrupt),  RES  (rescheduling
1078              interrupt),  CAL  (remote function call interrupt), and possibly
1079              others.  Very easy to read formatting, done in ASCII.
1080
1081       /proc/iomem
1082              I/O memory map in Linux 2.4.
1083
1084       /proc/ioports
1085              This is a list of currently registered Input-Output port regions
1086              that are in use.
1087
1088       /proc/kallsyms (since Linux 2.5.71)
1089              This  holds  the  kernel exported symbol definitions used by the
1090              modules(X) tools to dynamically link and bind loadable  modules.
1091              In  Linux  2.5.47 and earlier, a similar file with slightly dif‐
1092              ferent syntax was named ksyms.
1093
1094       /proc/kcore
1095              This file represents the physical memory of the  system  and  is
1096              stored  in the ELF core file format.  With this pseudo-file, and
1097              an unstripped kernel (/usr/src/linux/vmlinux) binary, GDB can be
1098              used to examine the current state of any kernel data structures.
1099
1100              The  total  length  of  the  file is the size of physical memory
1101              (RAM) plus 4KB.
1102
1103       /proc/kmsg
1104              This file can be used instead of the syslog(2)  system  call  to
1105              read  kernel messages.  A process must have superuser privileges
1106              to read this file, and only one process should read  this  file.
1107              This  file  should  not  be  read if a syslog process is running
1108              which uses the syslog(2) system call facility to log kernel mes‐
1109              sages.
1110
1111              Information in this file is retrieved with the dmesg(1) program.
1112
1113       /proc/ksyms (Linux 1.1.23-2.5.47)
1114              See /proc/kallsyms.
1115
1116       /proc/loadavg
1117              The  first  three  fields  in this file are load average figures
1118              giving the number of jobs in the run queue (state R) or  waiting
1119              for disk I/O (state D) averaged over 1, 5, and 15 minutes.  They
1120              are the same as the load average numbers given by uptime(1)  and
1121              other  programs.  The fourth field consists of two numbers sepa‐
1122              rated by a slash (/).  The first of these is the number of  cur‐
1123              rently runnable kernel scheduling entities (processes, threads).
1124              The value after the slash is the  number  of  kernel  scheduling
1125              entities that currently exist on the system.  The fifth field is
1126              the PID of the process that was most  recently  created  on  the
1127              system.
1128
1129       /proc/locks
1130              This  file  shows current file locks (flock(2) and fcntl(2)) and
1131              leases (fcntl(2)).
1132
1133       /proc/malloc (only up to and including Linux 2.2)
1134              This file is present only  if  CONFIG_DEBUG_MALLOC  was  defined
1135              during compilation.
1136
1137       /proc/meminfo
1138              This  file  reports statistics about memory usage on the system.
1139              It is used by free(1) to report the amount of free and used mem‐
1140              ory (both physical and swap) on the system as well as the shared
1141              memory and buffers used by the kernel.  Each line  of  the  file
1142              consists  of a parameter name, followed by a colon, the value of
1143              the parameter, and an option unit of measurement  (e.g.,  "kB").
1144              The  list  below  describes  the  parameter names and the format
1145              specifier required to read the field  value.   Except  as  noted
1146              below,  all of the fields have been present since at least Linux
1147              2.6.0.  Some fileds are displayed only if the kernel was config‐
1148              ured  with  various options; those dependencies are noted in the
1149              list.
1150
1151              MemTotal %lu
1152                     Total usable RAM (i.e. physical RAM minus a few  reserved
1153                     bits and the kernel binary code).
1154
1155              MemFree %lu
1156                     The sum of LowFree+HighFree.
1157
1158              Buffers %lu
1159                     Relatively  temporary  storage  for  raw disk blocks that
1160                     shouldn't get tremendously large (20MB or so).
1161
1162              Cached %lu
1163                     In-memory cache for files read from the  disk  (the  page
1164                     cache).  Doesn't include SwapCached.
1165
1166              SwapCached %lu
1167                     Memory  that once was swapped out, is swapped back in but
1168                     still also is in the swap file.  (If memory  pressure  is
1169                     high,  these  pages  don't  need  to be swapped out again
1170                     because they are already in the swap  file.   This  saves
1171                     I/O.)
1172
1173              Active %lu
1174                     Memory  that  has been used more recently and usually not
1175                     reclaimed unless absolutely necessary.
1176
1177              Inactive %lu
1178                     Memory which has been less recently  used.   It  is  more
1179                     eligible to be reclaimed for other purposes.
1180
1181              Active(anon) %lu (since Linux 2.6.28)
1182                     [To be documented.]
1183
1184              Inactive(anon) %lu (since Linux 2.6.28)
1185                     [To be documented.]
1186
1187              Active(file) %lu (since Linux 2.6.28)
1188                     [To be documented.]
1189
1190              Inactive(file) %lu (since Linux 2.6.28)
1191                     [To be documented.]
1192
1193              Unevictable %lu (since Linux 2.6.28)
1194                     (From  Linux 2.6.28 to 2.6.30, CONFIG_UNEVICTABLE_LRU was
1195                     required.)  [To be documented.]
1196
1197              Mlocked %lu (since Linux 2.6.28)
1198                     (From Linux 2.6.28 to 2.6.30, CONFIG_UNEVICTABLE_LRU  was
1199                     required.)  [To be documented.]
1200
1201              HighTotal %lu
1202                     (Starting with Linux 2.6.19, CONFIG_HIGHMEM is required.)
1203                     Total amount of highmem.  Highmem  is  all  memory  above
1204                     ~860MB  of physical memory.  Highmem areas are for use by
1205                     user-space programs, or for the page cache.   The  kernel
1206                     must  use  tricks to access this memory, making it slower
1207                     to access than lowmem.
1208
1209              HighFree %lu
1210                     (Starting with Linux 2.6.19, CONFIG_HIGHMEM is required.)
1211                     Amount of free highmem.
1212
1213              LowTotal %lu
1214                     (Starting with Linux 2.6.19, CONFIG_HIGHMEM is required.)
1215                     Total amount of lowmem.  Lowmem is memory  which  can  be
1216                     used  for everything that highmem can be used for, but it
1217                     is also available for the kernel's use for its  own  data
1218                     structures.   Among many other things, it is where every‐
1219                     thing from Slab is allocated.   Bad  things  happen  when
1220                     you're out of lowmem.
1221
1222              LowFree %lu
1223                     (Starting with Linux 2.6.19, CONFIG_HIGHMEM is required.)
1224                     Amount of free lowmem.
1225
1226              MmapCopy %lu (since Linux 2.6.29)
1227                     (CONFIG_MMU is required.)  [To be documented.]
1228
1229              SwapTotal %lu
1230                     Total amount of swap space available.
1231
1232              SwapFree %lu
1233                     Amount of swap space that is currently unused.
1234
1235              Dirty %lu
1236                     Memory which is waiting to get written back to the disk.
1237
1238              Writeback %lu
1239                     Memory which is actively being written back to the disk.
1240
1241              AnonPages %lu (since Linux 2.6.18)
1242                     Non-file backed pages mapped into user-space page tables.
1243
1244              Mapped %lu
1245                     Files which have been mmaped, such as libraries.
1246
1247              Shmem %lu (since Linux 2.6.32)
1248                     [To be documented.]
1249
1250              Slab %lu
1251                     In-kernel data structures cache.
1252
1253              SReclaimable %lu (since Linux 2.6.19)
1254                     Part of Slab, that might be reclaimed, such as caches.
1255
1256              SUnreclaim %lu (since Linux 2.6.19)
1257                     Part of Slab, that cannot be reclaimed  on  memory  pres‐
1258                     sure.
1259
1260              KernelStack %lu (since Linux 2.6.32)
1261                     Amount of memory allocated to kernel stacks.
1262
1263              PageTables %lu (since Linux 2.6.18)
1264                     Amount  of  memory  dedicated to the lowest level of page
1265                     tables.
1266
1267              Quicklists %lu (since Linux 2.6.27)
1268                     (CONFIG_QUICKLIST is required.)  [To be documented.]
1269
1270              NFS_Unstable %lu (since Linux 2.6.18)
1271                     NFS pages sent to the server, but not  yet  committed  to
1272                     stable storage.
1273
1274              Bounce %lu (since Linux 2.6.18)
1275                     Memory used for block device "bounce buffers".
1276
1277              WritebackTmp %lu (since Linux 2.6.26)
1278                     Memory used by FUSE for temporary writeback buffers.
1279
1280              CommitLimit %lu (since Linux 2.6.10)
1281                     Based  on  the  overcommit ratio ('vm.overcommit_ratio'),
1282                     this is the total amount of  memory  currently  available
1283                     to  be allocated on the system.  This limit is adhered to
1284                     only if strict overcommit accounting is enabled  (mode  2
1285                     in  /proc/sys/vm/overcommit_ratio).   The  CommitLimit is
1286                     calculated using the following formula:
1287
1288                         CommitLimit = (overcommit_ratio  *  Physical  RAM)  +
1289                     Swap
1290
1291                     For example, on a system with 1GB of physical RAM and 7GB
1292                     of swap with  a  overcommit_ratio  of  30,  this  formula
1293                     yields a CommitLimit of 7.3GB.  For more details, see the
1294                     memory overcommit documentation in the kernel source file
1295                     Documentation/vm/overcommit-accounting.
1296
1297              Committed_AS %lu
1298                     The  amount  of memory presently allocated on the system.
1299                     The committed memory is a sum of all of the memory  which
1300                     has  been allocated by processes, even if it has not been
1301                     "used" by them as of yet.  A process which allocates  1GB
1302                     of  memory (using malloc(3) or similar), but touches only
1303                     300MB of that memory will show up as using only 300MB  of
1304                     memory even if it has the address space allocated for the
1305                     entire 1GB.  This 1GB is memory which has  been  "commit‐
1306                     ted"  to  by  the  VM  and can be used at any time by the
1307                     allocating application.  With strict  overcommit  enabled
1308                     on  the  system  (mode 2 /proc/sys/vm/overcommit_memory),
1309                     allocations which would exceed the CommitLimit  (detailed
1310                     above)  will  not  be  permitted.   This is useful if one
1311                     needs to guarantee that processes will not  fail  due  to
1312                     lack  of  memory  once  that memory has been successfully
1313                     allocated.
1314
1315              VmallocTotal %lu
1316                     Total size of vmalloc memory area.
1317
1318              VmallocUsed %lu
1319                     Amount of vmalloc area which is used.
1320
1321              VmallocChunk %lu
1322                     Largest contiguous block of vmalloc area which is free.
1323
1324              HardwareCorrupted %lu (since Linux 2.6.32)
1325                     (CONFIG_MEMORY_FAILURE is required.)  [To be documented.]
1326
1327              AnonHugePages %lu (since Linux 2.6.38)
1328                     (CONFIG_TRANSPARENT_HUGEPAGE  is   required.)    Non-file
1329                     backed huge pages mapped into user-space page tables.
1330
1331              HugePages_Total %lu
1332                     (CONFIG_HUGETLB_PAGE  is required.)  The size of the pool
1333                     of huge pages.
1334
1335              HugePages_Free %lu
1336                     (CONFIG_HUGETLB_PAGE is required.)  The  number  of  huge
1337                     pages in the pool that are not yet allocated.
1338
1339              HugePages_Rsvd %lu (since Linux 2.6.17)
1340                     (CONFIG_HUGETLB_PAGE is required.)  This is the number of
1341                     huge pages for which a commitment to  allocate  from  the
1342                     pool  has been made, but no allocation has yet been made.
1343                     These reserved huge pages guarantee that  an  application
1344                     will  be  able  to  allocate a huge page from the pool of
1345                     huge pages at fault time.
1346
1347              HugePages_Surp %lu (since Linux 2.6.24)
1348                     (CONFIG_HUGETLB_PAGE is required.)  This is the number of
1349                     huge   pages   in   the   pool   above   the   value   in
1350                     /proc/sys/vm/nr_hugepages.  The maximum number of surplus
1351                     huge  pages  is  controlled  by  /proc/sys/vm/nr_overcom‐
1352                     mit_hugepages.
1353
1354              Hugepagesize %lu
1355                     (CONFIG_HUGETLB_PAGE is  required.)   The  size  of  huge
1356                     pages.
1357
1358       /proc/modules
1359              A  text list of the modules that have been loaded by the system.
1360              See also lsmod(8).
1361
1362       /proc/mounts
1363              Before kernel 2.4.19, this file was a list of all the file  sys‐
1364              tems  currently mounted on the system.  With the introduction of
1365              per-process mount namespaces in Linux 2.4.19, this file became a
1366              link  to  /proc/self/mounts, which lists the mount points of the
1367              process's own mount namespace.  The format of this file is docu‐
1368              mented in fstab(5).
1369
1370       /proc/mtrr
1371              Memory  Type  Range Registers.  See the Linux kernel source file
1372              Documentation/mtrr.txt for details.
1373
1374       /proc/net
1375              various net pseudo-files, all of which give the status  of  some
1376              part  of the networking layer.  These files contain ASCII struc‐
1377              tures and are, therefore, readable with  cat(1).   However,  the
1378              standard  netstat(8) suite provides much cleaner access to these
1379              files.
1380
1381       /proc/net/arp
1382              This holds an ASCII readable dump of the kernel ARP  table  used
1383              for  address resolutions.  It will show both dynamically learned
1384              and preprogrammed ARP entries.  The format is:
1385
1386        IP address     HW type   Flags     HW address          Mask   Device
1387        192.168.0.50   0x1       0x2       00:50:BF:25:68:F3   *      eth0
1388        192.168.0.250  0x1       0xc       00:00:00:00:00:00   *      eth0
1389
1390              Here "IP address" is the IPv4 address of the machine and the "HW
1391              type"  is  the  hardware  type of the address from RFC 826.  The
1392              flags are the internal flags of the ARP structure (as defined in
1393              /usr/include/linux/if_arp.h)  and  the  "HW address" is the data
1394              link layer mapping for that IP address if it is known.
1395
1396       /proc/net/dev
1397              The dev pseudo-file contains network device status  information.
1398              This  gives  the number of received and sent packets, the number
1399              of errors and collisions and other basic statistics.  These  are
1400              used  by  the  ifconfig(8) program to report device status.  The
1401              format is:
1402
1403 Inter-|   Receive                                                |  Transmit
1404  face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
1405     lo: 2776770   11307    0    0    0     0          0         0  2776770   11307    0    0    0     0       0          0
1406   eth0: 1215645    2751    0    0    0     0          0         0  1782404    4324    0    0    0   427       0          0
1407   ppp0: 1622270    5552    1    0    0     0          0         0   354130    5669    0    0    0     0       0          0
1408   tap0:    7714      81    0    0    0     0          0         0     7714      81    0    0    0     0       0          0
1409
1410       /proc/net/dev_mcast
1411              Defined in /usr/src/linux/net/core/dev_mcast.c:
1412                   indx interface_name  dmi_u dmi_g dmi_address
1413                   2    eth0            1     0     01005e000001
1414                   3    eth1            1     0     01005e000001
1415                   4    eth2            1     0     01005e000001
1416
1417       /proc/net/igmp
1418              Internet    Group    Management    Protocol.      Defined     in
1419              /usr/src/linux/net/core/igmp.c.
1420
1421       /proc/net/rarp
1422              This  file uses the same format as the arp file and contains the
1423              current reverse mapping database used to provide rarp(8) reverse
1424              address  lookup  services.   If  RARP is not configured into the
1425              kernel, this file will not be present.
1426
1427       /proc/net/raw
1428              Holds a dump of the RAW socket table.  Much of  the  information
1429              is  not of use apart from debugging.  The "sl" value is the ker‐
1430              nel hash slot for the socket, the "local_address" is  the  local
1431              address  and  protocol number pair.  "St" is the internal status
1432              of the socket.  The "tx_queue" and "rx_queue" are  the  outgoing
1433              and  incoming  data  queue in terms of kernel memory usage.  The
1434              "tr", "tm->when", and "rexmits" fields are not used by RAW.  The
1435              "uid"  field  holds  the  effective  UID  of  the creator of the
1436              socket.
1437
1438       /proc/net/snmp
1439              This file holds the ASCII data needed for the IP, ICMP, TCP, and
1440              UDP management information bases for an SNMP agent.
1441
1442       /proc/net/tcp
1443              Holds  a  dump of the TCP socket table.  Much of the information
1444              is not of use apart from debugging.  The "sl" value is the  ker‐
1445              nel  hash  slot for the socket, the "local_address" is the local
1446              address and port number pair.  The "rem_address" is  the  remote
1447              address and port number pair (if connected).  "St" is the inter‐
1448              nal status of the socket.  The "tx_queue" and "rx_queue" are the
1449              outgoing  and  incoming  data  queue  in  terms of kernel memory
1450              usage.  The "tr", "tm->when", and "rexmits" fields hold internal
1451              information  of  the kernel socket state and are only useful for
1452              debugging.  The "uid" field holds the effective UID of the  cre‐
1453              ator of the socket.
1454
1455       /proc/net/udp
1456              Holds  a  dump of the UDP socket table.  Much of the information
1457              is not of use apart from debugging.  The "sl" value is the  ker‐
1458              nel  hash  slot for the socket, the "local_address" is the local
1459              address and port number pair.  The "rem_address" is  the  remote
1460              address  and port number pair (if connected). "St" is the inter‐
1461              nal status of the socket.  The "tx_queue" and "rx_queue" are the
1462              outgoing  and  incoming  data  queue  in  terms of kernel memory
1463              usage.  The "tr", "tm->when", and "rexmits" fields are not  used
1464              by  UDP.  The "uid" field holds the effective UID of the creator
1465              of the socket.  The format is:
1466
1467 sl  local_address rem_address   st tx_queue rx_queue tr rexmits  tm->when uid
1468  1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1469  1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1470  1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0
1471
1472       /proc/net/unix
1473              Lists the UNIX domain sockets  present  within  the  system  and
1474              their status.  The format is:
1475              Num RefCount Protocol Flags    Type St Path
1476               0: 00000002 00000000 00000000 0001 03
1477               1: 00000001 00000000 00010000 0001 01 /dev/printer
1478
1479              Here  "Num"  is  the kernel table slot number, "RefCount" is the
1480              number of users of the socket, "Protocol" is currently always 0,
1481              "Flags"  represent  the internal kernel flags holding the status
1482              of the socket.  Currently, type is always "1" (UNIX domain data‐
1483              gram  sockets are not yet supported in the kernel).  "St" is the
1484              internal state of the socket and Path is the bound path (if any)
1485              of the socket.
1486
1487       /proc/partitions
1488              Contains  major  and  minor numbers of each partition as well as
1489              number of blocks and partition name.
1490
1491       /proc/pci
1492              This is a listing of all PCI devices found  during  kernel  ini‐
1493              tialization and their configuration.
1494
1495              This  file has been deprecated in favor of a new /proc interface
1496              for PCI  (/proc/bus/pci).   It  became  optional  in  Linux  2.2
1497              (available  with CONFIG_PCI_OLD_PROC set at kernel compilation).
1498              It became once more nonoptionally enabled in Linux  2.4.   Next,
1499              it  was  deprecated  in  Linux  2.6  (still  available with CON‐
1500              FIG_PCI_LEGACY_PROC set), and finally removed  altogether  since
1501              Linux 2.6.17.
1502
1503       /proc/profile (since Linux 2.4)
1504              This file is present only if the kernel was booted with the pro‐
1505              file=1 command-line option.  It exposes kernel profiling  infor‐
1506              mation  in  a  binary format for use by readprofile(1).  Writing
1507              (e.g., an empty string) to this file resets the profiling  coun‐
1508              ters; on some architectures, writing a binary integer "profiling
1509              multiplier" of size sizeof(int)  sets  the  profiling  interrupt
1510              frequency.
1511
1512       /proc/scsi
1513              A directory with the scsi mid-level pseudo-file and various SCSI
1514              low-level driver directories, which contain a file for each SCSI
1515              host  in  this system, all of which give the status of some part
1516              of the SCSI IO subsystem.  These files contain ASCII  structures
1517              and are, therefore, readable with cat(1).
1518
1519              You  can also write to some of the files to reconfigure the sub‐
1520              system or switch certain features on or off.
1521
1522       /proc/scsi/scsi
1523              This is a listing of all SCSI devices known to the kernel.   The
1524              listing  is  similar  to  the one seen during bootup.  scsi cur‐
1525              rently supports only the add-single-device command which  allows
1526              root to add a hotplugged device to the list of known devices.
1527
1528              The command
1529
1530                  echo 'scsi add-single-device 1 0 5 0' > /proc/scsi/scsi
1531
1532              will  cause host scsi1 to scan on SCSI channel 0 for a device on
1533              ID 5 LUN 0.  If there is already a device known on this  address
1534              or the address is invalid, an error will be returned.
1535
1536       /proc/scsi/[drivername]
1537              [drivername]  can  currently  be  NCR53c7xx,  aha152x,  aha1542,
1538              aha1740, aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000,
1539              pas16,  qlogic,  scsi_debug, seagate, t128, u15-24f, ultrastore,
1540              or wd7000.  These directories show up for all drivers that  reg‐
1541              istered  at  least  one  SCSI HBA.  Every directory contains one
1542              file per registered host.  Every host-file is  named  after  the
1543              number the host was assigned during initialization.
1544
1545              Reading these files will usually show driver and host configura‐
1546              tion, statistics, etc.
1547
1548              Writing to these files  allows  different  things  on  different
1549              hosts.   For  example,  with the latency and nolatency commands,
1550              root can switch on and off command latency measurement  code  in
1551              the  eata_dma driver.  With the lockup and unlock commands, root
1552              can control bus lockups simulated by the scsi_debug driver.
1553
1554       /proc/self
1555              This directory refers to the process accessing  the  /proc  file
1556              system,  and  is  identical  to the /proc directory named by the
1557              process ID of the same process.
1558
1559       /proc/slabinfo
1560              Information about kernel caches.  Since Linux 2.6.16  this  file
1561              is  present  only if the CONFIG_SLAB kernel configuration option
1562              is enabled.  The columns in /proc/slabinfo are:
1563
1564                  cache-name
1565                  num-active-objs
1566                  total-objs
1567                  object-size
1568                  num-active-slabs
1569                  total-slabs
1570                  num-pages-per-slab
1571
1572              See slabinfo(5) for details.
1573
1574       /proc/stat
1575              kernel/system statistics.   Varies  with  architecture.   Common
1576              entries include:
1577
1578              cpu  3357 0 4313 1362393
1579                     The   amount  of  time,  measured  in  units  of  USER_HZ
1580                     (1/100ths  of  a  second  on  most   architectures,   use
1581                     sysconf(_SC_CLK_TCK) to obtain the right value), that the
1582                     system spent in various states:
1583
1584                     user   (1) Time spent in user mode.
1585
1586                     nice   (2) Time spent in  user  mode  with  low  priority
1587                            (nice).
1588
1589                     system (3) Time spent in system mode.
1590
1591                     idle   (4)  Time  spent  in  the  idle  task.  This value
1592                            should be USER_HZ times the second  entry  in  the
1593                            /proc/uptime pseudo-file.
1594
1595                     iowait (since Linux 2.5.41)
1596                            (5) Time waiting for I/O to complete.
1597
1598                     irq (since Linux 2.6.0-test4)
1599                            (6) Time servicing interrupts.
1600
1601                     softirq (since Linux 2.6.0-test4)
1602                            (7) Time servicing softirqs.
1603
1604                     steal (since Linux 2.6.11)
1605                            (8)  Stolen time, which is the time spent in other
1606                            operating systems when running  in  a  virtualized
1607                            environment
1608
1609                     guest (since Linux 2.6.24)
1610                            (9)  Time  spent  running  a virtual CPU for guest
1611                            operating systems under the control of  the  Linux
1612                            kernel.
1613
1614                     guest_nice (since Linux 2.6.33)
1615                            (10) Time spent running a niced guest (virtual CPU
1616                            for guest operating systems under the  control  of
1617                            the Linux kernel).
1618
1619              page 5741 1808
1620                     The  number  of  pages the system paged in and the number
1621                     that were paged out (from disk).
1622
1623              swap 1 0
1624                     The number of swap pages that have been  brought  in  and
1625                     out.
1626
1627              intr 1462898
1628                     This  line shows counts of interrupts serviced since boot
1629                     time, for each of the possible  system  interrupts.   The
1630                     first  column  is  the  total of all interrupts serviced;
1631                     each subsequent column is  the  total  for  a  particular
1632                     interrupt.
1633
1634              disk_io: (2,0):(31,30,5764,1,2) (3,0):...
1635                     (major,disk_idx):(noinfo,     read_io_ops,     blks_read,
1636                     write_io_ops, blks_written)
1637                     (Linux 2.4 only)
1638
1639              ctxt 115315
1640                     The number of context switches that the system underwent.
1641
1642              btime 769041601
1643                     boot  time,  in  seconds  since  the  Epoch,   1970-01-01
1644                     00:00:00 +0000 (UTC).
1645
1646              processes 86031
1647                     Number of forks since boot.
1648
1649              procs_running 6
1650                     Number  of  processes  in  runnable state.  (Linux 2.5.45
1651                     onward.)
1652
1653              procs_blocked 2
1654                     Number of processes blocked waiting for I/O to  complete.
1655                     (Linux 2.5.45 onward.)
1656
1657       /proc/swaps
1658              Swap areas in use.  See also swapon(8).
1659
1660       /proc/sys
1661              This directory (present since 1.3.57) contains a number of files
1662              and subdirectories corresponding  to  kernel  variables.   These
1663              variables  can  be  read  and sometimes modified using the /proc
1664              file system, and the (deprecated) sysctl(2) system call.
1665
1666       /proc/sys/abi (since Linux 2.4.10)
1667              This directory may contain files with application binary  infor‐
1668              mation.    See   the   Linux   kernel   source  file  Documenta‐
1669              tion/sysctl/abi.txt for more information.
1670
1671       /proc/sys/debug
1672              This directory may be empty.
1673
1674       /proc/sys/dev
1675              This  directory  contains  device-specific  information   (e.g.,
1676              dev/cdrom/info).  On some systems, it may be empty.
1677
1678       /proc/sys/fs
1679              This  directory contains the files and subdirectories for kernel
1680              variables related to file systems.
1681
1682       /proc/sys/fs/binfmt_misc
1683              Documentation for files in this directory can be  found  in  the
1684              Linux kernel sources in Documentation/binfmt_misc.txt.
1685
1686       /proc/sys/fs/dentry-state (since Linux 2.2)
1687              This file contains information about the status of the directory
1688              cache (dcache).   The  file  contains  six  numbers,  nr_dentry,
1689              nr_unused,   age_limit   (age  in  seconds),  want_pages  (pages
1690              requested by system) and two dummy values.
1691
1692              * nr_dentry  is  the  number  of  allocated   dentries   (dcache
1693                entries).  This field is unused in Linux 2.2.
1694
1695              * nr_unused is the number of unused dentries.
1696
1697              * age_limit is the age in seconds after which dcache entries can
1698                be reclaimed when memory is short.
1699
1700              * want_pages   is   nonzero   when   the   kernel   has   called
1701                shrink_dcache_pages() and the dcache isn't pruned yet.
1702
1703       /proc/sys/fs/dir-notify-enable
1704              This file can be used to disable or enable the dnotify interface
1705              described in fcntl(2) on a system-wide basis.  A value of  0  in
1706              this file disables the interface, and a value of 1 enables it.
1707
1708       /proc/sys/fs/dquot-max
1709              This file shows the maximum number of cached disk quota entries.
1710              On some (2.4) systems, it is not present.  If the number of free
1711              cached  disk quota entries is very low and you have some awesome
1712              number of simultaneous system users, you might want to raise the
1713              limit.
1714
1715       /proc/sys/fs/dquot-nr
1716              This  file  shows the number of allocated disk quota entries and
1717              the number of free disk quota entries.
1718
1719       /proc/sys/fs/epoll (since Linux 2.6.28)
1720              This directory contains the file max_user_watches, which can  be
1721              used  to limit the amount of kernel memory consumed by the epoll
1722              interface.  For further details, see epoll(7).
1723
1724       /proc/sys/fs/file-max
1725              This file defines a system-wide limit  on  the  number  of  open
1726              files  for  all processes.  (See also setrlimit(2), which can be
1727              used by a process to set the per-process  limit,  RLIMIT_NOFILE,
1728              on  the  number of files it may open.)  If you get lots of error
1729              messages in the kernel log about running  out  of  file  handles
1730              (look  for "VFS: file-max limit <number> reached"), try increas‐
1731              ing this value:
1732
1733                  echo 100000 > /proc/sys/fs/file-max
1734
1735              The kernel constant NR_OPEN imposes an upper limit on the  value
1736              that may be placed in file-max.
1737
1738              If  you  increase  /proc/sys/fs/file-max,  be  sure  to increase
1739              /proc/sys/fs/inode-max  to  3-4   times   the   new   value   of
1740              /proc/sys/fs/file-max, or you will run out of inodes.
1741
1742              Privileged  processes  (CAP_SYS_ADMIN) can override the file-max
1743              limit.
1744
1745       /proc/sys/fs/file-nr
1746              This (read-only) file contains  three  numbers:  the  number  of
1747              allocated  file  handles  (i.e.,  the  number of files presently
1748              opened); the number of free file handles; and the maximum number
1749              of file handles (i.e., the same value as /proc/sys/fs/file-max).
1750              If the number of allocated file handles is close to the maximum,
1751              you  should  consider increasing the maximum.  Before Linux 2.6,
1752              the kernel allocated file handles  dynamically,  but  it  didn't
1753              free  them  again.  Instead the free file handles were kept in a
1754              list for reallocation; the "free file handles"  value  indicates
1755              the  size  of  that  list.   A large number of free file handles
1756              indicates that there was a past peak in the usage of  open  file
1757              handles.  Since Linux 2.6, the kernel does deallocate freed file
1758              handles, and the "free file handles" value is always zero.
1759
1760       /proc/sys/fs/inode-max
1761              This file contains the maximum number of in-memory  inodes.   On
1762              some (2.4) systems, it may not be present.  This value should be
1763              3-4 times larger than the value in file-max, since stdin, stdout
1764              and network sockets also need an inode to handle them.  When you
1765              regularly run out of inodes, you need to increase this value.
1766
1767       /proc/sys/fs/inode-nr
1768              This file contains the first two values from inode-state.
1769
1770       /proc/sys/fs/inode-state
1771              This file contains  seven  numbers:  nr_inodes,  nr_free_inodes,
1772              preshrink,  and  four  dummy values.  nr_inodes is the number of
1773              inodes the system has allocated.  This can be slightly more than
1774              inode-max  because Linux allocates them one page full at a time.
1775              nr_free_inodes represents the number of free inodes.   preshrink
1776              is  nonzero  when the nr_inodes > inode-max and the system needs
1777              to prune the inode list instead of allocating more.
1778
1779       /proc/sys/fs/inotify (since Linux 2.6.13)
1780              This     directory     contains     files     max_queued_events,
1781              max_user_instances,  and  max_user_watches,  that can be used to
1782              limit the amount of kernel memory consumed by the inotify inter‐
1783              face.  For further details, see inotify(7).
1784
1785       /proc/sys/fs/lease-break-time
1786              This file specifies the grace period that the kernel grants to a
1787              process holding a file lease (fcntl(2)) after it has sent a sig‐
1788              nal to that process notifying it that another process is waiting
1789              to open the file.  If the lease holder does not remove or  down‐
1790              grade  the  lease  within this grace period, the kernel forcibly
1791              breaks the lease.
1792
1793       /proc/sys/fs/leases-enable
1794              This  file  can  be  used  to  enable  or  disable  file  leases
1795              (fcntl(2))  on  a  system-wide basis.  If this file contains the
1796              value 0, leases are disabled.  A nonzero value enables leases.
1797
1798       /proc/sys/fs/mqueue (since Linux 2.6.6)
1799              This  directory  contains  files   msg_max,   msgsize_max,   and
1800              queues_max,  controlling  the  resources  used  by POSIX message
1801              queues.  See mq_overview(7) for details.
1802
1803       /proc/sys/fs/overflowgid and /proc/sys/fs/overflowuid
1804              These files allow you to change the value of the fixed  UID  and
1805              GID.   The  default  is  65534.   Some file systems support only
1806              16-bit UIDs and GIDs, although in Linux UIDs  and  GIDs  are  32
1807              bits.   When  one  of  these file systems is mounted with writes
1808              enabled, any UID or GID that would exceed 65535 is translated to
1809              the overflow value before being written to disk.
1810
1811       /proc/sys/fs/pipe-max-size (since Linux 2.6.35)
1812              The  value  in  this file defines an upper limit for raising the
1813              capacity of a pipe using the  fcntl(2)  F_SETPIPE_SZ  operation.
1814              This  limit applies only to unprivileged processes.  The default
1815              value for this file is 1,048,576.  The value  assigned  to  this
1816              file  may  be  rounded  upward,  to  reflect  the value actually
1817              employed for a  convenient  implementation.   To  determine  the
1818              rounded-up  value,  display  the  contents  of  this  file after
1819              assigning a value to it.  The minimum value that can be assigned
1820              to this file is the system page size.
1821
1822       /proc/sys/fs/protected_hardlinks (since Linux 3.6)
1823              When  the value in this file is 0, no restrictions are placed on
1824              the creation of hard links (i.e., this is the historical  behav‐
1825              iour  before  Linux  3.6).   When the value in this file is 1, a
1826              hard link can be created to a target file only  if  one  of  the
1827              following conditions is true:
1828
1829              *  The caller has the CAP_FOWNER capability.
1830
1831              *  The  file system UID of the process creating the link matches
1832                 the owner (UID) of the target file (as described  in  creden‐
1833                 tials(7), a process's file system UID is normally the same as
1834                 its effective UID).
1835
1836              *  All of the following conditions are true:
1837
1838                  ·  the target is a regular file;
1839
1840                  ·  the target file does not have its set-user-ID  permission
1841                     bit enabled;
1842
1843                  ·  the  target  file does not have both its set-group-ID and
1844                     group-executable permission bits enabled; and
1845
1846                  ·  the caller has permission to read and  write  the  target
1847                     file  (either  via the file's permissions mask or because
1848                     it has suitable capabilities).
1849
1850              The default value in this file is 0.  Setting  the  value  to  1
1851              prevents a longstanding class of security issues caused by hard-
1852              link-based time-of-check, time-of-use races, most commonly  seen
1853              in  world-writable  directories such as /tmp.  The common method
1854              of exploiting this flaw is to cross  privilege  boundaries  when
1855              following a given hard link (i.e., a root process follows a hard
1856              link created by another user).  Additionally, on systems without
1857              separated  partitions,  this stops unauthorized users from "pin‐
1858              ning" vulnerable  set-user-ID  and  set-group-ID  files  against
1859              being  upgraded  by  the  administrator,  or  linking to special
1860              files.
1861
1862       /proc/sys/fs/protected_symlinks (since Linux 3.6)
1863              When the value in this file is 0, no restrictions are placed  on
1864              following symbolic links (i.e., this is the historical behaviour
1865              before Linux 3.6).  When the value in this file is  1,  symbolic
1866              links are followed only in the following circumstances:
1867
1868              *  the file system UID of the process following the link matches
1869                 the owner (UID) of the symbolic link (as described in creden‐
1870                 tials(7), a process's file system UID is normally the same as
1871                 its effective UID);
1872
1873              *  the link is not in a sticky world-writable directory; or
1874
1875              *  the symbolic link and and its parent directory have the  same
1876                 owner (UID)
1877
1878              A  system  call  that fails to follow a symbolic link because of
1879              the above restrictions returns the error EACCES in errno.
1880
1881              The default value in this file is 0.  Setting  the  value  to  1
1882              avoids a longstanding class of security issues based on time-of-
1883              check, time-of-use races when accessing symbolic links.
1884
1885       /proc/sys/fs/suid_dumpable (since Linux 2.6.13)
1886              The value in this file determines whether core  dump  files  are
1887              produced  for  set-user-ID  or otherwise protected/tainted bina‐
1888              ries.  Three different integer values can be specified:
1889
1890              0 (default)
1891                     This provides the traditional (pre-Linux  2.6.13)  behav‐
1892                     ior.   A  core  dump  will  not be produced for a process
1893                     which has changed  credentials  (by  calling  seteuid(2),
1894                     setgid(2),  or  similar, or by executing a set-user-ID or
1895                     set-group-ID program) or whose binary does not have  read
1896                     permission enabled.
1897
1898              1 ("debug")
1899                     All  processes dump core when possible.  The core dump is
1900                     owned by the file system user ID of the  dumping  process
1901                     and  no security is applied.  This is intended for system
1902                     debugging situations only.  Ptrace is unchecked.
1903
1904              2 ("suidsafe")
1905                     Any binary which normally would not be  dumped  (see  "0"
1906                     above)  is dumped readable by root only.  This allows the
1907                     user to remove the core dump file but  not  to  read  it.
1908                     For  security  reasons  core  dumps in this mode will not
1909                     overwrite one another  or  other  files.   This  mode  is
1910                     appropriate  when  administrators are attempting to debug
1911                     problems in a normal environment.
1912
1913                     Additionally, since Linux 3.6, /proc/sys/kernel/core_pat‐
1914                     tern  must  either be an absolute pathname or a pipe com‐
1915                     mand, as detailed in core(5).  Warnings will  be  written
1916                     to  the  kernel log if core_pattern does not follow these
1917                     rules, and no core dump will be produced.
1918
1919       /proc/sys/fs/super-max
1920              This file controls the maximum number of superblocks,  and  thus
1921              the  maximum number of mounted file systems the kernel can have.
1922              You need increase only super-max if you need to mount more  file
1923              systems than the current value in super-max allows you to.
1924
1925       /proc/sys/fs/super-nr
1926              This file contains the number of file systems currently mounted.
1927
1928       /proc/sys/kernel
1929              This  directory  contains  files  controlling  a range of kernel
1930              parameters, as described below.
1931
1932       /proc/sys/kernel/acct
1933              This file contains three numbers: highwater, lowwater, and  fre‐
1934              quency.  If BSD-style process accounting is enabled these values
1935              control its behavior.  If free space on file  system  where  the
1936              log  lives  goes below lowwater percent accounting suspends.  If
1937              free space gets  above  highwater  percent  accounting  resumes.
1938              frequency  determines  how often the kernel checks the amount of
1939              free space (value is in seconds).  Default values are 4,  2  and
1940              30.   That  is,  suspend accounting if 2% or less space is free;
1941              resume it if 4% or more  space  is  free;  consider  information
1942              about amount of free space valid for 30 seconds.
1943
1944       /proc/sys/kernel/cap_last_cap (since Linux 3.2)
1945              See capabilities(7).
1946
1947       /proc/sys/kernel/cap-bound (from Linux 2.2 to 2.6.24)
1948              This  file holds the value of the kernel capability bounding set
1949              (expressed as a signed  decimal  number).   This  set  is  ANDed
1950              against   the   capabilities   permitted  to  a  process  during
1951              execve(2).  Starting with Linux 2.6.25, the system-wide capabil‐
1952              ity  bounding  set disappeared, and was replaced by a per-thread
1953              bounding set; see capabilities(7).
1954
1955       /proc/sys/kernel/core_pattern
1956              See core(5).
1957
1958       /proc/sys/kernel/core_uses_pid
1959              See core(5).
1960
1961       /proc/sys/kernel/ctrl-alt-del
1962              This file controls the handling of Ctrl-Alt-Del  from  the  key‐
1963              board.   When  the  value  in  this  file  is 0, Ctrl-Alt-Del is
1964              trapped and sent to the init(8) program  to  handle  a  graceful
1965              restart.   When the value is greater than zero, Linux's reaction
1966              to a Vulcan Nerve Pinch (tm) will be an immediate reboot,  with‐
1967              out  even syncing its dirty buffers.  Note: when a program (like
1968              dosemu) has the keyboard in  "raw"  mode,  the  ctrl-alt-del  is
1969              intercepted by the program before it ever reaches the kernel tty
1970              layer, and it's up to the program to decide what to do with it.
1971
1972       /proc/sys/kernel/dmesg_restrict (since Linux 2.6.37)
1973              The value in this file determines who can see kernel syslog con‐
1974              tents.   A  value of 0 in this file imposes no restrictions.  If
1975              the value is 1, only privileged users can read the  kernel  sys‐
1976              log.   (See  syslog(2) for more details.)  Since Linux 3.4, only
1977              users with the CAP_SYS_ADMIN capability may change the value  in
1978              this file.
1979
1980       /proc/sys/kernel/domainname and /proc/sys/kernel/hostname
1981              can  be  used  to  set the NIS/YP domainname and the hostname of
1982              your box in exactly the same way as the  commands  domainname(1)
1983              and hostname(1), that is:
1984
1985                  # echo 'darkstar' > /proc/sys/kernel/hostname
1986                  # echo 'mydomain' > /proc/sys/kernel/domainname
1987
1988              has the same effect as
1989
1990                  # hostname 'darkstar'
1991                  # domainname 'mydomain'
1992
1993              Note,  however, that the classic darkstar.frop.org has the host‐
1994              name "darkstar" and DNS (Internet Domain Name Server) domainname
1995              "frop.org", not to be confused with the NIS (Network Information
1996              Service) or YP (Yellow  Pages)  domainname.   These  two  domain
1997              names  are  in general different.  For a detailed discussion see
1998              the hostname(1) man page.
1999
2000       /proc/sys/kernel/hotplug
2001              This file contains the path for the hotplug policy  agent.   The
2002              default value in this file is /sbin/hotplug.
2003
2004       /proc/sys/kernel/htab-reclaim
2005              (PowerPC  only) If this file is set to a nonzero value, the Pow‐
2006              erPC htab (see kernel  file  Documentation/powerpc/ppc_htab.txt)
2007              is pruned each time the system hits the idle loop.
2008
2009       /proc/sys/kernel/kptr_restrict (since Linux 2.6.38)
2010              The  value  in this file determines whether kernel addresses are
2011              exposed via /proc files and other interfaces.  A value of  0  in
2012              this  file  imposes  no restrictions.  If the value is 1, kernel
2013              pointers printed using the %pK format specifier will be replaced
2014              with  zeros  unless  the user has the CAP_SYSLOG capability.  If
2015              the value is 2, kernel pointers printed  using  the  %pK  format
2016              specifier  will  be replaced with zeros regardless of the user's
2017              capabilities.  The initial default value for this  file  was  1,
2018              but  the  default was changed to 0 in Linux 2.6.39.  Since Linux
2019              3.4, only users with the CAP_SYS_ADMIN capability can change the
2020              value in this file.
2021
2022       /proc/sys/kernel/l2cr
2023              (PowerPC  only)  This  file contains a flag that controls the L2
2024              cache of G3 processor boards.  If  0,  the  cache  is  disabled.
2025              Enabled if nonzero.
2026
2027       /proc/sys/kernel/modprobe
2028              This  file  contains the path for the kernel module loader.  The
2029              default value is /sbin/modprobe.  The file is  present  only  if
2030              the  kernel  is  built  with  the CONFIG_MODULES (CONFIG_KMOD in
2031              Linux 2.6.26 and earlier) option enabled.  It  is  described  by
2032              the  Linux  kernel  source  file Documentation/kmod.txt (present
2033              only in kernel 2.4 and earlier).
2034
2035       /proc/sys/kernel/modules_disabled (since Linux 2.6.31)
2036              A toggle value indicating if modules are allowed to be loaded in
2037              an  otherwise  modular kernel.  This toggle defaults to off (0),
2038              but can be set true (1).  Once  true,  modules  can  be  neither
2039              loaded nor unloaded, and the toggle cannot be set back to false.
2040              The file is present only if the kernel is built  with  the  CON‐
2041              FIG_MODULES option enabled.
2042
2043       /proc/sys/kernel/msgmax
2044              This  file  defines  a  system-wide limit specifying the maximum
2045              number of bytes in a single message written on a System  V  mes‐
2046              sage queue.
2047
2048       /proc/sys/kernel/msgmni (since Linux 2.4)
2049              This file defines the system-wide limit on the number of message
2050              queue identifiers.
2051
2052       /proc/sys/kernel/msgmnb
2053              This file defines a system-wide parameter used to initialize the
2054              msg_qbytes setting for subsequently created message queues.  The
2055              msg_qbytes setting specifies the maximum number  of  bytes  that
2056              may be written to the message queue.
2057
2058       /proc/sys/kernel/ostype and /proc/sys/kernel/osrelease
2059              These files give substrings of /proc/version.
2060
2061       /proc/sys/kernel/overflowgid and /proc/sys/kernel/overflowuid
2062              These  files  duplicate  the  files /proc/sys/fs/overflowgid and
2063              /proc/sys/fs/overflowuid.
2064
2065       /proc/sys/kernel/panic
2066              This  file  gives  read/write  access  to  the  kernel  variable
2067              panic_timeout.   If  this  is  zero,  the  kernel will loop on a
2068              panic; if nonzero it indicates that the kernel should autoreboot
2069              after  this number of seconds.  When you use the software watch‐
2070              dog device driver, the recommended setting is 60.
2071
2072       /proc/sys/kernel/panic_on_oops (since Linux 2.5.68)
2073              This file controls the kernel's behavior when an oops or BUG  is
2074              encountered.   If this file contains 0, then the system tries to
2075              continue operation.  If it contains 1, then the system delays  a
2076              few  seconds  (to give klogd time to record the oops output) and
2077              then panics.  If the /proc/sys/kernel/panic file is also nonzero
2078              then the machine will be rebooted.
2079
2080       /proc/sys/kernel/pid_max (since Linux 2.5.34)
2081              This  file  specifies the value at which PIDs wrap around (i.e.,
2082              the value in this file is one greater  than  the  maximum  PID).
2083              The  default  value  for  this  file, 32768, results in the same
2084              range of PIDs as on earlier kernels.  On 32-bit platforms, 32768
2085              is  the  maximum  value for pid_max.  On 64-bit systems, pid_max
2086              can be set to any value up to 2^22 (PID_MAX_LIMIT, approximately
2087              4 million).
2088
2089       /proc/sys/kernel/powersave-nap (PowerPC only)
2090              This file contains a flag.  If set, Linux-PPC will use the "nap"
2091              mode of powersaving, otherwise the "doze" mode will be used.
2092
2093       /proc/sys/kernel/printk
2094              The four values in this file are console_loglevel,  default_mes‐
2095              sage_loglevel,     minimum_console_level,    and    default_con‐
2096              sole_loglevel.  These values influence  printk()  behavior  when
2097              printing or logging error messages.  See syslog(2) for more info
2098              on the different loglevels.  Messages  with  a  higher  priority
2099              than  console_loglevel will be printed to the console.  Messages
2100              without an explicit  priority  will  be  printed  with  priority
2101              default_message_level.   minimum_console_loglevel is the minimum
2102              (highest)  value  to  which   console_loglevel   can   be   set.
2103              default_console_loglevel   is   the   default   value  for  con‐
2104              sole_loglevel.
2105
2106       /proc/sys/kernel/pty (since Linux 2.6.4)
2107              This directory contains two files relating to the number of UNIX
2108              98 pseudoterminals (see pts(4)) on the system.
2109
2110       /proc/sys/kernel/pty/max
2111              This file defines the maximum number of pseudoterminals.
2112
2113       /proc/sys/kernel/pty/nr
2114              This  read-only file indicates how many pseudoterminals are cur‐
2115              rently in use.
2116
2117       /proc/sys/kernel/random
2118              This directory contains various parameters controlling the oper‐
2119              ation of the file /dev/random.  See random(4) for further infor‐
2120              mation.
2121
2122       /proc/sys/kernel/real-root-dev
2123              This file is documented in the Linux kernel source file Documen‐
2124              tation/initrd.txt.
2125
2126       /proc/sys/kernel/reboot-cmd (Sparc only)
2127              This  file  seems  to  be a way to give an argument to the SPARC
2128              ROM/Flash boot loader.  Maybe  to  tell  it  what  to  do  after
2129              rebooting?
2130
2131       /proc/sys/kernel/rtsig-max
2132              (Only  in  kernels  up to and including 2.6.7; see setrlimit(2))
2133              This file can be used to tune the maximum number of POSIX  real-
2134              time (queued) signals that can be outstanding in the system.
2135
2136       /proc/sys/kernel/rtsig-nr
2137              (Only  in  kernels  up to and including 2.6.7.)  This file shows
2138              the number POSIX real-time signals currently queued.
2139
2140       /proc/sys/kernel/sched_rr_timeslice_ms (since Linux 3.9)
2141              See sched_rr_get_interval(2).
2142
2143       /proc/sys/kernel/sem (since Linux 2.4)
2144              This file contains 4 numbers defining limits for  System  V  IPC
2145              semaphores.  These fields are, in order:
2146
2147              SEMMSL  The maximum semaphores per semaphore set.
2148
2149              SEMMNS  A  system-wide  limit on the number of semaphores in all
2150                      semaphore sets.
2151
2152              SEMOPM  The maximum number of operations that may  be  specified
2153                      in a semop(2) call.
2154
2155              SEMMNI  A  system-wide  limit on the maximum number of semaphore
2156                      identifiers.
2157
2158       /proc/sys/kernel/sg-big-buff
2159              This file shows the size of the generic SCSI device (sg) buffer.
2160              You  can't  tune it just yet, but you could change it at compile
2161              time by editing include/scsi/sg.h  and  changing  the  value  of
2162              SG_BIG_BUFF.   However,  there shouldn't be any reason to change
2163              this value.
2164
2165       /proc/sys/kernel/shm_rmid_forced (since Linux 3.1)
2166              If this file is set to 1, all System V  shared  memory  segments
2167              will be marked for destruction as soon as the number of attached
2168              processes falls to zero; in other words, it is no longer  possi‐
2169              ble to create shared memory segments that exist independently of
2170              any attached process.
2171
2172              The effect is as though a shmctl(2) IPC_RMID is performed on all
2173              existing  segments as well as all segments created in the future
2174              (until this file is reset to 0).  Note  that  existing  segments
2175              that  are  attached  to no process will be immediately destroyed
2176              when this file is set to  1.   Setting  this  option  will  also
2177              destroy  segments  that  were  created, but never attached, upon
2178              termination  of  the  process  that  created  the  segment  with
2179              shmget(2).
2180
2181              Setting  this file to 1 provides a way of ensuring that all Sys‐
2182              tem V shared memory segments are counted  against  the  resource
2183              usage  and  resource limits (see the description of RLIMIT_AS in
2184              getrlimit(2)) of at least one process.
2185
2186              Because setting this file to 1 produces behavior  that  is  non‐
2187              standard and could also break existing applications, the default
2188              value in this file is 0.  Only set this file to 1 if you have  a
2189              good  understanding  of  the semantics of the applications using
2190              System V shared memory on your system.
2191
2192       /proc/sys/kernel/shmall
2193              This file contains the system-wide limit on the total number  of
2194              pages of System V shared memory.
2195
2196       /proc/sys/kernel/shmmax
2197              This file can be used to query and set the run-time limit on the
2198              maximum (System V IPC) shared memory segment size  that  can  be
2199              created.   Shared memory segments up to 1GB are now supported in
2200              the kernel.  This value defaults to SHMMAX.
2201
2202       /proc/sys/kernel/shmmni (since Linux 2.4)
2203              This file specifies the system-wide maximum number of  System  V
2204              shared memory segments that can be created.
2205
2206       /proc/sys/kernel/sysrq
2207              This  file  controls  the functions allowed to be invoked by the
2208              SysRq key.  By default, the file contains 1 meaning  that  every
2209              possible  SysRq  request  is  allowed (in older kernel versions,
2210              SysRq was disabled by default, and you were required to specifi‐
2211              cally enable it at run-time, but this is not the case any more).
2212              Possible values in this file are:
2213
2214                 0 - disable sysrq completely
2215                 1 - enable all functions of sysrq
2216                >1 - bit mask of allowed sysrq functions, as follows:
2217                        2 - enable control of console logging level
2218                        4 - enable control of keyboard (SAK, unraw)
2219                        8 - enable debugging dumps of processes etc.
2220                       16 - enable sync command
2221                       32 - enable remount read-only
2222                       64 - enable signalling of processes (term,  kill,  oom-
2223              kill)
2224                      128 - allow reboot/poweroff
2225                      256 - allow nicing of all real-time tasks
2226
2227              This  file is present only if the CONFIG_MAGIC_SYSRQ kernel con‐
2228              figuration option is enabled.  For further details see the Linux
2229              kernel source file Documentation/sysrq.txt.
2230
2231       /proc/sys/kernel/version
2232              This file contains a string like:
2233
2234                  #5 Wed Feb 25 21:49:24 MET 1998
2235
2236              The  "#5"  means  that  this is the fifth kernel built from this
2237              source base and the date behind it indicates the time the kernel
2238              was built.
2239
2240       /proc/sys/kernel/threads-max (since Linux 2.3.11)
2241              This  file  specifies  the  system-wide  limit  on the number of
2242              threads (tasks) that can be created on the system.
2243
2244       /proc/sys/kernel/zero-paged (PowerPC only)
2245              This file contains a flag.  When  enabled  (nonzero),  Linux-PPC
2246              will  pre-zero  pages  in  the  idle  loop, possibly speeding up
2247              get_free_pages.
2248
2249       /proc/sys/net
2250              This directory contains networking stuff.  Explanations for some
2251              of  the  files  under  this directory can be found in tcp(7) and
2252              ip(7).
2253
2254       /proc/sys/net/core/somaxconn
2255              This file defines a ceiling value for the  backlog  argument  of
2256              listen(2); see the listen(2) manual page for details.
2257
2258       /proc/sys/proc
2259              This directory may be empty.
2260
2261       /proc/sys/sunrpc
2262              This  directory  supports  Sun remote procedure call for network
2263              file system (NFS).  On some systems, it is not present.
2264
2265       /proc/sys/vm
2266              This directory contains files for memory management tuning, buf‐
2267              fer and cache management.
2268
2269       /proc/sys/vm/drop_caches (since Linux 2.6.16)
2270              Writing  to  this  file  causes the kernel to drop clean caches,
2271              dentries and inodes from memory, causing that memory  to  become
2272              free.
2273
2274              To  free  pagecache,  use  echo 1 > /proc/sys/vm/drop_caches; to
2275              free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches;
2276              to   free   pagecache,   dentries  and  inodes,  use  echo  3  >
2277              /proc/sys/vm/drop_caches.
2278
2279              Because this is a nondestructive operation and dirty objects are
2280              not freeable, the user should run sync(8) first.
2281
2282       /proc/sys/vm/legacy_va_layout (since Linux 2.6.9)
2283              If  nonzero, this disables the new 32-bit memory-mapping layout;
2284              the kernel will use the legacy (2.4) layout for all processes.
2285
2286       /proc/sys/vm/memory_failure_early_kill (since Linux 2.6.32)
2287              Control how to kill processes when an uncorrected  memory  error
2288              (typically a 2-bit error in a memory module) that cannot be han‐
2289              dled by the kernel is detected in the  background  by  hardware.
2290              In some cases (like the page still having a valid copy on disk),
2291              the kernel will handle the failure transparently without affect‐
2292              ing  any applications.  But if there is no other up-to-date copy
2293              of the data, it will kill processes to prevent any data  corrup‐
2294              tions from propagating.
2295
2296              The file has one of the following values:
2297
2298              1:  Kill  all  processes that have the corrupted-and-not-reload‐
2299                  able page mapped as soon  as  the  corruption  is  detected.
2300                  Note  this  is  not supported for a few types of pages, like
2301                  kernel internally allocated data  or  the  swap  cache,  but
2302                  works for the majority of user pages.
2303
2304              0:  Only  unmap  the  corrupted page from all processes and kill
2305                  only a process that tries to access it.
2306
2307              The kill is performed using a SIGBUS signal with si_code set  to
2308              BUS_MCEERR_AO.   Processes  can handle this if they want to; see
2309              sigaction(2) for more details.
2310
2311              This feature is  active  only  on  architectures/platforms  with
2312              advanced  machine  check  handling  and  depends on the hardware
2313              capabilities.
2314
2315              Applications can override the memory_failure_early_kill  setting
2316              individually with the prctl(2) PR_MCE_KILL operation.
2317
2318              Only  present  if  the  kernel  was  configured with CONFIG_MEM‐
2319              ORY_FAILURE.
2320
2321       /proc/sys/vm/memory_failure_recovery (since Linux 2.6.32)
2322              Enable memory failure recovery (when supported by the platform)
2323
2324              1:  Attempt recovery.
2325
2326              0:  Always panic on a memory failure.
2327
2328              Only present if  the  kernel  was  configured  with  CONFIG_MEM‐
2329              ORY_FAILURE.
2330
2331       /proc/sys/vm/oom_dump_tasks (since Linux 2.6.25)
2332              Enables a system-wide task dump (excluding kernel threads) to be
2333              produced when the kernel  performs  an  OOM-killing.   The  dump
2334              includes  the  following  information  for  each  task  (thread,
2335              process): thread ID, real user ID, thread group ID (process ID),
2336              virtual memory size, resident set size, the CPU that the task is
2337              scheduled  on,   oom_adj   score   (see   the   description   of
2338              /proc/[pid]/oom_adj),  and  command  name.   This  is helpful to
2339              determine why the OOM-killer was invoked  and  to  identify  the
2340              rogue task that caused it.
2341
2342              If this contains the value zero, this information is suppressed.
2343              On very large systems with thousands of tasks,  it  may  not  be
2344              feasible  to  dump  the  memory  state information for each one.
2345              Such systems should not be forced to incur a performance penalty
2346              in OOM situations when the information may not be desired.
2347
2348              If  this  is  set to nonzero, this information is shown whenever
2349              the OOM-killer actually kills a memory-hogging task.
2350
2351              The default value is 0.
2352
2353       /proc/sys/vm/oom_kill_allocating_task (since Linux 2.6.24)
2354              This enables or disables killing the OOM-triggering task in out-
2355              of-memory situations.
2356
2357              If  this  is  set  to zero, the OOM-killer will scan through the
2358              entire tasklist and select a task based on heuristics  to  kill.
2359              This  normally selects a rogue memory-hogging task that frees up
2360              a large amount of memory when killed.
2361
2362              If this is set to nonzero, the OOM-killer simply kills the  task
2363              that  triggered the out-of-memory condition.  This avoids a pos‐
2364              sibly expensive tasklist scan.
2365
2366              If /proc/sys/vm/panic_on_oom is  nonzero,  it  takes  precedence
2367              over  whatever  value  is used in /proc/sys/vm/oom_kill_allocat‐
2368              ing_task.
2369
2370              The default value is 0.
2371
2372       /proc/sys/vm/overcommit_memory
2373              This file contains the kernel virtual  memory  accounting  mode.
2374              Values are:
2375
2376                     0: heuristic overcommit (this is the default)
2377                     1: always overcommit, never check
2378                     2: always check, never overcommit
2379
2380              In  mode 0, calls of mmap(2) with MAP_NORESERVE are not checked,
2381              and the default check is very weak, leading to the risk of  get‐
2382              ting  a process "OOM-killed".  Under Linux 2.4 any nonzero value
2383              implies mode 1.  In mode 2  (available  since  Linux  2.6),  the
2384              total  virtual  address  space on the system is limited to (SS +
2385              RAM*(r/100)), where SS is the size of the swap space, and RAM is
2386              the  size  of  the physical memory, and r is the contents of the
2387              file /proc/sys/vm/overcommit_ratio.
2388
2389       /proc/sys/vm/overcommit_ratio
2390              See the description of /proc/sys/vm/overcommit_memory.
2391
2392       /proc/sys/vm/panic_on_oom (since Linux 2.6.18)
2393              This enables or disables a kernel panic in an out-of-memory sit‐
2394              uation.
2395
2396              If this file is set to the value 0, the kernel's OOM-killer will
2397              kill some rogue process.  Usually, the  OOM-killer  is  able  to
2398              kill a rogue process and the system will survive.
2399
2400              If  this  file  is  set to the value 1, then the kernel normally
2401              panics when out-of-memory happens.  However, if a process limits
2402              allocations  to  certain  nodes  using memory policies (mbind(2)
2403              MPOL_BIND) or cpusets (cpuset(7)) and those nodes  reach  memory
2404              exhaustion  status, one process may be killed by the OOM-killer.
2405              No panic occurs in this case: because other nodes' memory may be
2406              free,  this  means the system as a whole may not have reached an
2407              out-of-memory situation yet.
2408
2409              If this file is set to the value 2,  the  kernel  always  panics
2410              when an out-of-memory condition occurs.
2411
2412              The default value is 0.  1 and 2 are for failover of clustering.
2413              Select either according to your policy of failover.
2414
2415       /proc/sys/vm/swappiness
2416              The value in this file controls how aggressively the kernel will
2417              swap memory pages.  Higher values increase aggressiveness, lower
2418              values decrease aggressiveness.  The default value is 60.
2419
2420       /proc/sysrq-trigger (since Linux 2.4.21)
2421              Writing a character to this file triggers the same  SysRq  func‐
2422              tion  as  typing  ALT-SysRq-<character>  (see the description of
2423              /proc/sys/kernel/sysrq).  This file is normally writable only by
2424              root.  For further details see the Linux kernel source file Doc‐
2425              umentation/sysrq.txt.
2426
2427       /proc/sysvipc
2428              Subdirectory containing  the  pseudo-files  msg,  sem  and  shm.
2429              These  files  list the System V Interprocess Communication (IPC)
2430              objects (respectively: message queues,  semaphores,  and  shared
2431              memory)  that  currently  exist on the system, providing similar
2432              information to that available via  ipcs(1).   These  files  have
2433              headers  and  are  formatted  (one IPC object per line) for easy
2434              understanding.  svipc(7)  provides  further  background  on  the
2435              information shown by these files.
2436
2437       /proc/tty
2438              Subdirectory  containing the pseudo-files and subdirectories for
2439              tty drivers and line disciplines.
2440
2441       /proc/uptime
2442              This file contains two numbers: the uptime of the  system  (sec‐
2443              onds), and the amount of time spent in idle process (seconds).
2444
2445       /proc/version
2446              This string identifies the kernel version that is currently run‐
2447              ning.  It  includes  the  contents  of  /proc/sys/kernel/ostype,
2448              /proc/sys/kernel/osrelease  and  /proc/sys/kernel/version.   For
2449              example:
2450            Linux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994
2451
2452       /proc/vmstat (since Linux 2.6)
2453              This file displays various virtual memory statistics.
2454
2455       /proc/zoneinfo (since Linux 2.6.13)
2456              This file display information about memory zones.  This is  use‐
2457              ful for analyzing virtual memory behavior.
2458

NOTES

2460       Many strings (i.e., the environment and command line) are in the inter‐
2461       nal format, with subfields terminated by null bytes ('\0'), so you  may
2462       find  that  things are more readable if you use od -c or tr "\000" "\n"
2463       to read them.  Alternatively, echo `cat <file>` works well.
2464
2465       This manual page is incomplete, possibly inaccurate, and is the kind of
2466       thing that needs to be updated very often.
2467

SEE ALSO

2469       cat(1), dmesg(1), find(1), free(1), ps(1), tr(1), uptime(1), chroot(2),
2470       mmap(2), readlink(2), syslog(2), slabinfo(5), hier(7), time(7), arp(8),
2471       hdparm(8),  ifconfig(8),  init(8),  lsmod(8),  lspci(8), mount(8), net‐
2472       stat(8), procinfo(8), route(8), sysctl(8)
2473
2474       The Linux kernel source files:  Documentation/filesystems/proc.txt  and
2475       Documentation/sysctl/vm.txt.
2476

COLOPHON

2478       This  page  is  part of release 3.53 of the Linux man-pages project.  A
2479       description of the project, and information about reporting  bugs,  can
2480       be found at http://www.kernel.org/doc/man-pages/.
2481
2482
2483
2484Linux                             2013-08-01                           PROC(5)
Impressum