proc.txt

来自「Linux Kernel 2.6.9 for OMAP1710」· 文本 代码 · 共 1,564 行 · 第 1/5 页

TXT
1,564
字号
----------------------------------nr_hugepages configures number of hugetlb page reserved for the system.hugetlb_shm_group contains group id that is allowed to create SysV sharedmemory segment using hugetlb page.laptop_mode-----------laptop_mode is a knob that controls "laptop mode". All the things that arecontrolled by this knob are discussed in Documentation/laptop-mode.txt.block_dump----------block_dump enables block I/O debugging when set to a nonzero value. Moreinformation on block I/O debugging is in Documentation/laptop-mode.txt.2.5 /proc/sys/dev - Device specific parameters----------------------------------------------Currently there is only support for CDROM drives, and for those, there is onlyone read-only  file containing information about the CD-ROM drives attached tothe system:  >cat /proc/sys/dev/cdrom/info   CD-ROM information, Id: cdrom.c 2.55 1999/04/25      drive name:             sr0     hdb   drive speed:            32      40   drive # of slots:       1       0   Can close tray:         1       1   Can open tray:          1       1   Can lock tray:          1       1   Can change speed:       1       1   Can select disk:        0       1   Can read multisession:  1       1   Can read MCN:           1       1   Reports media changed:  1       1   Can play audio:         1       1 You see two drives, sr0 and hdb, along with a list of their features.2.6 /proc/sys/sunrpc - Remote procedure calls---------------------------------------------This directory  contains four files, which enable or disable debugging for theRPC functions NFS, NFS-daemon, RPC and NLM. The default values are 0. They canbe set to one to turn debugging on. (The default value is 0 for each)2.7 /proc/sys/net - Networking stuff------------------------------------The interface  to  the  networking  parts  of  the  kernel  is  located  in/proc/sys/net. Table  2-3  shows all possible subdirectories. You may see onlysome of them, depending on your kernel's configuration.Table 2-3: Subdirectories in /proc/sys/net .............................................................................. Directory Content             Directory  Content             core      General parameter   appletalk  Appletalk protocol  unix      Unix domain sockets netrom     NET/ROM             802       E802 protocol       ax25       AX25                ethernet  Ethernet protocol   rose       X.25 PLP layer      ipv4      IP version 4        x25        X.25 protocol       ipx       IPX                 token-ring IBM token ring      bridge    Bridging            decnet     DEC net             ipv6      IP version 6                   ..............................................................................We will  concentrate  on IP networking here. Since AX15, X.25, and DEC Net areonly minor players in the Linux world, we'll skip them in this chapter. You'llfind some  short  info on Appletalk and IPX further on in this chapter. Reviewthe online  documentation  and the kernel source to get a detailed view of theparameters for  those  protocols.  In  this  section  we'll  discuss  thesubdirectories printed  in  bold letters in the table above. As default valuesare suitable for most needs, there is no need to change these values./proc/sys/net/core - Network core options-----------------------------------------rmem_default------------The default setting of the socket receive buffer in bytes.rmem_max--------The maximum receive socket buffer size in bytes.wmem_default------------The default setting (in bytes) of the socket send buffer.wmem_max--------The maximum send socket buffer size in bytes.message_burst and message_cost------------------------------These parameters  are used to limit the warning messages written to the kernellog from  the  networking  code.  They  enforce  a  rate  limit  to  make  adenial-of-service attack  impossible. A higher message_cost factor, results infewer messages that will be written. Message_burst controls when messages willbe dropped.  The  default  settings  limit  warning messages to one every fiveseconds.netdev_max_backlog------------------Maximum number  of  packets,  queued  on  the  INPUT  side, when the interfacereceives packets faster than kernel can process them.optmem_max----------Maximum ancillary buffer size allowed per socket. Ancillary data is a sequenceof struct cmsghdr structures with appended data./proc/sys/net/unix - Parameters for Unix domain sockets-------------------------------------------------------There are  only  two  files  in this subdirectory. They control the delays fordeleting and destroying socket descriptors.2.8 /proc/sys/net/ipv4 - IPV4 settings--------------------------------------IP version  4  is  still the most used protocol in Unix networking. It will bereplaced by  IP version 6 in the next couple of years, but for the moment it'sthe de  facto  standard  for  the  internet  and  is  used  in most networkingenvironments around  the  world.  Because  of the importance of this protocol,we'll have a deeper look into the subtree controlling the behavior of the IPv4subsystem of the Linux kernel.Let's start with the entries in /proc/sys/net/ipv4.ICMP settings-------------icmp_echo_ignore_all and icmp_echo_ignore_broadcasts----------------------------------------------------Turn on (1) or off (0), if the kernel should ignore all ICMP ECHO requests, orjust those to broadcast and multicast addresses.Please note that if you accept ICMP echo requests with a broadcast/multi\-castdestination address  your  network  may  be  used as an exploder for denial ofservice packet flooding attacks to other hosts.icmp_destunreach_rate, icmp_echoreply_rate, icmp_paramprob_rate and icmp_timeexeed_rate---------------------------------------------------------------------------------------Sets limits  for  sending  ICMP  packets  to specific targets. A value of zerodisables all  limiting.  Any  positive  value sets the maximum package rate inhundredth of a second (on Intel systems).IP settings-----------ip_autoconfig-------------This file contains the number one if the host received its IP configuration byRARP, BOOTP, DHCP or a similar mechanism. Otherwise it is zero.ip_default_ttl--------------TTL (Time  To  Live) for IPv4 interfaces. This is simply the maximum number ofhops a packet may travel.ip_dynaddr----------Enable dynamic  socket  address rewriting on interface address change. This isuseful for dialup interface with changing IP addresses.ip_forward----------Enable or  disable forwarding of IP packages between interfaces. Changing thisvalue resets  all other parameters to their default values. They differ if thekernel is configured as host or router.ip_local_port_range-------------------Range of  ports  used  by  TCP  and UDP to choose the local port. Contains twonumbers, the  first  number  is the lowest port, the second number the highestlocal port.  Default  is  1024-4999.  Should  be  changed  to  32768-61000 forhigh-usage systems.ip_no_pmtu_disc---------------Global switch  to  turn  path  MTU  discovery off. It can also be set on a persocket basis by the applications or on a per route basis.ip_masq_debug-------------Enable/disable debugging of IP masquerading.IP fragmentation settings-------------------------ipfrag_high_trash and ipfrag_low_trash--------------------------------------Maximum memory  used to reassemble IP fragments. When ipfrag_high_thresh bytesof memory  is  allocated  for  this  purpose,  the  fragment handler will tosspackets until ipfrag_low_thresh is reached.ipfrag_time-----------Time in seconds to keep an IP fragment in memory.TCP settings------------tcp_ecn-------This file controls the use of the ECN bit in the IPv4 headers, this is a newfeature about Explicit Congestion Notification, but some routers and firewallsblock trafic that has this bit set, so it could be necessary to echo 0 to/proc/sys/net/ipv4/tcp_ecn, if you want to talk to this sites. For more infoyou could read RFC2481.tcp_retrans_collapse--------------------Bug-to-bug compatibility with some broken printers. On retransmit, try to sendlarger packets to work around bugs in certain TCP stacks. Can be turned off bysetting it to zero.tcp_keepalive_probes--------------------Number of  keep  alive  probes  TCP  sends  out,  until  it  decides  that theconnection is broken.tcp_keepalive_time------------------How often  TCP  sends out keep alive messages, when keep alive is enabled. Thedefault is 2 hours.tcp_syn_retries---------------Number of  times  initial  SYNs  for  a  TCP  connection  attempt  will  beretransmitted. Should  not  be  higher  than 255. This is only the timeout foroutgoing connections,  for  incoming  connections the number of retransmits isdefined by tcp_retries1.tcp_sack--------Enable select acknowledgments after RFC2018.tcp_timestamps--------------Enable timestamps as defined in RFC1323.tcp_stdurg----------Enable the  strict  RFC793 interpretation of the TCP urgent pointer field. Thedefault is  to  use  the  BSD  compatible interpretation of the urgent pointerpointing to the first byte after the urgent data. The RFC793 interpretation isto have  it  point  to  the last byte of urgent data. Enabling this option maylead to interoperatibility problems. Disabled by default.tcp_syncookies--------------Only valid  when  the  kernel  was  compiled  with CONFIG_SYNCOOKIES. Send outsyncookies when  the  syn backlog queue of a socket overflows. This is to wardoff the common 'syn flood attack'. Disabled by default.Note that  the  concept  of a socket backlog is abandoned. This means the peermay not  receive  reliable  error  messages  from  an  over loaded server withsyncookies enabled.tcp_window_scaling------------------Enable window scaling as defined in RFC1323.tcp_fin_timeout---------------The length  of  time  in  seconds  it  takes to receive a final FIN before thesocket is  always  closed.  This  is  strictly  a  violation  of  the  TCPspecification, but required to prevent denial-of-service attacks.tcp_max_ka_probes-----------------Indicates how  many  keep alive probes are sent per slow timer run. Should notbe set too high t

⌨️ 快捷键说明

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