Seth Woolley's Man Viewer

Manual for proc - man 5 proc

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

PROC(5)                    Linux Programmer's Manual                   PROC(5)

       proc(5,n) - process information pseudo-filesystem

       The  proc(5,n)  filesystem is a pseudo-filesystem which is used as an inter-
       face to kernel data structures. It is commonly mounted at /proc(5,n).   Most
       of  it  is  read-only,  but  some  files  allow  kernel variables to be

       The following outline gives a quick tour through the /proc(5,n) hierarchy.

              There is a numerical subdirectory for each running process;  the
              subdirectory is named(5,8) by the process ID.  Each such subdirectory
              contains the following pseudo-files and directories.

              This holds the complete command line for the process, unless the
              whole  process  has been swapped out or the process is a zombie.
              In either of these latter cases, there is nothing in(1,8) this  file:
              i.e.  a read(2,n,1 builtins) on this file(1,n) will return 0 characters.  The command
              line arguments appear in(1,8) this file(1,n) as a  set(7,n,1 builtins)  of  null-separated
              strings, with a further null byte after the last string.

              This  is a link(1,2) to the current working directory of the process.
              To find out the cwd of process 20,  for  instance,  you  can  do

              cd /proc(5,n)/20/cwd; /bin/pwd(1,n,1 builtins)

              Note  that  the  pwd(1,n,1 builtins) command is often a shell builtin, and might
              not work properly. In bash, you may use pwd(1,n,1 builtins) -P.

              This file(1,n) contains the environment for the process.  The entries
              are  separated by null characters, and there may be a null char-
              acter at the end.  Thus, to print out the environment of process
              1, you would do:

              (cat /proc(5,n)/1/environ; echo(1,3x,1 builtins)) | tr "\000" "\n"

              (For a reason why one should want to do this, see lilo(5,8)(8).)

              Under Linux 2.2 and later, this file(1,n) is a symbolic link(1,2) contain-
              ing the actual path name of the executed command.  This symbolic
              link(1,2)  can  be dereferenced normally - attempting to open(2,3,n) it will
              open(2,3,n) the executable.  You can even  type  /proc(5,n)/[number]/exe  to
              run another copy of the same process as [number].

              Under  Linux  2.0 and earlier /proc(5,n)/[number]/exe is a pointer to
              the binary which was executed, and appears as a symbolic link. A
              readlink(1,2)(2)  call  on this file(1,n) under Linux 2.0 returns a string(3,n)
              in(1,8) the format:


              For example, [0301]:1502 would be inode 1502 on device major  03
              (IDE,  MFM,  etc. drives) minor 01 (first partition on the first

              find(1) with the -inum option can be used to locate the file.

              This is a subdirectory containing one entry for each file(1,n)  which
              the process has open(2,3,n), named(5,8) by its file(1,n) descriptor, and which is
              a symbolic link(1,2) to the actual file.  Thus, 0 is standard  input,
              1 standard output, 2 standard error(8,n), etc.

              Programs  that will take a filename, but will not take the stan-
              dard input, and which write(1,2) to a file(1,n), but will not  send(2,n)  their
              output  to  standard output, can be effectively foiled this way,
              assuming that -i is the flag designating an input file(1,n) and -o is
              the flag designating an output file:

              foobar -i /proc(5,n)/self/fd/0 -o /proc(5,n)/self/fd/1 ...

              and you have a working filter.

              /proc(5,n)/self/fd/N  is  approximately the same as /dev/fd/N in(1,8) some
              UNIX and UNIX-like systems.  Most Linux MAKEDEV scripts symboli-
              cally link(1,2) /dev/fd to /proc(5,n)/self/fd, in(1,8) fact.

              A  file(1,n) containing the currently mapped memory regions and their
              access(2,5) permissions.

              The format is:

        address           perms offset  dev   inode      pathname
        08048000-08056000 r-xp 00000000 03:0c 64593      /usr/sbin/gpm
        08056000-08058000 rw-p 0000d000 03:0c 64593      /usr/sbin/gpm
        08058000-0805b000 rwxp 00000000 00:00 0
        40000000-40013000 r-xp 00000000 03:0c 4165       /lib/
        40013000-40015000 rw-p 00012000 03:0c 4165       /lib/
        4001f000-40135000 r-xp 00000000 03:0c 45494      /lib/
        40135000-4013e000 rw-p 00115000 03:0c 45494      /lib/
        4013e000-40142000 rw-p 00000000 00:00 0
        bffff000-c0000000 rwxp 00000000 00:00 0

              where address is the address space in(1,8) the process that it  occu-
              pies, perms is a set(7,n,1 builtins) of permissions:

                   r = read(2,n,1 builtins)
                   w = write(1,2)
                   x = execute
                   s = shared
                   p = private (copy on write(1,2))

              offset  is  the offset into the file(1,n)/whatever, dev is the device
              (major:minor), and inode is the inode on that device.   0  indi-
              cates that no inode is associated with the memory region, as the
              case would be with bss.

              Under Linux 2.0 there is no field giving pathname.

              This file(1,n) can be used to access(2,5) the pages of a process's  memory
              through open(2,3,n)(2), read(2,n,1 builtins)(2), and fseek(3).

              Unix  and  Linux  support  the idea of a per-process root of the
              filesystem, set(7,n,1 builtins) by the chroot(1,2)(2) system call.  This  file(1,n)  is  a
              symbolic  link(1,2)  that points to the process's root directory, and
              behaves as exe, fd/*, etc. do.

              Status information about the process.  This is  used  by  ps(1).
              It is defined in(1,8) /usr/src/linux/fs/proc(5,n)/array.c.

              The  fields,  in(1,8) order, with their proper scanf(3) format speci-
              fiers, are:

              pid %d The process id.

              comm %s
                     The filename of the executable, in(1,8) parentheses.  This  is
                     visible whether or not the executable is swapped out.

              state %c
                     One  character  from  the string(3,n) "RSDZTW" where R is run-
                     ning, S is sleeping in(1,8) an interruptible wait, D is  wait-
                     ing  in(1,8)  uninterruptible  disk  sleep(1,3),  Z is zombie, T is
                     traced or stopped (on a signal(2,7)), and W is paging.

              ppid %d
                     The PID of the parent.

              pgrp %d
                     The process group ID of the process.

              session %d
                     The session ID of the process.

              tty_nr %d
                     The tty(1,4) the process uses.

              tpgid %d
                     The process group ID of the process which currently  owns
                     the tty(1,4) that the process is connected to.

              flags %lu
                     The  kernel  flags word of the process. For bit meanings,
                     see the PF_* defines in(1,8) <linux/sched.h>.  Details  depend
                     on the kernel version.

              minflt %lu
                     The  number  of  minor  faults the process has made which
                     have not required loading a memory page from disk.

              cminflt %lu
                     The number of minor faults that the process's  waited-for
                     children have made.

              majflt %lu
                     The  number  of  major  faults the process has made which
                     have required loading a memory page from disk.

              cmajflt %lu
                     The number of major faults that the process's  waited-for
                     children have made.

              utime %lu
                     The  number  of jiffies that this process has been sched-
                     uled in(1,8) user mode.

              stime %lu
                     The number of jiffies that this process has  been  sched-
                     uled in(1,8) kernel mode.

              cutime %ld(1,8)
                     The  number  of  jiffies  that  this process's waited-for
                     children have been scheduled  in(1,8)  user  mode.  (See  also

              cstime %ld(1,8)
                     The  number  of  jiffies  that  this process's waited-for
                     children have been scheduled in(1,8) kernel mode.

              priority %ld(1,8)
                     The standard nice(1,2) value,  plus  fifteen.   The  value  is
                     never negative in(1,8) the kernel.

              nice(1,2) %ld(1,8)
                     The  nice(1,2)  value ranges from 19 (nicest) to -19 (not nice(1,2)
                     to others).

              0 %ld(1,8)  This value is hard coded to 0  as  a  placeholder  for  a
                     removed field.

              itrealvalue %ld(1,8)
                     The  time(1,2,n)  in(1,8)  jiffies before the next SIGALRM is sent to
                     the process due to an interval timer.

              starttime %lu
                     The time(1,2,n) in(1,8) jiffies  the  process  started  after  system

              vsize %lu
                     Virtual memory size in(1,8) bytes.

              rss %ld(1,8)
                     Resident  Set  Size:  number  of pages the process has in(1,8)
                     real memory, minus 3 for administrative purposes. This is
                     just  the  pages which count towards text, data, or stack
                     space.  This does not include pages which have  not  been
                     demand-loaded in(1,8), or which are swapped out.

              rlim %lu
                     Current limit in(1,8) bytes on the rss of the process (usually
                     4294967295 on i386).

              startcode %lu
                     The address above which program text can run.

              endcode %lu
                     The address below which program text can run.

              startstack %lu
                     The address of the start of the stack.

              kstkesp %lu
                     The current value of esp (stack pointer), as found in(1,8) the
                     kernel stack page for the process.

              kstkeip %lu
                     The current EIP (instruction pointer).

              signal(2,7) %lu
                     The bitmap of pending signals (usually 0).

              blocked %lu
                     The  bitmap of blocked signals (usually 0, 2 for shells).

              sigignore %lu
                     The bitmap of ignored signals.

              sigcatch %lu
                     The bitmap of catched signals.

              wchan %lu
                     This is the "channel" in(1,8) which the  process  is  waiting.
                     It  is the address of a system call, and can be looked up
                     in(1,8) a namelist if(3,n) you need a textual name.  (If  you  have
                     an  up-to-date /etc/psdatabase, then try ps -l to see the
                     WCHAN field in(1,8) action.)

              nswap %lu
                     Number of pages swapped - not maintained.

              cnswap %lu
                     Cumulative nswap for child processes.

              exit_signal %d
                     Signal to be sent to parent when we die.

              processor %d
                     CPU number last executed on.

              Provides information about memory status in(1,8) pages.  The  columns
               size       total program size
               resident   resident set(7,n,1 builtins) size
               share      shared pages
               trs        text (code)
               drs        data/stack
               lrs        library
               dt         dirty pages

              Provides  much  of  the  information  in(1,8) /proc(5,n)/[number]/stat(1,2) and
              /proc(5,n)/[number]/statm in(1,8) a format that's  easier  for  humans  to

              Advanced  power  management version(1,3,5) and battery information when
              CONFIG_APM is defined at kernel compilation time.

              Contains subdirectories for installed busses.

              Subdirectory for pcmcia devices when  CONFIG_PCMCIA  is  set(7,n,1 builtins)  at
              kernel compilation time.


              Contains  various bus subdirectories and pseudo-files containing
              information about pci  busses,  installed  devices,  and  device
              drivers.  Some of these files are not ASCII.

              Information  about  pci  devices.   They may be accessed through
              lspci(8) and setpci(8).

              Arguments passed to the Linux kernel at boot time.   Often  done
              via a boot manager such as lilo(5,8)(1).

              This  is  a  collection of CPU and system architecture dependent
              items, for each supported architecture a  different  list.   Two
              common   entries  are  processor  which  gives  CPU  number  and
              bogomips; a system constant that  is  calculated  during  kernel
              initialization.  SMP machines have information for each CPU.

              Text  listing  of  major numbers and device groups.  This can be
              used by MAKEDEV scripts for consistency with the kernel.

       /proc(5,n)/diskstats (since Linux 2.5.69)
              This file(1,n) contains disk I/O statistics  for  each  disk  device.
              See the kernel source file(1,n) Documentation/iostats.txt for further

              This is a list of the registered ISA DMA (direct memory  access(2,5))
              channels in(1,8) use.

              Empty subdirectory.

              List of the execution domains (ABI personalities).

              Frame buffer information when CONFIG_FB is defined during kernel

              A text listing of the filesystems which were compiled  into  the
              kernel.  Incidentally, this is used by mount(2,8)(1) to cycle through
              different filesystems when none is specified.

              Empty subdirectory.

              This directory exists on systems with the ide  bus.   There  are
              directories  for  each  ide  channel and attached device.  Files

              cache              buffer size in(1,8) KB
              capacity           number of sectors
              driver             driver version(1,3,5)
              geometry           physical and logical geometry
              identify           in(1,8) hexidecimal
              media              media type
              model              manufacturer's model number
              settings           drive settings
              smart_thresholds   in(1,8) hexidecimal
              smart_values       in(1,8) hexidecimal

              The hdparm(8) utility provides access(2,5) to this information  in(1,8)  a
              friendly format.

              This  is used to record the number of interrupts per each IRQ on
              (at least) the i386 architechure.  Very easy to read(2,n,1 builtins) formatting,
              done in(1,8) ASCII.

              I/O memory map in(1,8) Linux 2.4.

              This is a list of currently registered Input-Output port regions
              that are in(1,8) use.

       /proc(5,n)/kallsyms (since Linux 2.5.71)
              This holds the kernel exported symbol definitions  used  by  the
              modules(X)  tools to dynamically link(1,2) and bind(2,n,1 builtins) loadable modules.
              In Linux 2.5.47 and earlier, a similar file(1,n) with  slightly  dif-
              ferent syntax was named(5,8) ksyms.

              This  file(1,n)  represents  the physical memory of the system and is
              stored in(1,8) the ELF core file(1,n) format.  With this pseudo-file,  and
              an unstripped kernel (/usr/src/linux/vmlinux) binary, GDB can be
              used to examine the current state of any kernel data structures.

              The  total  length  of  the  file(1,n) is the size of physical memory
              (RAM) plus 4KB.

              This file(1,n) can be used instead of the syslog(2,3,5,3 Sys::Syslog)(2)  system  call  to
              read(2,n,1 builtins)  kernel messages.  A process must have superuser privileges
              to read(2,n,1 builtins) this file(1,n), and only one process should read(2,n,1 builtins)  this  file.
              This  file(1,n)  should  not  be  read(2,n,1 builtins) if(3,n) a syslog(2,3,5,3 Sys::Syslog) process is running
              which uses the syslog(2,3,5,3 Sys::Syslog)(2) system call facility to log kernel mes-

              Information in(1,8) this file(1,n) is retrieved with the dmesg(8) program.

       /proc(5,n)/ksyms (Linux 1.1.23-2.5.47)
              See /proc(5,n)/kallsyms.

              The load(7,n) average numbers give the number  of  jobs  in(1,8)  the  run
              queue(1,3)  (state R) or waiting for disk I/O (state D) averaged over
              1, 5, and 15 minutes.  They are the same  as  the  load(7,n)  average
              numbers given by uptime(1) and other programs.

              This  file(1,n)  shows current file(1,n) locks (flock(1,2)(2) and fcntl(2)) and
              leases (fcntl(2)).

              This file(1,n) is only present if(3,n) CONFIGDEBUGMALLOC was defined  dur-
              ing compilation.

              This  is  used  by free(1) to report the amount of free and used
              memory (both physical and swap) on the system  as  well  as  the
              shared memory and buffers used by the kernel.

              It is in(1,8) the same format as free(1), except in(1,8) bytes rather than

              This is a list of all the file(1,n) systems currently mounted on  the
              system.  The format of this file(1,n) is documented in(1,8) fstab(5).

              A  text list of the modules that have been loaded by the system.
              See also lsmod(8).

              Memory  Type  Range  Registers.   See  /usr/src/linux/Documenta-
              tion/mtrr.txt for details.

              various  net  pseudo-files, all of which give the status of some
              part of the networking layer.  These files contain ASCII  struc-
              tures and are, therefore, readable with cat.  However, the stan-
              dard netstat(8) suite provides  much  cleaner  access(2,5)  to  these

              This  holds  an ASCII readable dump of the kernel ARP table used
              for address resolutions. It will show both  dynamically  learned
              and pre-programmed ARP entries.  The format is:

        IP address     HW type   Flags     HW address          Mask   Device   0x1       0x2       00:50:BF:25:68:F3   *      eth0  0x1       0xc       00:00:00:00:00:00   *      eth0

              Here 'IP address' is the IPv4 address of the machine and the 'HW
              type' is the hardware type of the  address  from  RFC  826.  The
              flags are the internal flags of the ARP structure (as defined in(1,8)
              /usr/include/linux/if_arp.h) and the 'HW address'  is  the  data
              link(1,2) layer mapping for that IP address if(3,n) it is known.

              The  dev pseudo-file contains network device status information.
              This gives the number of received and sent packets,  the  number
              of  errors  and collisions and other basic statistics. These are
              used by the ifconfig(8) program to report  device  status.   The
              format is:

 Inter-|   Receive                                                |  Transmit
  face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
     lo: 2776770   11307    0    0    0     0          0         0  2776770   11307    0    0    0     0       0          0
   eth0: 1215645    2751    0    0    0     0          0         0  1782404    4324    0    0    0   427       0          0
   ppp0: 1622270    5552    1    0    0     0          0         0   354130    5669    0    0    0     0       0          0
   tap0:    7714      81    0    0    0     0          0         0     7714      81    0    0    0     0       0          0

              Defined in(1,8) /usr/src/linux/net/core/dev_mcast.c:
                   indx ifterface_name  dmi_u dmi_g dmi_address
                   2    eth0            1     0     01005e000001
                   3    eth1            1     0     01005e000001
                   4    eth2            1     0     01005e000001

              Internet     Group     Management    Protocol.     Defined    in(1,8)

              This file(1,n) uses the same format as the arp(7,8) file(1,n) and contains  the
              current reverse mapping database used to provide rarp(8) reverse
              address lookup services. If RARP is not configured into the ker-
              nel, this file(1,n) will not be present.

       /proc(5,n)/net/raw(3x,7,8,3x cbreak)
              Holds a dump of the RAW socket(2,7,n) table. Much of the information is
              not of use apart from debugging. The 'sl' value  is  the  kernel
              hash  slot  for  the  socket(2,7,n),  the  'local address' is the local
              address and protocol number pair."St" is the internal status  of
              the  socket.  The "tx_queue" and "rx_queue" are the outgoing and
              incoming data queue(1,3) in(1,8) terms of kernel memory usage.  The  "tr",
              "tm->when",  and  "rexmits" fields are not used by RAW.  The uid
              field holds the creator euid of the socket.

              This file(1,n) holds the ASCII data needed for the IP, ICMP, TCP, and
              UDP management information bases for an snmp agent.

              Holds a dump of the TCP socket(2,7,n) table. Much of the information is
              not of use apart from debugging. The "sl" value  is  the  kernel
              hash  slot  for  the  socket(2,7,n),  the  "local address" is the local
              address and port number  pair.   The  "remote  address"  is  the
              remote  address and port number pair (if(3,n) connected). 'St' is the
              internal status of the socket.  The  'tx_queue'  and  'rx_queue'
              are the outgoing and incoming data queue(1,3) in(1,8) terms of kernel mem-
              ory usage.  The "tr",  "tm->when",  and  "rexmits"  fields  hold
              internal  information  of  the  kernel socket(2,7,n) state and are only
              useful for debugging. The uid field holds the  creator  euid  of
              the socket.

              Holds a dump of the UDP socket(2,7,n) table. Much of the information is
              not of use apart from debugging. The "sl" value  is  the  kernel
              hash  slot  for  the  socket(2,7,n),  the  "local address" is the local
              address and port number  pair.   The  "remote  address"  is  the
              remote  address and port number pair (if(3,n) connected). "St" is the
              internal status of the socket.  The  "tx_queue"  and  "rx_queue"
              are the outgoing and incoming data queue(1,3) in(1,8) terms of kernel mem-
              ory usage. The "tr", "tm->when", and "rexmits"  fields  are  not
              used by UDP. The uid field holds the creator euid of the socket.
              The format is:

 sl  local_address rem_address   st tx_queue rx_queue tr rexmits  tm->when uid
  1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
  1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
  1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0

              Lists the UNIX domain sockets  present  within  the  system  and
              their status.  The format is:
              Num RefCount Protocol Flags    Type St Path
               0: 00000002 00000000 00000000 0001 03
               1: 00000001 00000000 00010000 0001 01 /dev/printer

              Here  'Num'  is  the kernel table slot number, 'RefCount' is the
              number of users(1,5) of the socket(2,7,n), 'Protocol' is currently always 0,
              'Flags'  represent  the internal kernel flags holding the status
              of the socket. Currently, type is always '1' (Unix domain  data-
              gram  sockets  are not yet supported in(1,8) the kernel). 'St' is the
              internal state of the socket(2,7,n) and Path is the bound path (if(3,n) any)
              of the socket.

              Contains  major  and  minor numbers of each partition as well as
              number of blocks and partition name.

              This is a listing of all PCI devices found  during  kernel  ini-
              tialization and their configuration.

              A  directory with the scsi midlevel pseudo-file and various SCSI
              lowlevel driver directories, which contain a file(1,n) for each  SCSI
              host(1,5)  in(1,8)  this system, all of which give the status of some part
              of the SCSI IO subsystem.  These files contain ASCII  structures
              and are, therefore, readable with cat.

              You  can also write(1,2) to some of the files to reconfigure the sub-
              system or switch(1,n) certain features on or off.

              This is a listing of all SCSI devices known to the  kernel.  The
              listing  is  similar  to  the one seen during bootup.  scsi cur-
              rently supports only the add-single-device command which  allows
              root to add a hotplugged device to the list of known devices.

              An  echo(1,3x,1 builtins) 'scsi add-single-device 1 0 5 0' > /proc(5,n)/scsi/scsi will
              cause host(1,5) scsi1 to scan on SCSI channel 0 for a device on ID  5
              LUN 0. If there is already a device known on this address or the
              address is invalid, an error(8,n) will be returned.

              [drivername]  can  currently  be  NCR53c7xx,  aha152x,  aha1542,
              aha1740, aic7xxx, buslogic, eata_dma, eata_pio, fdomain, in2000,
              pas16, qlogic, scsi_debug, seagate, t128,  u15-24f,  ultrastore,
              or  wd7000.  These directories show up for all drivers that reg-
              istered at least one SCSI HBA. Every directory contains one file(1,n)
              per  registered  host. Every host-file is named(5,8) after the number
              the host(1,5) was assigned during initialization.

              Reading these files will usually show driver and host(1,5) configura-
              tion, statistics etc.

              Writing  to  these  files  allows  different things on different
              hosts.  For example, with the latency  and  nolatency  commands,
              root  can  switch(1,n) on and off command latency measurement code in(1,8)
              the eata_dma driver. With the lockup and unlock  commands,  root
              can control bus lockups simulated by the scsi_debug driver.

              This  directory  refers  to  the  process  accessing  the  /proc(5,n)
              filesystem, and is identical to the /proc(5,n) directory named(5,8) by the
              process ID of the same process.

              Information about kernel caches.  The columns are:
              See slabinfo(5) for details.

              kernel/system  statistics.   Varies  with  architecture.  Common
              entries include:

              cpu(5,8,8 cpu-ldap)  3357 0 4313 1362393
                     The number of jiffies (1/100ths of  a  second)  that  the
                     system  spent  in(1,8)  user mode, user mode with low priority
                     (nice(1,2)), system mode, and  the  idle  task,  respectively.
                     The  last  value  should be 100 times the second entry in(1,8)
                     the uptime pseudo-file.

              page 5741 1808
                     The number of pages the system paged in(1,8)  and  the  number
                     that were paged out (from disk).

              swap 1 0
                     The  number  of  swap pages that have been brought in(1,8) and

              intr 1462898
                     The number of interrupts received from the system boot.

              disk_io: (2,0):(31,30,5764,1,2) (3,0):...
                     (major,minor):(noinfo,      read_io_ops,       blks_read,
                     write_io_ops, blks_written)

              ctxt 115315
                     The number of context switches that the system underwent.

              btime 769041601
                     boot time(1,2,n), in(1,8) seconds since the epoch (January 1,  1970).

              processes 86031
                     Number of forks since boot.

              Swap areas in(1,8) use.  See also swapon(2,8)(8).

              This directory (present since 1.3.57) contains a number of files
              and subdirectories corresponding  to  kernel  variables.   These
              variables can be read(2,n,1 builtins) and sometimes modified using the proc(5,n) file(1,n)
              system, and the sysctl(2,5,8)(2) system call. Presently, there are sub-
              directories  abi, debug, dev, fs, kernel, net, proc(5,n), rxrpc, sun-
              rpc(3,5,8) and vm that each contain more files and subdirectories.

              This directory may contain files with application binary  infor-
              mation.  On some systems, it is not present.

              This directory may be empty.

              This   directory   contains   device  specific  information  (eg
              dev/cdrom/info(1,5,n)).  On some systems, it may be empty.

              This contains the subdirectory  binfmt_misc  and  files  dentry-
              state,  dir-notify-enable,  dquot-nr,  file-max, file-nr, inode-
              max,  inode-nr,  inode-state,  lease-break-time,  leases-enable,
              overflowgid,  overflowuid  super-max  and super-nr with function
              fairly clear(1,3x,3x clrtobot) from the name.

              Documentation for files in(1,8) this  directory  can  in(1,8)  the  kernel
              sources in(1,8) Documentation/binfmt_misc.txt.

              This  file(1,n) contains six numbers, nr_dentry, nr_unused, age_limit
              (age in(1,8) seconds), want_pages (pages requested by system) and two
              dummy  values.  nr_dentry seems to be 0 all the time.  nr_unused
              seems to be the number of unused dentries.  age_limit is the age
              in(1,8) seconds after which dcache entries can be reclaimed when mem-
              ory is short and want_pages  is  nonzero  when  the  kernel  has
              called shrink_dcache_pages() and the dcache isn't pruned yet.

              This file(1,n) can be used to disable or enable the dnotify interface
              described in(1,8) fcntl(2) on a system-wide basis.  A value of  0  in(1,8)
              this file(1,n) disables the interface, and a value of 1 enables it.

              This file(1,n) shows the maximum number of cached disk quota(1,8) entries.
              On some (2.4) systems, it is not present.  If the number of free
              cached  disk quota(1,8) entries is very low and you have some awesome
              number of simultaneous system users(1,5), you might want to raise(3,n) the

              This  file(1,n)  shows the number of allocated disk quota(1,8) entries and
              the number of free disk quota(1,8) entries.

              This file(1,n) defines a system-wide limit  on  the  number  of  open(2,3,n)
              files  for  all processes.  (See also setrlimit(2), which can be
              used by a process to set(7,n,1 builtins) the per-process  limit,  RLIMIT_NOFILE,
              on  the  number of files it may open.)  If you get lots of error(8,n)
              messages about running out of file(1,n) handles, try increasing  this

              echo(1,3x,1 builtins) 100000 > /proc(5,n)/sys/fs/file-max

              The  kernel constant NR_OPEN imposes an upper limit on the value
              that may be placed in(1,8) file-max.

              If you  increase  /proc(5,n)/sys/fs/file-max,  be  sure  to  increase
              /proc(5,n)/sys/fs/inode-max   to   3-4   times   the   new  value  of
              /proc(5,n)/sys/fs/file-max, or you will run out of inodes.

              This (read-only)  file(1,n)  gives  the  number  of  files  presently
              opened.  It contains three numbers: The number of allocated file(1,n)
              handles, the number of free file(1,n) handles and the maximum  number
              of file(1,n) handles.  The kernel allocates file(1,n) handles dynamically,
              but it doesn't free them again.   If  the  number  of  allocated
              files is close(2,7,n) to the

              maximum,  you  should consider increasing the maximum.  When the
              number of free file(1,n) handles is large, you've encountered a  peak
              in(1,8)  your  usage  of  file(1,n) handles and you probably don't need to
              increase the maximum.

              This file(1,n) contains the maximum number of in-memory  inodes.   On
              some  (2.4) systems, it may not be present. This value should be
              3-4 times larger than the value in(1,8) file-max, since stdin, stdout
              and  network sockets also need an inode to handle them. When you
              regularly run out of inodes, you need to increase this value.

              This file(1,n) contains the first two values from inode-state.

              This file(1,n) contains  seven  numbers:  nr_inodes,  nr_free_inodes,
              preshrink  and  four  dummy  values.  nr_inodes is the number of
              inodes the system has allocated.  This can be slightly more than
              inode-max  because  Linux  allocates them one pageful at a time.
              nr_free_inodes represents the number of free inodes.   preshrink
              is  nonzero  when the nr_inodes > inode-max and the system needs
              to prune the inode list instead of allocating more.

              This file(1,n) specifies the grace period that the kernel grants to a
              process holding a file(1,n) lease (fcntl(2)) after it has sent a sig-
              nal(2,7) to that process notifying it that another process is waiting
              to  open(2,3,n) the file.  If the lease holder does not remove or down-
              grade the lease within this grace period,  the  kernel  forcibly
              breaks the lease.

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

       /proc(5,n)/sys/fs/overflowgid and /proc(5,n)/sys/fs/overflowuid
              These files allow you to change the value of the fixed  UID  and
              GID.   The  default  is  65534.   Some  filesystems only support
              16-bit UIDs and GIDs, although in(1,8) Linux UIDs  and  GIDs  are  32
              bits.  When  one  of  these  filesystems  is mounted with writes
              enabled, any UID or GID that would exceed 65535 is translated to
              the overflow value before being written to disk.

              This  file(1,n)  controls the maximum number of superblocks, and thus
              the maximum number of mounted filesystems the kernel  can  have.
              You  only  need  to increase super-max if(3,n) you need to mount(2,8) more
              filesystems than the current value in(1,8) super-max allows you to.

              This file(1,n) contains the number of filesystems currently  mounted.

              This   directory   contains   files  acct(2,5),  cad_pid,  cap-bound,
              core_pattern, core_uses_pid, ctrl-alt-del, dentry-state, domain-
              name,  hotplug,  hostname,  htab-reclaim  (PowerPC  only), java-
              appletviewer    (binfmt_java,    obsolete),     java-interpreter
              (binfmt_java,  obsolete), l2cr (PowerPC only), modprobe(5,8), msgmax,
              msgmnb, msgmni,  osrelease,  ostype,  overflowgid,  overflowuid,
              panic,  panic_on_oops,  pid_max,  powersave-nap  (PowerPC only),
              printk, pty, random(3,4,6),  real-root-dev,  reboot-cmd  (SPARC  only),
              rtsig-max,  rtsig-nr,  sem, sg-big-buff, shmall, shmmax, shmmni,
              sysrq, tainted, threads-max,  version(1,3,5)  and  zero-paged  (PowerPC
              only) with function fairly clear(1,3x,3x clrtobot) from the name.

              This  file(1,n)  contains three numbers: highwater, lowwater and fre-
              quency.  If BSD-style process accounting is enabled these values
              control its behaviour. If free space on filesystem where the log
              lives goes below lowwater percent accounting suspends.  If  free
              space  gets(3,n)  above  highwater  percent accounting resumes.  Fre-
              quency determines how often the kernel checks the amount of free
              space  (value  is  in(1,8)  seconds). Default values are 4, 2 and 30.
              That is, suspend accounting if(3,n) <= 2% of space is free; resume it
              if(3,n)  >= 4% of space is free; consider information about amount of
              free space valid for 30 seconds.

              This file(1,n) holds the value of the kernel capability bounding  set(7,n,1 builtins)
              (expressed  as  a  signed  decimal  number).   This set(7,n,1 builtins) is ANDed
              against the capabilities permitted to a process during exec.

              This file(1,n) (new in(1,8) Linux 2.5) provides  finer  control  over  the
              form  of  a  core  filename  than  the  obsolete  /proc(5,n)/sys/ker-
              nel/core_uses_pid file(1,n) described below.  The  name  for  a  core
              file(1,n)  is  controlled  by  defining  a template in(1,8) /proc(5,n)/sys/ker-
              nel/core_pattern.  The template can contain %  specifiers  which
              are substituted by the following values when a core file(1,n) is cre-

                %%  A single % character
                %p  PID of dumped process
                %u  real UID of dumped process
                %g  real GID of dumped process
                %s  number of signal(2,7) causing dump
                %t  time(1,2,n) of dump (secs since 0:00h, 1 Jan 1970)
                %h  hostname (same as the 'nodename'
                    returned by uname(1,2)(2))
                %e  executable filename

              A single % at the end of the template is dropped from  the  core
              filename, as is the combination of a % followed by any character
              other than those listed above.  All other characters in(1,8) the tem-
              plate  become  a literal part of the core filename.  The maximum
              size of the resulting core filename is 64  bytes.   The  default
              value  in(1,8)  this  file(1,n) is "core".  For backward compatibility, if(3,n)
              /proc(5,n)/sys/kernel/core_pattern  does   not   include   "%p"   and
              /proc(5,n)/sys/kernel/core_uses_pid  is  non-zero,  then .PID will be
              appended to the core filename.

              This file(1,n) can be used control the naming of a core dump file(1,n)  on
              Linux  2.4.  If this file(1,n) contains the value 0, then a core dump
              file(1,n) is simply named(5,8) core.  If this  file(1,n)  contains  a  non-zero
              value, then the core dump file(1,n) includes the process ID in(1,8) a name
              of the form core.PID.

              This file(1,n) controls the handling of Ctrl-Alt-Del  from  the  key-
              board.   When  the  value  in(1,8)  this  file(1,n)  is 0, Ctrl-Alt-Del is
              trapped and sent to the init(1) program  to  handle  a  graceful
              restart.   When  the  value is > 0, Linux's reaction to a Vulcan
              Nerve Pinch (tm) will be an immediate reboot, without even sync-
              ing  its  dirty buffers.  Note: when a program (like dosemu) has
              the keyboard in(1,8) 'raw(3x,7,8,3x cbreak)' mode, the ctrl-alt-del is  intercepted  by
              the  program  before  it  ever reaches the kernel tty(1,4) layer, and
              it's up to the program to decide what to do with it.

              This file(1,n) contains the path for the hotplug policy  agent.   The
              default value in(1,8) this file(1,n) "/sbin/hotplug".

       /proc(5,n)/sys/kernel/domainname and /proc(5,n)/sys/kernel/hostname
              can  be  used  to  set(7,n,1 builtins) the NIS/YP domainname and the hostname of
              your box in(1,8) exactly the same way as the commands domainname  and
              hostname, i.e.:

              # echo(1,3x,1 builtins) "darkstar" > /proc(5,n)/sys/kernel/hostname
              # echo(1,3x,1 builtins) "mydomain" > /proc(5,n)/sys/kernel/domainname

              has the same effect as

              # hostname "darkstar"
              # domainname "mydomain"

              Note,  however, that the classic has the host-
              name "darkstar" and DNS (Internet Domain Name Server) domainname
              "", not to be confused with the NIS (Network Information
              Service) or YP (Yellow Pages) domainname. These two domain names
              are  in(1,8)  general  different.  For  a detailed discussion see the
              hostname(1) man(1,5,7) page.

              (PowerPC only) If this file(1,n) is set(7,n,1 builtins) to a non-zero value, the Pow-
              erPC  htab  (see kernel file(1,n) Documentation/powerpc/ppc_htab.txt)
              is pruned each time(1,2,n) the system hits the idle loop.

              (PowerPC only) This file(1,n) contains a flag that  controls  the  L2
              cache  of  G3  processor  boards.  If  0, the cache is disabled.
              Enabled if(3,n) nonzero.

              This file(1,n) is described by  the  kernel  source  file(1,n)  Documenta-

              This  file(1,n)  defines  a  system-wide limit specifying the maximum
              number of bytes in(1,8) a single message written on a System  V  mes-
              sage queue.

              This file(1,n) defines the system-wide limit on the number of message
              queue(1,3) identifiers.  (This file(1,n) is  only  present  in(1,8)  Linux  2.4

              This  file(1,n) defines a system-wide paramter used to initialise the
              msg_qbytes setting for subsequenly created message queues.   The
              msg_qbytes  setting  specifies  the maximum number of bytes that
              may be written to the message queue.

       /proc(5,n)/sys/kernel/ostype and /proc(5,n)/sys/kernel/osrelease
              These files give substrings of /proc(5,n)/version(1,3,5).

       /proc(5,n)/sys/kernel/overflowgid and /proc(5,n)/sys/kernel/overflowuid
              These files duplicate  the  files  /proc(5,n)/sys/fs/overflowgid  and

              gives  read(2,n,1 builtins)/write(1,2)  access(2,5)  to the kernel variable panic_timeout.
              If this is zero, the kernel will loop on a panic; if(3,n) nonzero  it
              indicates that the kernel should autoreboot after this number of
              seconds.  When you use the software watchdog(5,8) device driver,  the
              recommended setting is 60.

              This  file(1,n)  (new  in(1,8)  Linux 2.5) controls the kernel's behaviour
              when an oops or BUG is encountered.  If this  file(1,n)  contains  0,
              then  the system tries to continue operation.  If it contains 1,
              then the system delays a few seconds  (to  give  klogd  time(1,2,n)  to
              record  the oops output) and then panics.  If the /proc(5,n)/sys/ker-
              nel/panic file(1,n)  is  also  non-zero  then  the  machine  will  be

              This  file(1,n)  (new in(1,8) Linux 2.5) specifies the value at which PIDs
              wrap around (i.e., the value in(1,8) this file(1,n) is  one  greater  than
              the  maximum  PID).   The  default  value  for this file(1,n), 32768,
              results in(1,8) the same range of PIDs as on  earlier  kernels.   The
              value  in(1,8)  this  file(1,n)  can  be  set(7,n,1 builtins)  to  any  value  up  to 2^22
              (PID_MAX_LIMIT, approximately 4 million).

       /proc(5,n)/sys/kernel/powersave-nap (PowerPC only)
              This file(1,n) contains a flag.  If set(7,n,1 builtins), Linux-PPC will use the 'nap'
              mode of powersaving, otherwise the 'doze' mode will be used.

              The  four values in(1,8) this file(1,n) are console_loglevel, default_mes-
              sage_loglevel,    minimum_console_level     and     default_con-
              sole_loglevel.   These  values  influence printk() behavior when
              printing or logging error(8,n) messages. See syslog(2,3,5,3 Sys::Syslog)(2) for more  info(1,5,n)
              on  the  different  loglevels.   Messages with a higher priority
              than console_loglevel will be printed to the console.   Messages
              without  an  explicit  priority  will  be  printed with priority
              default_message_level.  minimum_console_loglevel is the  minimum
              (highest)   value   to   which   console_loglevel  can  be  set.
              default_console_loglevel  is  the   default   value   for   con-

       /proc(5,n)/sys/kernel/pty (since Linux 2.6.4)
              This directory contains two files relating to the number of Unix
              98 pseudo-terminals (see pts(4)) on the system.

              This file(1,n) defines the maximum number of pseudo-terminals.

              This read-only file(1,n) indicates how many pseudo-terminals are cur-
              rently in(1,8) use.

              This directory contains various parameters controlling the oper-
              ation of the file(1,n) /dev/random(3,4,6).

              This file(1,n) is documented in(1,8) the  kernel  source  file(1,n)  Documenta-

       /proc(5,n)/sys/kernel/reboot-cmd (Sparc only)
              This  file(1,n)  seems  to  be a way to give an argument to the SPARC
              ROM/Flash boot loader. Maybe to tell it what to do after reboot-

              This  file(1,n) can be used to tune the maximum number of POSIX real-
              time(1,2,n) (queued) signals that can be outstanding in(1,8) the system.

              This file(1,n) shows the  number  POSIX  realtime  signals  currently

       /proc(5,n)/sys/kernel/sem (since Linux 2.4)
              This  file(1,n)  contains  4 numbers defining limits for System V IPC
              semaphores.  These fields are, in(1,8) order:

              SEMMSL  The maximum semaphores per semaphore set.

              SEMMNS  A system-wide limit on the number of semaphores  in(1,8)  all
                      semaphore sets.

              SEMOPM  The  maximum  number of operations that may be specified
                      in(1,8) a semop(2) call.

              SEMMNI  A system-wide limit on the maximum number  of  semaphore

              This file(1,n) shows the size of the generic SCSI device (sg) buffer.
              You can't tune it just yet, but you could change it  on  compile
              time(1,2,n)  by  editing  include/scsi/sg.h  and  changing the value of
              SG_BIG_BUFF.  However, there shouldn't be any reason  to  change
              this value.

              This  file(1,n) contains the system-wide limit on the total number of
              pages of System V shared memory.

              This file(1,n) can be used to query and set(7,n,1 builtins) the run time(1,2,n) limit on the
              maximum  (System  V  IPC) shared memory segment size that can be
              created.  Shared memory segments up to 1Gb are now supported  in(1,8)
              the kernel.  This value defaults to SHMMAX.

              (available  in(1,8)  Linux  2.4  and onwards) This file(1,n) specifies the
              system-wide maximum number of System V  shared  memory  segments
              that can be created.

              contains a string(3,n) like:

              #5 Wed Feb 25 21:49:24 MET 1998.TP

              The  '#5'  means  that  this is the fifth kernel built from this
              source base and the date behind it indicates the time(1,2,n) the kernel
              was built.

       /proc(5,n)/sys/kernel/zero-paged (PowerPC only)
              This  file(1,n)  contains  a flag. When enabled (non-zero), Linux-PPC
              will pre-zero pages in(1,8)  the  idle  loop,  possibly  speeding  up

              This directory contains networking stuff.

              This directory may be empty.

              This  directory  supports  Sun remote procedure call for network
              file(1,n) system (NFS).  On some systems, it is not present.

              This directory contains  files  for  memory  management  tuning,
              buffer and cache management.

              This  file(1,n)  contains  the kernel virtual(5,8) memory accounting mode.
              Values are:
              0: heuristic overcommit (this is the default)
              1: always overcommit, never check
              2: always check, never overcommit
              In mode 0, calls of  mmap(2)  with  MAP_NORESERVE  set(7,n,1 builtins)  are  not
              checked, and the default check is very weak, leading to the risk
              of getting a process "OOM-killed".  Under Linux 2.4 any  nonzero
              value  implies  mode  1.  In mode 2 (available since Linux 2.6),
              the total virtual(5,8) address space on the system is limited to  (SS
              +  RAM*(r/100)), where SS is the size of the swap space, and RAM
              is the size of the physical memory, and r is the contents of the
              file(1,n) /proc(5,n)/sys/vm/overcommit_ratio.

              See the description of /proc(5,n)/sys/vm/overcommit_memory.

              Subdirectory  containing  the  pseudo-files  msg,  sem  and shm.
              These files list the System V Interprocess  Communication  (IPC)
              objects  (respectively:  message  queues, semaphores, and shared
              memory) that currently exist on the  system,  providing  similar
              information  to  that  available  via ipcs(1).  These files have
              headers and are formatted (one IPC object  per  line)  for  easy
              understanding.  ipc(2,5)(5) provides further background on the infor-
              mation shown by these files.

              Subdirectory containing the psuedo-files and subdirectories  for
              tty(1,4) drivers and line disciplines.

              This  file(1,n)  contains two numbers: the uptime of the system (sec-
              onds), and the amount of time(1,2,n) spent in(1,8) idle process (seconds).

              This string(3,n) identifies the kernel version(1,3,5) that is currently run-
              ning.    It   includes   the   contents   of   /proc(5,n)/sys/ostype,
              /proc(5,n)/sys/osrelease and /proc(5,n)/sys/version.  For example:
            Linux version(1,3,5) 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994

       /proc(5,n)/vmstat (since Linux 2.6)
              This file(1,n) displays various virtual(5,8) memory statistics.

       cat(1), find(1), free(1), mount(2,8)(1), ps(1), tr(1), uptime(1), chroot(1,2)(2),
       mmap(2),   readlink(1,2)(2),   syslog(2,3,5,3 Sys::Syslog)(2),   slabinfo(5),   hier(7),  arp(7,8)(8),
       dmesg(8), hdparm(8), ifconfig(8),  init(8),  lsmod(8),  lspci(8),  net-
       stat(1,2)(8), procinfo(8), route(8)

       Note  that many strings (i.e., the environment and command line) are in(1,8)
       the internal format, with sub-fields terminated by NUL  bytes,  so  you
       may  find  that  things are more readable if(3,n) you use od -c or tr "\000"
       "\n" to read(2,n,1 builtins) them.  Alternatively, echo(1,3x,1 builtins) `cat <file(1,n)>` works well.

       This manual page is incomplete, possibly inaccurate, and is the kind of
       thing that needs to be updated very often.

       The  material  on /proc(5,n)/sys/fs and /proc(5,n)/sys/kernel is closely based on
       kernel source documentation files written by Rik van Riel.

                                  2004-05-25                           PROC(5)

References for this manual (incoming links)