| 53 | | " 0 Preface\n" |
| 54 | | " 0.1\tIntroduction/Credits\n" |
| | 51 | " 0 Prefácio\n" |
| | 52 | " 0.1\tIntrodução/Créditos\n" |
| | 53 | " 0.2\tConteúdo Legal\n" |
| | 54 | "\n" |
| | 55 | " 1\tColetando informações do sistema\n" |
| | 56 | " 1.1\tSubdiretórios de processo especÃfico\n" |
| | 57 | " 1.2\tDados do Kernel\n" |
| | 58 | " 1.3\tDispositivos IDE em /proc/ide\n" |
| | 59 | " 1.4\tInformações de rede em /proc/net\n" |
| | 60 | " 1.5\tInformações sobre SCSI\n" |
| | 61 | " 1.6\tInformações sobre portas paralelas em /proc/parport\n" |
| | 62 | " 1.7\tInformações sobre TTY em /proc/tty\n" |
| | 63 | "\n" |
| | 64 | " 2\tModificando parâmetros de sistema\n" |
| | 65 | " 2.1\t/proc/sys/fs - Dados do arquivo de sistema\n" |
| | 66 | " 2.2\t/proc/sys/fs/binfmt_misc - Outros formatos binários\n" |
| | 67 | " 2.3\t/proc/sys/kernel - Parâmetros comuns de kernel\n" |
| | 68 | " 2.4\t/proc/sys/vm - O subsistema de memória virtual\n" |
| | 69 | " 2.5\t/proc/sys/dev - Parâmetros especÃficos de Dispositivo\n" |
| | 70 | " 2.6\t/proc/sys/sunrpc - Chamadas de procedimento remoto\n" |
| | 71 | " 2.7\t/proc/sys/net - Materiais de Rede\n" |
| | 72 | " 2.8\t/proc/sys/net/ipv4 - Configurações de IPV4\n" |
| | 73 | " 2.9\tAppletalk\n" |
| | 74 | " 2.10\tIPX\n" |
| | 75 | "\n" |
| | 76 | "------------------------------------------------------------------------------\n" |
| | 77 | "Prefácio\n" |
| | 78 | "------------------------------------------------------------------------------\n" |
| | 79 | "\n" |
| | 80 | "0.1 Introdução/Créditos\n" |
| | 81 | "------------------------\n" |
| | 82 | "\n" |
| | 83 | "Esta documentação é parte de um livro que em breve será lançado (ou assim esperamos)\n" |
| | 84 | "na distribuição SUSE do Linux. Como não há uma documentação completa para o arquivo\n" |
| | 85 | "de sistema /proc e como nós utilizamos muito livremente fontes disponÃveis para\n" |
| | 86 | "escrever estes capÃtulos, parece-nos justo atribuir o trabalho apenas à comunidade Linux.\n" |
| | 87 | "Este trabalho é baseado no kernel versão 2.2.* e o próximo versão 2.4.*. Estou com medo\n" |
| | 88 | "que ainda esteja longe de terminar, mas nós acreditamos que isto será útil. Pelo que nós\n" |
| | 89 | "sabemos, este é o primeiro documento 'tudo-em-um' sobre o sistema de arquivo /proc. Ele \n" |
| | 90 | "é focado no hardware x86 da Intel, então se você está procurando por caracterÃsticas PPC,\n" |
| | 91 | "ARM, SPARC, APX e etc, você provavelmente não encontrará o que está procurando.\n" |
| | 92 | "Esta documentação apenas abrange as redes IPv4, nem a IPv6 nem outros protocolos - foi mal\n" |
| | 93 | "Mas suplementos e correções são bem vindos e serão adicionados a este documento se você\n" |
| | 94 | "enviá-los ao Bodo.\n" |
| | 95 | "\n" |
| | 96 | "Nós gostariamos de agradecer Alan Cox, Rik van Riel, Alexey Kuznetsov e um monte de outras\n" |
| | 97 | "pessoas por ajudarem a compilar esta documentação. Nós gostarÃamos também de estender um\n" |
| | 98 | "agradecimento especial para Andi Kleen pela documentação, que nós nos baseamos profundamente\n" |
| | 99 | "para criar este documento, assim como as informações adicionais que ele nos fornceu.\n" |
| | 100 | "Obrigado a qualquer um que contribuiu fontes ou documentações para o kernel do Linux e\n" |
| | 101 | "ajudou a criar um ótimo pedaço de software... :)\n" |
| | 102 | "\n" |
| | 103 | "Se você possui quaisquer comentários, correções ou acréscimos, por favor não hesite em entrar\n" |
| | 104 | "em contato com Bodo Bauer em bb@ricochet.net. Nós ficaremos felizes em adicioná-los a este\n" |
| | 105 | "documento.\n" |
| | 106 | "\n" |
| | 107 | "A versão mais recente deste documento está disponÃvel on-line em\n" |
| | 108 | "http://skaro.nightcrawler.com/~bb/Docs/Proc como versão HTML.\n" |
| | 109 | "\n" |
| | 110 | "Se o endereço de cima não funcionar pra você, você pode tentar a lista de\n" |
| | 111 | "e-mail do kernel em linux-kernel@vger.kernel.org e/ou tentar me achar em\n" |
| | 112 | "comandante@zaralinux.com.\n" |
| | 113 | "\n" |
| | 114 | "0.2 Conteúdo Legal\n" |
| | 115 | "---------------\n" |
| | 116 | "\n" |
| | 117 | "Nós não garantimos a veracidade deste documento, e se você vier a nós reclamando\n" |
| | 118 | "sobre como você estragou seus sistema por causa de documentação incorreta\n" |
| | 119 | "nós não nos sentiremos responsáveis...\n" |
| | 120 | "\n" |
| | 121 | "------------------------------------------------------------------------------\n" |
| | 122 | "CAPÃTULO 1: COLETANDO INFORMAÃÃES DO SISTEMA\n" |
| | 123 | "------------------------------------------------------------------------------\n" |
| | 124 | "\n" |
| | 125 | "------------------------------------------------------------------------------\n" |
| | 126 | "Neste capÃtulo \n" |
| | 127 | "------------------------------------------------------------------------------\n" |
| | 128 | "* Investigando as propriedades do pseudo-sistema de arquivos /proc e sua\n" |
| | 129 | " habilidade em fornecer informações nos sitemas Linux em execução\n" |
| | 130 | "* Examinando a estrutura do /proc\n" |
| | 131 | "* Descobrindo várias informações sobre o kernel e os processos rodando\n" |
| | 132 | " no sistema\n" |
| | 133 | "------------------------------------------------------------------------------\n" |
| | 134 | "\n" |
| | 135 | "\n" |
| | 136 | "O sistema de arquivo proc atua como uma interface para estruturas de dados\n" |
| | 137 | "internas no kernel. Isto pode ser usado para obter informações sobre o sistema\n" |
| | 138 | "e para alterar certos parâmetros do kernel no tempo de execução (sysctl).\n" |
| | 139 | "\n" |
| | 140 | "Primeiro nós daremos uma olhada nas partes somente leitura do /proc.\n" |
| | 141 | "No CapÃtulo 2 mostraremos como você pode usar /proc/sys para alterar as\n" |
| | 142 | "configurações.\n" |
| | 143 | "\n" |
| | 144 | "1.1 Subdiretórios de processo especÃfico\n" |
| | 145 | "----------------------------------------\n" |
| | 146 | "\n" |
| | 147 | "O diretório /proc contém (além de outras coisas) um subdiretório para cada\n" |
| | 148 | "processo em execução no sistema, que é nomeado depois do ID do processo (PID).\n" |
| | 149 | "\n" |
| | 150 | "O próprio link aponta para o processo lendo o sistema de arquivo. Cada processo\n" |
| | 151 | "do subdiretório possui suas entradas listadas na Tabela 1-1.\n" |
| | 152 | "\n" |
| | 153 | "\n" |
| | 154 | "Tabela 1-1: Entradas de processo especÃfico em /proc \n" |
| | 155 | "..............................................................................\n" |
| | 156 | " Arquivo Conteúdo \n" |
| | 157 | " cmdline Argumentos de linha de comando \n" |
| | 158 | " cpu\t A última e atual cpu no qual foi executado\t\t(2.4)(smp)\n" |
| | 159 | " cwd\t Link para o diretório de trabalho atual \n" |
| | 160 | " environ Valores das variáveis de ambiente \n" |
| | 161 | " exe\t Link para o executável deste processo \n" |
| | 162 | " fd Diretório, que contém todos os descritores de arquivo \n" |
| | 163 | " maps\t Mapas de memória para executáveis e arquivos de biblioteca\t\t(2.4)\n" |
| | 164 | " mem Memória retida por este processo \n" |
| | 165 | " root\t Link para o diretório raiz deste processo \n" |
| | 166 | " stat Status do processo \n" |
| | 167 | " statm Informações do status de memória do processo \n" |
| | 168 | " status Status do processo em forma legÃvel p/ humanos \n" |
| | 169 | "..............................................................................\n" |
| | 170 | "\n" |
| | 171 | "Por exemplo, para obter informações sobre o status de um processo, tudo o que você tem que fazer é\n" |
| | 172 | "ler o arquivo /proc/PID/status:\n" |
| | 173 | "\n" |
| | 174 | " >cat /proc/self/status \n" |
| | 175 | " Name: cat \n" |
| | 176 | " State: R (rodando) \n" |
| | 177 | " Pid: 5452 \n" |
| | 178 | " PPid: 743 \n" |
| | 179 | " TracerPid: 0\t\t\t\t\t\t(2.4)\n" |
| | 180 | " Uid: 501 501 501 501 \n" |
| | 181 | " Gid: 100 100 100 100 \n" |
| | 182 | " Groups: 100 14 16 \n" |
| | 183 | " VmSize: 1112 kB \n" |
| | 184 | " VmLck: 0 kB \n" |
| | 185 | " VmRSS: 348 kB \n" |
| | 186 | " VmData: 24 kB \n" |
| | 187 | " VmStk: 12 kB \n" |
| | 188 | " VmExe: 8 kB \n" |
| | 189 | " VmLib: 1044 kB \n" |
| | 190 | " SigPnd: 0000000000000000 \n" |
| | 191 | " SigBlk: 0000000000000000 \n" |
| | 192 | " SigIgn: 0000000000000000 \n" |
| | 193 | " SigCgt: 0000000000000000 \n" |
| | 194 | " CapInh: 00000000fffffeff \n" |
| | 195 | " CapPrm: 0000000000000000 \n" |
| | 196 | " CapEff: 0000000000000000 \n" |
| | 197 | "\n" |
| | 198 | "\n" |
| | 199 | "Isto mostra quase as mesmas informações que você teria se você visualizasse\n" |
| | 200 | "isso com o comando ps. De fato, ps usa o sistema de arquivo proc para obter suas\n" |
| | 201 | "informações. O arquivo statm contém informações mais detalhadas sobre o processo\n" |
| | 202 | "de uso de memória. Seus sete campos são explicados na Tabela 1-2.\n" |
| | 203 | "\n" |
| | 204 | "\n" |
| | 205 | "Tabela 1-2: Conteúdo dos arquivos statm \n" |
| | 206 | "..............................................................................\n" |
| | 207 | " Arquivo Conteúdo \n" |
| | 208 | " size tamanho total do programa \n" |
| | 209 | " resident tamanho de porções de memória \n" |
| | 210 | " shared número de páginas compartilhadas\n" |
| | 211 | " trs número de páginas em 'código' \n" |
| | 212 | " drs número de páginas de data/stack \n" |
| | 213 | " lrs número de páginas de biblioteca \n" |
| | 214 | " dt número de páginas danificadas \n" |
| | 215 | "..............................................................................\n" |
| | 216 | "\n" |
| | 217 | "1.2 Dados do Kernel\n" |
| | 218 | "---------------\n" |
| | 219 | "\n" |
| | 220 | "Semelhante às entradas de processo, os arquivos de dados do kernel fornecem\n" |
| | 221 | "informações sobre o kernel em execução. Os arquivos utilizados para obter estas\n" |
| | 222 | "informações estão contidos no /proc e são listadas na Tabela 1-3. Nem todos eles\n" |
| | 223 | "estarão presentes no seu sistema. Isto depende da configuração do kernel e dos\n" |
| | 224 | "módulos carregados, que arquivos estão lá e quais estão faltando.\n" |
| | 225 | "\n" |
| | 226 | "Tabela 1-3: Informações do Kernel em /proc \n" |
| | 227 | "..............................................................................\n" |
| | 228 | " Arquivo Conteúdo \n" |
| | 229 | " apm Informações avançadas de gerenciamento de energia \n" |
| | 230 | " bus Diretório contendo informações especÃficas de barramento\n" |
| | 231 | " cmdline Linha de comando do Kernel \n" |
| | 232 | " cpuinfo Informações sobre a CPU \n" |
| | 233 | " devices Dispositivos disponÃveis (bloco e caractere) \n" |
| | 234 | " dma Canais DMS utilizados \n" |
| | 235 | " filesystems Sistemas de arquivo suportados \n" |
| | 236 | " driver\t Vários drivers agrupados aqui, atualmente rtc\t(2.4)\n" |
| | 237 | " execdomains DomÃnios de execução, relacionados à segurança\t\t\t(2.4)\n" |
| | 238 | " fb\t Dispositivos Frame Buffer\t\t\t\t(2.4)\n" |
| | 239 | " fs\t Parâmetros de sistema de arquivos, atualmente exportações/nfs\t(2.4)\n" |
| | 240 | " ide Diretório contendo informações sobre o subsistema IDE \n" |
| | 241 | " interrupts Utilizado para interrupções \n" |
| | 242 | " iomem\t Mapa de memória\t\t\t\t\t\t(2.4)\n" |
| | 243 | " ioports Uso de portas de E/S \n" |
| | 244 | " irq\t Máscaras de irq para aproximar-se da cpu \t\t\t(2.4)(smp?)\n" |
| | 245 | " isapnp\t Informações sobre ISA PnP (Plug&Play)\t\t\t\t(2.4) \n" |
| | 246 | " kcore Kernel core image (can be ELF or A.OUT(deprecated in 2.4))\n" |
| | 247 | " kmsg Mensagens do Kernel \n" |
| | 248 | " ksyms Tabela de sÃmbolos do Kernel \n" |
| | 249 | " loadavg Carregar média do(s) último(s) 1, 5 e 15 minutos \n" |
| | 250 | " locks Travamentos de Kernel \n" |
| | 251 | " meminfo Informações de Memória \n" |
| | 252 | " misc Outros \n" |
| | 253 | " modules Lista de módulos carregados \n" |
| | 254 | " mounts Sistemas de arquivo montados \n" |
| | 255 | " net Informações de rede (ver o texto) \n" |
| | 256 | " partitions Tabela de partições conhecidas pelo sistema \n" |
| | 257 | " pci\t Informações depreciativas do barramento PCI (novo modo -> /proc/bus/pci/, \n" |
| | 258 | " dissociado pelo lspci\t\t\t\t\t(2.4)\n" |
| | 259 | " rtc Relógio em tempo real \n" |
| | 260 | " scsi Informações sobre SCSI (ver o texto) \n" |
| | 261 | " slabinfo Informações sobre slab pool \n" |
| | 262 | " stat EstatÃsticas globais \n" |
| | 263 | " swaps Utilização de espaço Swap \n" |
| | 264 | " sys Veja o capÃtulo 2 \n" |
| | 265 | " sysvipc Informações sobre recursos SysVIPC (msg, sem, shm)\t\t(2.4)\n" |
| | 266 | " tty\t Informações de drivers tty\n" |
| | 267 | " uptime Tempo de funcionamento do sistema \n" |
| | 268 | " version Versão do Kernel \n" |
| | 269 | " video\t bttv - informações de recursos de vÃdeo\t\t\t(2.4)\n" |
| | 270 | "..............................................................................\n" |
| | 271 | "\n" |
| | 272 | "Você pode, por exemplo, checar quais interrupções estão atualmente em uso e no quê\n" |
| | 273 | "elas são usadas por quem, olhando o arquivo /proc/interrupts:\n" |
| | 274 | "\n" |
| | 275 | " > cat /proc/interrupts \n" |
| | 276 | " CPU0 \n" |
| | 277 | " 0: 8728810 XT-PIC timer \n" |
| | 278 | " 1: 895 XT-PIC teclado \n" |
| | 279 | " 2: 0 XT-PIC cascade \n" |
| | 280 | " 3: 531695 XT-PIC aha152x \n" |
| | 281 | " 4: 2014133 XT-PIC serial \n" |
| | 282 | " 5: 44401 XT-PIC pcnet_cs \n" |
| | 283 | " 8: 2 XT-PIC rtc \n" |
| | 284 | " 11: 8 XT-PIC i82365 \n" |
| | 285 | " 12: 182918 XT-PIC Mouse PS/2 \n" |
| | 286 | " 13: 1 XT-PIC fpu \n" |
| | 287 | " 14: 1232265 XT-PIC ide0 \n" |
| | 288 | " 15: 7 XT-PIC ide1 \n" |
| | 289 | " NMI: 0 \n" |
| | 290 | "\n" |
| | 291 | "In 2.4.* um par de linhas foram adicionadas ao arquivo LOC & ERR (desta vez é a\n" |
| | 292 | "saÃda de uma máquina SMP):\n" |
| | 293 | "\n" |
| | 294 | " > cat /proc/interrupts \n" |
| | 295 | "\n" |
| | 296 | " CPU0 CPU1 \n" |
| | 297 | " 0: 1243498 1214548 IO-APIC-edge timer\n" |
| | 298 | " 1: 8949 8958 IO-APIC-edge teclado\n" |
| | 299 | " 2: 0 0 XT-PIC cascade\n" |
| | 300 | " 5: 11286 10161 IO-APIC-edge soundblaster\n" |
| | 301 | " 8: 1 0 IO-APIC-edge rtc\n" |
| | 302 | " 9: 27422 27407 IO-APIC-edge 3c503\n" |
| | 303 | " 12: 113645 113873 IO-APIC-edge Mouse PS/2\n" |
| | 304 | " 13: 0 0 XT-PIC fpu\n" |
| | 305 | " 14: 22491 24012 IO-APIC-edge ide0\n" |
| | 306 | " 15: 2183 2415 IO-APIC-edge ide1\n" |
| | 307 | " 17: 30564 30414 IO-APIC-level eth0\n" |
| | 308 | " 18: 177 164 IO-APIC-level bttv\n" |
| | 309 | " NMI: 2457961 2457959 \n" |
| | 310 | " LOC: 2457882 2457881 \n" |
| | 311 | " ERR: 2155\n" |
| | 312 | "\n" |
| | 313 | "NMI is incremented in this case because every timer interrupt generates a NMI\n" |
| | 314 | "(Non Maskable Interrupt) which is used by the NMI Watchdog to detect lookups.\n" |
| | 315 | "\n" |
| | 316 | "LOC is the local interrupt counter of the internal APIC of every CPU.\n" |
| | 317 | "\n" |
| | 318 | "ERR is incremented in the case of errors in the IO-APIC bus (the bus that\n" |
| | 319 | "connects the CPUs in a SMP system. This means that an error has been detected,\n" |
| | 320 | "the IO-APIC automatically retry the transmission, so it should not be a big\n" |
| | 321 | "problem, but you should read the SMP-FAQ.\n" |
| | 322 | "\n" |
| | 323 | "In this context it could be interesting to note the new irq directory in 2.4.\n" |
| | 324 | "It could be used to set IRQ to CPU affinity, this means that you can \"hook\" an\n" |
| | 325 | "IRQ to only one CPU, or to exclude a CPU of handling IRQs. The contents of the\n" |
| | 326 | "irq subdir is one subdir for each IRQ, and one file; prof_cpu_mask\n" |
| | 327 | "\n" |
| | 328 | "Por exemplo: \n" |
| | 329 | " > ls /proc/irq/\n" |
| | 330 | " 0 10 12 14 16 18 2 4 6 8 prof_cpu_mask\n" |
| | 331 | " 1 11 13 15 17 19 3 5 7 9\n" |
| | 332 | " > ls /proc/irq/0/\n" |
| | 333 | " smp_affinity\n" |
| | 334 | "\n" |
| | 335 | "The contents of the prof_cpu_mask file and each smp_affinity file for each IRQ\n" |
| | 336 | "is the same by default:\n" |
| | 337 | "\n" |
| | 338 | " > cat /proc/irq/0/smp_affinity \n" |
| | 339 | " ffffffff\n" |
| | 340 | "\n" |
| | 341 | "It's a bitmask, in wich you can specify wich CPUs can handle the IRQ, you can\n" |
| | 342 | "set it by doing:\n" |
| | 343 | "\n" |
| | 344 | " > echo 1 > /proc/irq/prof_cpu_mask\n" |
| | 345 | "\n" |
| | 346 | "This means that only the first CPU will handle the IRQ, but you can also echo 5\n" |
| | 347 | "wich means that only the first and fourth CPU can handle the IRQ.\n" |
| | 348 | "\n" |
| | 349 | "The way IRQs are routed is handled by the IO-APIC, and it's Round Robin\n" |
| | 350 | "between all the CPUs which are allowed to handle it. As usual the kernel has\n" |
| | 351 | "more info than you and does a better job than you, so the defaults are the\n" |
| | 352 | "best choice for almost everyone.\n" |
| | 353 | "\n" |
| | 354 | "There are three more important subdirectories in /proc: net, scsi, and sys.\n" |
| | 355 | "The general rule is that the contents, or even the existence of these\n" |
| | 356 | "directories, depend on your kernel configuration. If SCSI is not enabled, the\n" |
| | 357 | "directory scsi may not exist. The same is true with the net, which is there\n" |
| | 358 | "only when networking support is present in the running kernel.\n" |
| | 359 | "\n" |
| | 360 | "The slabinfo file gives information about memory usage at the slab level.\n" |
| | 361 | "Linux uses slab pools for memory management above page level in version 2.2.\n" |
| | 362 | "Commonly used objects have their own slab pool (such as network buffers,\n" |
| | 363 | "directory cache, and so on).\n" |
| | 364 | "\n" |
| | 365 | "1.3 Dispositivos IDE em /proc/ide\n" |
| | 366 | "----------------------------\n" |
| | 367 | "\n" |
| | 368 | "The subdirectory /proc/ide contains information about all IDE devices of which\n" |
| | 369 | "the kernel is aware. There is one subdirectory for each IDE controller, the\n" |
| | 370 | "file drivers and a link for each IDE device, pointing to the device directory\n" |
| | 371 | "in the controller specific subtree.\n" |
| | 372 | "\n" |
| | 373 | "The file drivers contains general information about the drivers used for the\n" |
| | 374 | "IDE devices:\n" |
| | 375 | "\n" |
| | 376 | " > cat /proc/ide/drivers \n" |
| | 377 | " ide-cdrom version 4.53 \n" |
| | 378 | " ide-disk version 1.08 \n" |
| | 379 | "\n" |
| | 380 | "\n" |
| | 381 | "More detailed information can be found in the controller specific\n" |
| | 382 | "subdirectories. These are named ide0, ide1 and so on. Each of these\n" |
| | 383 | "directories contains the files shown in table 1-4.\n" |
| | 384 | "\n" |
| | 385 | "\n" |
| | 386 | "Tabela 1-4: Informações do controlador IDE em /proc/ide/ide? \n" |
| | 387 | "..............................................................................\n" |
| | 388 | " Arquivo Conteúdo \n" |
| | 389 | " channel Canal IDE (0 ou 1) \n" |
| | 390 | " config Configuração (apenas para ponte PCI/IDE)\n" |
| | 391 | " mate Mate name \n" |
| | 392 | " model Tipo/Chipset do controlador IDE \n" |
| | 393 | "..............................................................................\n" |
| | 394 | "\n" |
| | 395 | "Each device connected to a controller has a separate subdirectory in the\n" |
| | 396 | "controllers directory. The files listed in table 1-5 are contained in these\n" |
| | 397 | "directories.\n" |
| | 398 | "\n" |
| | 399 | "\n" |
| | 400 | "Tabela 1-5: Informações sobre dispositivos IDE \n" |
| | 401 | "..............................................................................\n" |
| | 402 | " File Content \n" |
| | 403 | " cache O cache \n" |
| | 404 | " capacity Capacidade da mÃdia (em blocos de 512Byte) \n" |
| | 405 | " driver driver e versão \n" |
| | 406 | " geometry geometria fÃsica e lógica \n" |
| | 407 | " identify device identify block \n" |
| | 408 | " media tipo da mÃdia \n" |
| | 409 | " model device identifier \n" |
| | 410 | " settings device setup \n" |
| | 411 | " smart_thresholds IDE disk management thresholds \n" |
| | 412 | " smart_values IDE disk management values \n" |
| | 413 | "..............................................................................\n" |
| | 414 | "\n" |
| | 415 | "The most interesting file is settings. This file contains a nice overview of\n" |
| | 416 | "the drive parameters:\n" |
| | 417 | "\n" |
| | 418 | " # cat /proc/ide/ide0/hda/settings \n" |
| | 419 | " name value min max mode \n" |
| | 420 | " ---- ----- --- --- ---- \n" |
| | 421 | " bios_cyl 526 0 65535 rw \n" |
| | 422 | " bios_head 255 0 255 rw \n" |
| | 423 | " bios_sect 63 0 63 rw \n" |
| | 424 | " breada_readahead 4 0 127 rw \n" |
| | 425 | " bswap 0 0 1 r \n" |
| | 426 | " file_readahead 72 0 2097151 rw \n" |
| | 427 | " io_32bit 0 0 3 rw \n" |
| | 428 | " keepsettings 0 0 1 rw \n" |
| | 429 | " max_kb_per_request 122 1 127 rw \n" |
| | 430 | " multcount 0 0 8 rw \n" |
| | 431 | " nice1 1 0 1 rw \n" |
| | 432 | " nowerr 0 0 1 rw \n" |
| | 433 | " pio_mode write-only 0 255 w \n" |
| | 434 | " slow 0 0 1 rw \n" |
| | 435 | " unmaskirq 0 0 1 rw \n" |
| | 436 | " using_dma 0 0 1 rw \n" |
| | 437 | "\n" |
| | 438 | "\n" |
| | 439 | "1.4 Networking info in /proc/net\n" |
| | 440 | "--------------------------------\n" |
| | 441 | "\n" |
| | 442 | "The subdirectory /proc/net follows the usual pattern. Table 1-6 shows the\n" |
| | 443 | "additional values you get for IP version 6 if you configure the kernel to\n" |
| | 444 | "support this. Table 1-7 lists the files and their meaning.\n" |
| | 445 | "\n" |
| | 446 | "\n" |
| | 447 | "Table 1-6: IPv6 info in /proc/net \n" |
| | 448 | "..............................................................................\n" |
| | 449 | " Arquivo Conteúdo \n" |
| | 450 | " udp6 Soquetes UDP (IPv6) \n" |
| | 451 | " tcp6 Soquetes TCP (IPv6) \n" |
| | 452 | " raw6 Raw device statistics (IPv6) \n" |
| | 453 | " igmp6 IP multicast addresses, which this host joined (IPv6) \n" |
| | 454 | " if_inet6 List of IPv6 interface addresses \n" |
| | 455 | " ipv6_route Kernel routing table for IPv6 \n" |
| | 456 | " rt6_stats Global IPv6 routing tables statistics \n" |
| | 457 | " sockstat6 Socket statistics (IPv6) \n" |
| | 458 | " snmp6 Snmp data (IPv6) \n" |
| | 459 | "..............................................................................\n" |
| | 460 | "\n" |
| | 461 | "\n" |
| | 462 | "Tabela 1-7: Informações de rede em /proc/net \n" |
| | 463 | "..............................................................................\n" |
| | 464 | " Arquivo Conteúdo \n" |
| | 465 | " arp Kernel ARP table \n" |
| | 466 | " dev network devices with statistics \n" |
| | 467 | " dev_mcast the Layer2 multicast groups a device is listening too\n" |
| | 468 | " (interface index, label, number of references, number of bound\n" |
| | 469 | " addresses). \n" |
| | 470 | " dev_stat network device status \n" |
| | 471 | " ip_fwchains Firewall chain linkage \n" |
| | 472 | " ip_fwnames Firewall chain names \n" |
| | 473 | " ip_masq Directory containing the masquerading tables \n" |
| | 474 | " ip_masquerade Major masquerading table \n" |
| | 475 | " netstat Network statistics \n" |
| | 476 | " raw raw device statistics \n" |
| | 477 | " route Kernel routing table \n" |
| | 478 | " rpc Directory containing rpc info \n" |
| | 479 | " rt_cache Routing cache \n" |
| | 480 | " snmp SNMP data \n" |
| | 481 | " sockstat Socket statistics \n" |
| | 482 | " tcp TCP sockets \n" |
| | 483 | " tr_rif Token ring RIF routing table \n" |
| | 484 | " udp UDP sockets \n" |
| | 485 | " unix UNIX domain sockets \n" |
| | 486 | " wireless Wireless interface data (Wavelan etc) \n" |
| | 487 | " igmp IP multicast addresses, which this host joined \n" |
| | 488 | " psched Global packet scheduler parameters. \n" |
| | 489 | " netlink List of PF_NETLINK sockets \n" |
| | 490 | " ip_mr_vifs List of multicast virtual interfaces \n" |
| | 491 | " ip_mr_cache List of multicast routing cache \n" |
| | 492 | "..............................................................................\n" |
| | 493 | "\n" |
| | 494 | "You can use this information to see which network devices are available in\n" |
| | 495 | "your system and how much traffic was routed over those devices:\n" |
| | 496 | "\n" |
| | 497 | " > cat /proc/net/dev \n" |
| | 498 | " Inter-|Receive |[... \n" |
| | 499 | " face |bytes packets errs drop fifo frame compressed multicast|[... \n" |
| | 500 | " lo: 908188 5596 0 0 0 0 0 0 [... \n" |
| | 501 | " ppp0:15475140 20721 410 0 0 410 0 0 [... \n" |
| | 502 | " eth0: 614530 7085 0 0 0 0 0 1 [... \n" |
| | 503 | " \n" |
| | 504 | " ...] Transmit \n" |
| | 505 | " ...] bytes packets errs drop fifo colls carrier compressed \n" |
| | 506 | " ...] 908188 5596 0 0 0 0 0 0 \n" |
| | 507 | " ...] 1375103 17405 0 0 0 0 0 0 \n" |
| | 508 | " ...] 1703981 5535 0 0 0 3 0 0 \n" |
| | 509 | "\n" |
| | 510 | "In addition, each Channel Bond interface has it's own directory. For\n" |
| | 511 | "example, the bond0 device will have a directory called /proc/net/bond0/.\n" |
| | 512 | "It will contain information that is specific to that bond, such as the\n" |
| | 513 | "current slaves of the bond, the link status of the slaves, and how\n" |
| | 514 | "many times the slaves link has failed.\n" |
| | 515 | "\n" |
| | 516 | "1.5 SCSI info\n" |
| | 517 | "-------------\n" |
| | 518 | "\n" |
| | 519 | "If you have a SCSI host adapter in your system, you'll find a subdirectory\n" |
| | 520 | "named after the driver for this adapter in /proc/scsi. You'll also see a list\n" |
| | 521 | "of all recognized SCSI devices in /proc/scsi:\n" |
| | 522 | "\n" |
| | 523 | " >cat /proc/scsi/scsi \n" |
| | 524 | " Attached devices: \n" |
| | 525 | " Host: scsi0 Channel: 00 Id: 00 Lun: 00 \n" |
| | 526 | " Vendor: IBM Model: DGHS09U Rev: 03E0 \n" |
| | 527 | " Type: Direct-Access ANSI SCSI revision: 03 \n" |
| | 528 | " Host: scsi0 Channel: 00 Id: 06 Lun: 00 \n" |
| | 529 | " Vendor: PIONEER Model: CD-ROM DR-U06S Rev: 1.04 \n" |
| | 530 | " Type: CD-ROM ANSI SCSI revision: 02 \n" |
| | 531 | "\n" |
| | 532 | "\n" |
| | 533 | "The directory named after the driver has one file for each adapter found in\n" |
| | 534 | "the system. These files contain information about the controller, including\n" |
| | 535 | "the used IRQ and the IO address range. The amount of information shown is\n" |
| | 536 | "dependent on the adapter you use. The example shows the output for an Adaptec\n" |
| | 537 | "AHA-2940 SCSI adapter:\n" |
| | 538 | "\n" |
| | 539 | " > cat /proc/scsi/aic7xxx/0 \n" |
| | 540 | " \n" |
| | 541 | " Adaptec AIC7xxx driver version: 5.1.19/3.2.4 \n" |
| | 542 | " Compile Options: \n" |
| | 543 | " TCQ Enabled By Default : Disabled \n" |
| | 544 | " AIC7XXX_PROC_STATS : Disabled \n" |
| | 545 | " AIC7XXX_RESET_DELAY : 5 \n" |
| | 546 | " Adapter Configuration: \n" |
| | 547 | " SCSI Adapter: Adaptec AHA-294X Ultra SCSI host adapter \n" |
| | 548 | " Ultra Wide Controller \n" |
| | 549 | " PCI MMAPed I/O Base: 0xeb001000 \n" |
| | 550 | " Adapter SEEPROM Config: SEEPROM found and used. \n" |
| | 551 | " Adaptec SCSI BIOS: Enabled \n" |
| | 552 | " IRQ: 10 \n" |
| | 553 | " SCBs: Active 0, Max Active 2, \n" |
| | 554 | " Allocated 15, HW 16, Page 255 \n" |
| | 555 | " Interrupts: 160328 \n" |
| | 556 | " BIOS Control Word: 0x18b6 \n" |
| | 557 | " Adapter Control Word: 0x005b \n" |
| | 558 | " Extended Translation: Enabled \n" |
| | 559 | " Disconnect Enable Flags: 0xffff \n" |
| | 560 | " Ultra Enable Flags: 0x0001 \n" |
| | 561 | " Tag Queue Enable Flags: 0x0000 \n" |
| | 562 | " Ordered Queue Tag Flags: 0x0000 \n" |
| | 563 | " Default Tag Queue Depth: 8 \n" |
| | 564 | " Tagged Queue By Device array for aic7xxx host instance 0: \n" |
| | 565 | " {255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255} \n" |
| | 566 | " Actual queue depth per device for aic7xxx host instance 0: \n" |
| | 567 | " {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} \n" |
| | 568 | " Statistics: \n" |
| | 569 | " (scsi0:0:0:0) \n" |
| | 570 | " Device using Wide/Sync transfers at 40.0 MByte/sec, offset 8 \n" |
| | 571 | " Transinfo settings: current(12/8/1/0), goal(12/8/1/0), user(12/15/1/0) \n" |
| | 572 | " Total transfers 160151 (74577 reads and 85574 writes) \n" |
| | 573 | " (scsi0:0:6:0) \n" |
| | 574 | " Device using Narrow/Sync transfers at 5.0 MByte/sec, offset 15 \n" |
| | 575 | " Transinfo settings: current(50/15/0/0), goal(50/15/0/0), user(50/15/0/0) \n" |
| | 576 | " Total transfers 0 (0 reads and 0 writes) \n" |
| | 577 | "\n" |
| | 578 | "\n" |
| | 579 | "1.6 Parallel port info in /proc/parport\n" |
| | 580 | "---------------------------------------\n" |
| | 581 | "\n" |
| | 582 | "The directory /proc/parport contains information about the parallel ports of\n" |
| | 583 | "your system. It has one subdirectory for each port, named after the port\n" |
| | 584 | "number (0,1,2,...).\n" |
| | 585 | "\n" |
| | 586 | "These directories contain the four files shown in Table 1-8.\n" |
| | 587 | "\n" |
| | 588 | "\n" |
| | 589 | "Table 1-8: Files in /proc/parport \n" |
| | 590 | "..............................................................................\n" |
| | 591 | " File Content \n" |
| | 592 | " autoprobe Any IEEE-1284 device ID information that has been acquired. \n" |
| | 593 | " devices list of the device drivers using that port. A + will appear by the\n" |
| | 594 | " name of the device currently using the port (it might not appear\n" |
| | 595 | " against any). \n" |
| | 596 | " hardware Parallel port's base address, IRQ line and DMA channel. \n" |
| | 597 | " irq IRQ that parport is using for that port. This is in a separate\n" |
| | 598 | " file to allow you to alter it by writing a new value in (IRQ\n" |
| | 599 | " number or none). \n" |
| | 600 | "..............................................................................\n" |
| | 601 | "\n" |
| | 602 | "1.7 TTY info in /proc/tty\n" |
| | 603 | "-------------------------\n" |
| | 604 | "\n" |
| | 605 | "Information about the available and actually used tty's can be found in the\n" |
| | 606 | "directory /proc/tty.You'll find entries for drivers and line disciplines in\n" |
| | 607 | "this directory, as shown in Table 1-9.\n" |
| | 608 | "\n" |
| | 609 | "\n" |
| | 610 | "Table 1-9: Files in /proc/tty \n" |
| | 611 | "..............................................................................\n" |
| | 612 | " File Content \n" |
| | 613 | " drivers list of drivers and their usage \n" |
| | 614 | " ldiscs registered line disciplines \n" |
| | 615 | " driver/serial usage statistic and status of single tty lines \n" |
| | 616 | "..............................................................................\n" |
| | 617 | "\n" |
| | 618 | "To see which tty's are currently in use, you can simply look into the file\n" |
| | 619 | "/proc/tty/drivers:\n" |
| | 620 | "\n" |
| | 621 | " > cat /proc/tty/drivers \n" |
| | 622 | " pty_slave /dev/pts 136 0-255 pty:slave \n" |
| | 623 | " pty_master /dev/ptm 128 0-255 pty:master \n" |
| | 624 | " pty_slave /dev/ttyp 3 0-255 pty:slave \n" |
| | 625 | " pty_master /dev/pty 2 0-255 pty:master \n" |
| | 626 | " serial /dev/cua 5 64-67 serial:callout \n" |
| | 627 | " serial /dev/ttyS 4 64-67 serial \n" |
| | 628 | " /dev/tty0 /dev/tty0 4 0 system:vtmaster \n" |
| | 629 | " /dev/ptmx /dev/ptmx 5 2 system \n" |
| | 630 | " /dev/console /dev/console 5 1 system:console \n" |
| | 631 | " /dev/tty /dev/tty 5 0 system:/dev/tty \n" |
| | 632 | " unknown /dev/tty 4 1-63 console \n" |
| | 633 | "\n" |
| | 634 | "\n" |
| | 635 | "------------------------------------------------------------------------------\n" |
| | 636 | "Summary\n" |
| | 637 | "------------------------------------------------------------------------------\n" |
| | 638 | "The /proc file system serves information about the running system. It not only\n" |
| | 639 | "allows access to process data but also allows you to request the kernel status\n" |
| | 640 | "by reading files in the hierarchy.\n" |
| | 641 | "\n" |
| | 642 | "The directory structure of /proc reflects the types of information and makes\n" |
| | 643 | "it easy, if not obvious, where to look for specific data.\n" |
| | 644 | "------------------------------------------------------------------------------\n" |
| | 645 | "\n" |
| | 646 | "------------------------------------------------------------------------------\n" |
| | 647 | "CHAPTER 2: MODIFYING SYSTEM PARAMETERS\n" |
| | 648 | "------------------------------------------------------------------------------\n" |
| | 649 | "\n" |
| | 650 | "------------------------------------------------------------------------------\n" |
| | 651 | "In This Chapter\n" |
| | 652 | "------------------------------------------------------------------------------\n" |
| | 653 | "* Modifying kernel parameters by writing into files found in /proc/sys\n" |
| | 654 | "* Exploring the files which modify certain parameters\n" |
| | 655 | "* Review of the /proc/sys file tree\n" |
| | 656 | "------------------------------------------------------------------------------\n" |
| | 657 | "\n" |
| | 658 | "\n" |
| | 659 | "A very interesting part of /proc is the directory /proc/sys. This is not only\n" |
| | 660 | "a source of information, it also allows you to change parameters within the\n" |
| | 661 | "kernel. Be very careful when attempting this. You can optimize your system,\n" |
| | 662 | "but you can also cause it to crash. Never alter kernel parameters on a\n" |
| | 663 | "production system. Set up a development machine and test to make sure that\n" |
| | 664 | "everything works the way you want it to. You may have no alternative but to\n" |
| | 665 | "reboot the machine once an error has been made.\n" |
| | 666 | "\n" |
| | 667 | "To change a value, simply echo the new value into the file. An example is\n" |
| | 668 | "given below in the section on the file system data. You need to be root to do\n" |
| | 669 | "this. You can create your own boot script to perform this every time your\n" |
| | 670 | "system boots.\n" |
| | 671 | "\n" |
| | 672 | "The files in /proc/sys can be used to fine tune and monitor miscellaneous and\n" |
| | 673 | "general things in the operation of the Linux kernel. Since some of the files\n" |
| | 674 | "can inadvertently disrupt your system, it is advisable to read both\n" |
| | 675 | "documentation and source before actually making adjustments. In any case, be\n" |
| | 676 | "very careful when writing to any of these files. The entries in /proc may\n" |
| | 677 | "change slightly between the 2.1.* and the 2.2 kernel, so if there is any doubt\n" |
| | 678 | "review the kernel documentation in the directory /usr/src/linux/Documentation.\n" |
| | 679 | "This chapter is heavily based on the documentation included in the pre 2.2\n" |
| | 680 | "kernels, and became part of it in version 2.2.1 of the Linux kernel.\n" |
| | 681 | "\n" |
| | 682 | "2.1 /proc/sys/fs - File system data\n" |
| | 683 | "-----------------------------------\n" |
| | 684 | "\n" |
| | 685 | "This subdirectory contains specific file system, file handle, inode, dentry\n" |
| | 686 | "and quota information.\n" |
| | 687 | "\n" |
| | 688 | "Currently, these files are in /proc/sys/fs:\n" |
| | 689 | "\n" |
| | 690 | "dentry-state\n" |
| | 691 | "------------\n" |
| | 692 | "\n" |
| | 693 | "Status of the directory cache. Since directory entries are dynamically\n" |
| | 694 | "allocated and deallocated, this file indicates the current status. It holds\n" |
| | 695 | "six values, in which the last two are not used and are always zero. The others\n" |
| | 696 | "are listed in table 2-1.\n" |
| | 697 | "\n" |
| | 698 | "\n" |
| | 699 | "Table 2-1: Status files of the directory cache \n" |
| | 700 | "..............................................................................\n" |
| | 701 | " File Content \n" |
| | 702 | " nr_dentry Almost always zero \n" |
| | 703 | " nr_unused Number of unused cache entries \n" |
| | 704 | " age_limit \n" |
| | 705 | " in seconds after the entry may be reclaimed, when memory is short \n" |
| | 706 | " want_pages internally \n" |
| | 707 | "..............................................................................\n" |
| | 708 | "\n" |
| | 709 | "dquot-nr and dquot-max\n" |
| | 710 | "----------------------\n" |
| | 711 | "\n" |
| | 712 | "The file dquot-max shows the maximum number of cached disk quota entries.\n" |
| | 713 | "\n" |
| | 714 | "The file dquot-nr shows the number of allocated disk quota entries and the\n" |
| | 715 | "number of free disk quota entries.\n" |
| | 716 | "\n" |
| | 717 | "If the number of available cached disk quotas is very low and you have a large\n" |
| | 718 | "number of simultaneous system users, you might want to raise the limit.\n" |
| | 719 | "\n" |
| | 720 | "file-nr and file-max\n" |
| | 721 | "--------------------\n" |
| | 722 | "\n" |
| | 723 | "The kernel allocates file handles dynamically, but doesn't free them again at\n" |
| | 724 | "this time.\n" |
| | 725 | "\n" |
| | 726 | "The value in file-max denotes the maximum number of file handles that the\n" |
| | 727 | "Linux kernel will allocate. When you get a lot of error messages about running\n" |
| | 728 | "out of file handles, you might want to raise this limit. The default value is\n" |
| | 729 | "4096. To change it, just write the new number into the file:\n" |
| | 730 | "\n" |
| | 731 | " # cat /proc/sys/fs/file-max \n" |
| | 732 | " 4096 \n" |
| | 733 | " # echo 8192 > /proc/sys/fs/file-max \n" |
| | 734 | " # cat /proc/sys/fs/file-max \n" |
| | 735 | " 8192 \n" |
| | 736 | "\n" |
| | 737 | "\n" |
| | 738 | "This method of revision is useful for all customizable parameters of the\n" |
| | 739 | "kernel - simply echo the new value to the corresponding file.\n" |
| | 740 | "\n" |
| | 741 | "The three values in file-nr denote the number of allocated file handles, the\n" |
| | 742 | "number of used file handles, and the maximum number of file handles. When the\n" |
| | 743 | "allocated file handles come close to the maximum, but the number of actually\n" |
| | 744 | "used ones is far behind, you've encountered a peak in your usage of file\n" |
| | 745 | "handles and you don't need to increase the maximum.\n" |
| | 746 | "\n" |
| | 747 | "inode-state and inode-nr\n" |
| | 748 | "------------------------\n" |
| | 749 | "\n" |
| | 750 | "The file inode-nr contains the first two items from inode-state, so we'll skip\n" |
| | 751 | "to that file...\n" |
| | 752 | "\n" |
| | 753 | "inode-state contains two actual numbers and five dummy values. The numbers\n" |
| | 754 | "are nr_inodes and nr_free_inodes (in order of appearance).\n" |
| | 755 | "\n" |
| | 756 | "nr_inodes\n" |
| | 757 | "~~~~~~~~~\n" |
| | 758 | "\n" |
| | 759 | "Denotes the number of inodes the system has allocated. This number will\n" |
| | 760 | "grow and shrink dynamically.\n" |
| | 761 | "\n" |
| | 762 | "nr_free_inodes\n" |
| | 763 | "--------------\n" |
| | 764 | "\n" |
| | 765 | "Represents the number of free inodes. Ie. The number of inuse inodes is\n" |
| | 766 | "(nr_inodes - nr_free_inodes).\n" |
| | 767 | "\n" |
| | 768 | "super-nr and super-max\n" |
| | 769 | "----------------------\n" |
| | 770 | "\n" |
| | 771 | "Again, super block structures are allocated by the kernel, but not freed. The\n" |
| | 772 | "file super-max contains the maximum number of super block handlers, where\n" |
| | 773 | "super-nr shows the number of currently allocated ones.\n" |
| | 774 | "\n" |
| | 775 | "Every mounted file system needs a super block, so if you plan to mount lots of\n" |
| | 776 | "file systems, you may want to increase these numbers.\n" |
| | 777 | "\n" |
| | 778 | "2.2 /proc/sys/fs/binfmt_misc - Miscellaneous binary formats\n" |
| | 779 | "-----------------------------------------------------------\n" |
| | 780 | "\n" |
| | 781 | "Besides these files, there is the subdirectory /proc/sys/fs/binfmt_misc. This\n" |
| | 782 | "handles the kernel support for miscellaneous binary formats.\n" |
| | 783 | "\n" |
| | 784 | "Binfmt_misc provides the ability to register additional binary formats to the\n" |
| | 785 | "Kernel without compiling an additional module/kernel. Therefore, binfmt_misc\n" |
| | 786 | "needs to know magic numbers at the beginning or the filename extension of the\n" |
| | 787 | "binary.\n" |
| | 788 | "\n" |
| | 789 | "It works by maintaining a linked list of structs that contain a description of\n" |
| | 790 | "a binary format, including a magic with size (or the filename extension),\n" |
| | 791 | "offset and mask, and the interpreter name. On request it invokes the given\n" |
| | 792 | "interpreter with the original program as argument, as binfmt_java and\n" |
| | 793 | "binfmt_em86 and binfmt_mz do. Since binfmt_misc does not define any default\n" |
| | 794 | "binary-formats, you have to register an additional binary-format.\n" |
| | 795 | "\n" |
| | 796 | "There are two general files in binfmt_misc and one file per registered format.\n" |
| | 797 | "The two general files are register and status.\n" |
| | 798 | "\n" |
| | 799 | "Registering a new binary format\n" |
| | 800 | "-------------------------------\n" |
| | 801 | "\n" |
| | 802 | "To register a new binary format you have to issue the command\n" |
| | 803 | "\n" |
| | 804 | " echo :name:type:offset:magic:mask:interpreter: > /proc/sys/fs/binfmt_misc/register \n" |
| | 805 | "\n" |
| | 806 | "\n" |
| | 807 | "\n" |
| | 808 | "with appropriate name (the name for the /proc-dir entry), offset (defaults to\n" |
| | 809 | "0, if omitted), magic, mask (which can be omitted, defaults to all 0xff) and\n" |
| | 810 | "last but not least, the interpreter that is to be invoked (for example and\n" |
| | 811 | "testing /bin/echo). Type can be M for usual magic matching or E for filename\n" |
| | 812 | "extension matching (give extension in place of magic).\n" |
| | 813 | "\n" |
| | 814 | "Check or reset the status of the binary format handler\n" |
| | 815 | "------------------------------------------------------\n" |
| | 816 | "\n" |
| | 817 | "If you do a cat on the file /proc/sys/fs/binfmt_misc/status, you will get the\n" |
| | 818 | "current status (enabled/disabled) of binfmt_misc. Change the status by echoing\n" |
| | 819 | "0 (disables) or 1 (enables) or -1 (caution: this clears all previously\n" |
| | 820 | "registered binary formats) to status. For example echo 0 > status to disable\n" |
| | 821 | "binfmt_misc (temporarily).\n" |
| | 822 | "\n" |
| | 823 | "Status of a single handler\n" |
| | 824 | "--------------------------\n" |
| | 825 | "\n" |
| | 826 | "Each registered handler has an entry in /proc/sys/fs/binfmt_misc. These files\n" |
| | 827 | "perform the same function as status, but their scope is limited to the actual\n" |
| | 828 | "binary format. By cating this file, you also receive all related information\n" |
| | 829 | "about the interpreter/magic of the binfmt.\n" |
| | 830 | "\n" |
| | 831 | "Example usage of binfmt_misc (emulate binfmt_java)\n" |
| | 832 | "--------------------------------------------------\n" |
| | 833 | "\n" |
| | 834 | " cd /proc/sys/fs/binfmt_misc \n" |
| | 835 | " echo ':Java:M::\\xca\\xfe\\xba\\xbe::/usr/local/java/bin/javawrapper:' > register \n" |
| | 836 | " echo ':HTML:E::html::/usr/local/java/bin/appletviewer:' > register \n" |
| | 837 | " echo ':Applet:M::<applet::/usr/local/java/bin/appletviewer:' > register \n" |
| | 838 | " echo ':DEXE:M::\\x0eDEX::/usr/bin/dosexec:' > register \n" |
| | 839 | "\n" |
| | 840 | "\n" |
| | 841 | "These four lines add support for Java executables and Java applets (like\n" |
| | 842 | "binfmt_java, additionally recognizing the .html extension with no need to put\n" |
| | 843 | "<!--applet> to every applet file). You have to install the JDK and the\n" |
| | 844 | "shell-script /usr/local/java/bin/javawrapper too. It works around the\n" |
| | 845 | "brokenness of the Java filename handling. To add a Java binary, just create a\n" |
| | 846 | "link to the class-file somewhere in the path.\n" |
| | 847 | "\n" |
| | 848 | "2.3 /proc/sys/kernel - general kernel parameters\n" |
| | 849 | "------------------------------------------------\n" |
| | 850 | "\n" |
| | 851 | "This directory reflects general kernel behaviors. As I've said before, the\n" |
| | 852 | "contents depend on your configuration. Here you'll find the most important\n" |
| | 853 | "files, along with descriptions of what they mean and how to use them.\n" |
| | 854 | "\n" |
| | 855 | "acct\n" |
| | 856 | "----\n" |
| | 857 | "\n" |
| | 858 | "The file contains three values; highwater, lowwater, and frequency.\n" |
| | 859 | "\n" |
| | 860 | "It exists only when BSD-style process accounting is enabled. These values\n" |
| | 861 | "control its behavior. If the free space on the file system where the log lives\n" |
| | 862 | "goes below lowwater percentage, accounting suspends. If it goes above\n" |
| | 863 | "highwater percentage, accounting resumes. Frequency determines how often you\n" |
| | 864 | "check the amount of free space (value is in seconds). Default settings are: 4,\n" |
| | 865 | "2, and 30. That is, suspend accounting if there is less than 2 percent free;\n" |
| | 866 | "resume it if we have a value of 3 or more percent; consider information about\n" |
| | 867 | "the amount of free space valid for 30 seconds\n" |
| | 868 | "\n" |
| | 869 | "ctrl-alt-del\n" |
| | 870 | "------------\n" |
| | 871 | "\n" |
| | 872 | "When the value in this file is 0, ctrl-alt-del is trapped and sent to the init\n" |
| | 873 | "program to handle a graceful restart. However, when the value is greater that\n" |
| | 874 | "zero, Linux's reaction to this key combination will be an immediate reboot,\n" |
| | 875 | "without syncing its dirty buffers.\n" |
| | 876 | "\n" |
| | 877 | "[NOTE]\n" |
| | 878 | " When a program (like dosemu) has the keyboard in raw mode, the\n" |
| | 879 | " ctrl-alt-del is intercepted by the program before it ever reaches the\n" |
| | 880 | " kernel tty layer, and it is up to the program to decide what to do with\n" |
| | 881 | " it.\n" |
| | 882 | "\n" |
| | 883 | "domainname and hostname\n" |
| | 884 | "-----------------------\n" |
| | 885 | "\n" |
| | 886 | "These files can be controlled to set the NIS domainname and hostname of your\n" |
| | 887 | "box. For the classic darkstar.frop.org a simple:\n" |
| | 888 | "\n" |
| | 889 | " # echo \"darkstar\" > /proc/sys/kernel/hostname \n" |
| | 890 | " # echo \"frop.org\" > /proc/sys/kernel/domainname \n" |
| | 891 | "\n" |
| | 892 | "\n" |
| | 893 | "would suffice to set your hostname and NIS domainname.\n" |
| | 894 | "\n" |
| | 895 | "osrelease, ostype and version\n" |
| | 896 | "-----------------------------\n" |
| | 897 | "\n" |
| | 898 | "The names make it pretty obvious what these fields contain:\n" |
| | 899 | "\n" |
| | 900 | " > cat /proc/sys/kernel/osrelease \n" |
| | 901 | " 2.2.12 \n" |
| | 902 | " \n" |
| | 903 | " > cat /proc/sys/kernel/ostype \n" |
| | 904 | " Linux \n" |
| | 905 | " \n" |
| | 906 | " > cat /proc/sys/kernel/version \n" |
| | 907 | " #4 Fri Oct 1 12:41:14 PDT 1999 \n" |
| | 908 | "\n" |
| | 909 | "\n" |
| | 910 | "The files osrelease and ostype should be clear enough. Version needs a little\n" |
| | 911 | "more clarification. The #4 means that this is the 4th kernel built from this\n" |
| | 912 | "source base and the date after it indicates the time the kernel was built. The\n" |
| | 913 | "only way to tune these values is to rebuild the kernel.\n" |
| | 914 | "\n" |
| | 915 | "panic\n" |
| | 916 | "-----\n" |
| | 917 | "\n" |
| | 918 | "The value in this file represents the number of seconds the kernel waits\n" |
| | 919 | "before rebooting on a panic. When you use the software watchdog, the\n" |
| | 920 | "recommended setting is 60. If set to 0, the auto reboot after a kernel panic\n" |
| | 921 | "is disabled, which is the default setting.\n" |
| | 922 | "\n" |
| | 923 | "printk\n" |
| | 924 | "------\n" |
| | 925 | "\n" |
| | 926 | "The four values in printk denote\n" |
| | 927 | "* console_loglevel,\n" |
| | 928 | "* default_message_loglevel,\n" |
| | 929 | "* minimum_console_level and\n" |
| | 930 | "* default_console_loglevel\n" |
| | 931 | "respectively.\n" |
| | 932 | "\n" |
| | 933 | "These values influence printk() behavior when printing or logging error\n" |
| | 934 | "messages, which come from inside the kernel. See syslog(2) for more\n" |
| | 935 | "information on the different log levels.\n" |
| | 936 | "\n" |
| | 937 | "console_loglevel\n" |
| | 938 | "----------------\n" |
| | 939 | "\n" |
| | 940 | "Messages with a higher priority than this will be printed to the console.\n" |
| | 941 | "\n" |
| | 942 | "default_message_level\n" |
| | 943 | "---------------------\n" |
| | 944 | "\n" |
| | 945 | "Messages without an explicit priority will be printed with this priority.\n" |
| | 946 | "\n" |
| | 947 | "minimum_console_loglevel\n" |
| | 948 | "------------------------\n" |
| | 949 | "\n" |
| | 950 | "Minimum (highest) value to which the console_loglevel can be set.\n" |
| | 951 | "\n" |
| | 952 | "default_console_loglevel\n" |
| | 953 | "------------------------\n" |
| | 954 | "\n" |
| | 955 | "Default value for console_loglevel.\n" |
| | 956 | "\n" |
| | 957 | "sg-big-buff\n" |
| | 958 | "-----------\n" |
| | 959 | "\n" |
| | 960 | "This file shows the size of the generic SCSI (sg) buffer. At this point, you\n" |
| | 961 | "can't tune it yet, but you can change it at compile time by editing\n" |
| | 962 | "include/scsi/sg.h and changing the value of SG_BIG_BUFF.\n" |
| | 963 | "\n" |
| | 964 | "If you use a scanner with SANE (Scanner Access Now Easy) you might want to set\n" |
| | 965 | "this to a higher value. Refer to the SANE documentation on this issue.\n" |
| | 966 | "\n" |
| | 967 | "modprobe\n" |
| | 968 | "--------\n" |
| | 969 | "\n" |
| | 970 | "The location where the modprobe binary is located. The kernel uses this\n" |
| | 971 | "program to load modules on demand.\n" |
| | 972 | "\n" |
| | 973 | "2.4 /proc/sys/vm - The virtual memory subsystem\n" |
| | 974 | "-----------------------------------------------\n" |
| | 975 | "\n" |
| | 976 | "The files in this directory can be used to tune the operation of the virtual\n" |
| | 977 | "memory (VM) subsystem of the Linux kernel. In addition, one of the files\n" |
| | 978 | "(bdflush) has some influence on disk usage.\n" |
| | 979 | "\n" |
| | 980 | "bdflush\n" |
| | 981 | "-------\n" |
| | 982 | "\n" |
| | 983 | "This file controls the operation of the bdflush kernel daemon. It currently\n" |
| | 984 | "contains nine integer values, six of which are actually used by the kernel.\n" |
| | 985 | "They are listed in table 2-2.\n" |
| | 986 | "\n" |
| | 987 | "\n" |
| | 988 | "Table 2-2: Parameters in /proc/sys/vm/bdflush \n" |
| | 989 | "..............................................................................\n" |
| | 990 | " Value Meaning \n" |
| | 991 | " nfract Percentage of buffer cache dirty to activate bdflush \n" |
| | 992 | " ndirty Maximum number of dirty blocks to write out per wake-cycle \n" |
| | 993 | " nrefill Number of clean buffers to try to obtain each time we call refill \n" |
| | 994 | " nref_dirt buffer threshold for activating bdflush when trying to refill\n" |
| | 995 | " buffers. \n" |
| | 996 | " dummy Unused \n" |
| | 997 | " age_buffer Time for normal buffer to age before we flush it \n" |
| | 998 | " age_super Time for superblock to age before we flush it \n" |
| | 999 | " dummy Unused \n" |
| | 1000 | " dummy Unused \n" |
| | 1001 | "..............................................................................\n" |
| | 1002 | "\n" |
| | 1003 | "nfract\n" |
| | 1004 | "------\n" |
| | 1005 | "\n" |
| | 1006 | "This parameter governs the maximum number of dirty buffers in the buffer\n" |
| | 1007 | "cache. Dirty means that the contents of the buffer still have to be written to\n" |
| | 1008 | "disk (as opposed to a clean buffer, which can just be forgotten about).\n" |
| | 1009 | "Setting this to a higher value means that Linux can delay disk writes for a\n" |
| | 1010 | "long time, but it also means that it will have to do a lot of I/O at once when\n" |
| | 1011 | "memory becomes short. A lower value will spread out disk I/O more evenly.\n" |
| | 1012 | "\n" |
| | 1013 | "ndirty\n" |
| | 1014 | "------\n" |
| | 1015 | "\n" |
| | 1016 | "Ndirty gives the maximum number of dirty buffers that bdflush can write to the\n" |
| | 1017 | "disk at one time. A high value will mean delayed, bursty I/O, while a small\n" |
| | 1018 | "value can lead to memory shortage when bdflush isn't woken up often enough.\n" |
| | 1019 | "\n" |
| | 1020 | "nrefill\n" |
| | 1021 | "-------\n" |
| | 1022 | "\n" |
| | 1023 | "This is the number of buffers that bdflush will add to the list of free\n" |
| | 1024 | "buffers when refill_freelist() is called. It is necessary to allocate free\n" |
| | 1025 | "buffers beforehand, since the buffers are often different sizes than the\n" |
| | 1026 | "memory pages and some bookkeeping needs to be done beforehand. The higher the\n" |
| | 1027 | "number, the more memory will be wasted and the less often refill_freelist()\n" |
| | 1028 | "will need to run.\n" |
| | 1029 | "\n" |
| | 1030 | "nref_dirt\n" |
| | 1031 | "---------\n" |
| | 1032 | "\n" |
| | 1033 | "When refill_freelist() comes across more than nref_dirt dirty buffers, it will\n" |
| | 1034 | "wake up bdflush.\n" |
| | 1035 | "\n" |
| | 1036 | "age_buffer and age_super\n" |
| | 1037 | "------------------------\n" |
| | 1038 | "\n" |
| | 1039 | "Finally, the age_buffer and age_super parameters govern the maximum time Linux\n" |
| | 1040 | "waits before writing out a dirty buffer to disk. The value is expressed in\n" |
| | 1041 | "jiffies (clockticks), the number of jiffies per second is 100. Age_buffer is\n" |
| | 1042 | "the maximum age for data blocks, while age_super is for filesystems meta data.\n" |
| | 1043 | "\n" |
| | 1044 | "buffermem\n" |
| | 1045 | "---------\n" |
| | 1046 | "\n" |
| | 1047 | "The three values in this file control how much memory should be used for\n" |
| | 1048 | "buffer memory. The percentage is calculated as a percentage of total system\n" |
| | 1049 | "memory.\n" |
| | 1050 | "\n" |
| | 1051 | "The values are:\n" |
| | 1052 | "\n" |
| | 1053 | "min_percent\n" |
| | 1054 | "-----------\n" |
| | 1055 | "\n" |
| | 1056 | "This is the minimum percentage of memory that should be spent on buffer\n" |
| | 1057 | "memory.\n" |
| | 1058 | "\n" |
| | 1059 | "borrow_percent\n" |
| | 1060 | "--------------\n" |
| | 1061 | "\n" |
| | 1062 | "When Linux is short on memory, and the buffer cache uses more than it has been\n" |
| | 1063 | "allotted, the memory management (MM) subsystem will prune the buffer cache\n" |
| | 1064 | "more heavily than other memory to compensate.\n" |
| | 1065 | "\n" |
| | 1066 | "max_percent\n" |
| | 1067 | "-----------\n" |
| | 1068 | "\n" |
| | 1069 | "This is the maximum amount of memory that can be used for buffer memory.\n" |
| | 1070 | "\n" |
| | 1071 | "freepages\n" |
| | 1072 | "---------\n" |
| | 1073 | "\n" |
| | 1074 | "This file contains three values: min, low and high:\n" |
| | 1075 | "\n" |
| | 1076 | "min\n" |
| | 1077 | "---\n" |
| | 1078 | "When the number of free pages in the system reaches this number, only the\n" |
| | 1079 | "kernel can allocate more memory.\n" |
| | 1080 | "\n" |
| | 1081 | "low\n" |
| | 1082 | "---\n" |
| | 1083 | "If the number of free pages falls below this point, the kernel starts swapping\n" |
| | 1084 | "aggressively.\n" |
| | 1085 | "\n" |
| | 1086 | "high\n" |
| | 1087 | "----\n" |
| | 1088 | "The kernel tries to keep up to this amount of memory free; if memory falls\n" |
| | 1089 | "below this point, the kernel starts gently swapping in the hopes that it never\n" |
| | 1090 | "has to do really aggressive swapping.\n" |
| | 1091 | "\n" |
| | 1092 | "kswapd\n" |
| | 1093 | "------\n" |
| | 1094 | "\n" |
| | 1095 | "Kswapd is the kernel swap out daemon. That is, kswapd is that piece of the\n" |
| | 1096 | "kernel that frees memory when it gets fragmented or full. Since every system\n" |
| | 1097 | "is different, you'll probably want some control over this piece of the system.\n" |
| | 1098 | "\n" |
| | 1099 | "The file contains three numbers:\n" |
| | 1100 | "\n" |
| | 1101 | "tries_base\n" |
| | 1102 | "----------\n" |
| | 1103 | "\n" |
| | 1104 | "The maximum number of pages kswapd tries to free in one round is calculated\n" |
| | 1105 | "from this number. Usually this number will be divided by 4 or 8 (see\n" |
| | 1106 | "mm/vmscan.c), so it isn't as big as it looks.\n" |
| | 1107 | "\n" |
| | 1108 | "When you need to increase the bandwidth to/from swap, you'll want to increase\n" |
| | 1109 | "this number.\n" |
| | 1110 | "\n" |
| | 1111 | "tries_min\n" |
| | 1112 | "---------\n" |
| | 1113 | "\n" |
| | 1114 | "This is the minimum number of times kswapd tries to free a page each time it\n" |
| | 1115 | "is called. Basically it's just there to make sure that kswapd frees some pages\n" |
| | 1116 | "even when it's being called with minimum priority.\n" |
| | 1117 | "\n" |
| | 1118 | "swap_cluster\n" |
| | 1119 | "------------\n" |
| | 1120 | "\n" |
| | 1121 | "This is probably the greatest influence on system performance.\n" |
| | 1122 | "\n" |
| | 1123 | "swap_cluster is the number of pages kswapd writes in one turn. You'll want\n" |
| | 1124 | "this value to be large so that kswapd does its I/O in large chunks and the\n" |
| | 1125 | "disk doesn't have to seek as often, but you don't want it to be too large\n" |
| | 1126 | "since that would flood the request queue.\n" |
| | 1127 | "\n" |
| | 1128 | "overcommit_memory\n" |
| | 1129 | "-----------------\n" |
| | 1130 | "\n" |
| | 1131 | "This file contains one value. The following algorithm is used to decide if\n" |
| | 1132 | "there's enough memory: if the value of overcommit_memory is positive, then\n" |
| | 1133 | "there's always enough memory. This is a useful feature, since programs often\n" |
| | 1134 | "malloc() huge amounts of memory 'just in case', while they only use a small\n" |
| | 1135 | "part of it. Leaving this value at 0 will lead to the failure of such a huge\n" |
| | 1136 | "malloc(), when in fact the system has enough memory for the program to run.\n" |
| | 1137 | "\n" |
| | 1138 | "On the other hand, enabling this feature can cause you to run out of memory\n" |
| | 1139 | "and thrash the system to death, so large and/or important servers will want to\n" |
| | 1140 | "set this value to 0.\n" |
| | 1141 | "\n" |
| | 1142 | "pagecache\n" |
| | 1143 | "---------\n" |
| | 1144 | "\n" |
| | 1145 | "This file does exactly the same job as buffermem, only this file controls the\n" |
| | 1146 | "amount of memory allowed for memory mapping and generic caching of files.\n" |
| | 1147 | "\n" |
| | 1148 | "You don't want the minimum level to be too low, otherwise your system might\n" |
| | 1149 | "thrash when memory is tight or fragmentation is high.\n" |
| | 1150 | "\n" |
| | 1151 | "pagetable_cache\n" |
| | 1152 | "---------------\n" |
| | 1153 | "\n" |
| | 1154 | "The kernel keeps a number of page tables in a per-processor cache (this helps\n" |
| | 1155 | "a lot on SMP systems). The cache size for each processor will be between the\n" |
| | 1156 | "low and the high value.\n" |
| | 1157 | "\n" |
| | 1158 | "On a low-memory, single CPU system, you can safely set these values to 0 so\n" |
| | 1159 | "you don't waste memory. It is used on SMP systems so that the system can\n" |
| | 1160 | "perform fast pagetable allocations without having to acquire the kernel memory\n" |
| | 1161 | "lock.\n" |
| | 1162 | "\n" |
| | 1163 | "For large systems, the settings are probably fine. For normal systems they\n" |
| | 1164 | "won't hurt a bit. For small systems ( less than 16MB ram) it might be\n" |
| | 1165 | "advantageous to set both values to 0.\n" |
| | 1166 | "\n" |
| | 1167 | "swapctl\n" |
| | 1168 | "-------\n" |
| | 1169 | "\n" |
| | 1170 | "This file contains no less than 8 variables. All of these values are used by\n" |
| | 1171 | "kswapd.\n" |
| | 1172 | "\n" |
| | 1173 | "The first four variables\n" |
| | 1174 | "* sc_max_page_age,\n" |
| | 1175 | "* sc_page_advance,\n" |
| | 1176 | "* sc_page_decline and\n" |
| | 1177 | "* sc_page_initial_age\n" |
| | 1178 | "are used to keep track of Linux's page aging. Page aging is a bookkeeping\n" |
| | 1179 | "method to track which pages of memory are often used, and which pages can be\n" |
| | 1180 | "swapped out without consequences.\n" |
| | 1181 | "\n" |
| | 1182 | "When a page is swapped in, it starts at sc_page_initial_age (default 3) and\n" |
| | 1183 | "when the page is scanned by kswapd, its age is adjusted according to the\n" |
| | 1184 | "following scheme:\n" |
| | 1185 | "\n" |
| | 1186 | "* If the page was used since the last time we scanned, its age is increased\n" |
| | 1187 | " by sc_page_advance (default 3). Where the maximum value is given by\n" |
| | 1188 | " sc_max_page_age (default 20).\n" |
| | 1189 | "* Otherwise (meaning it wasn't used) its age is decreased by sc_page_decline\n" |
| | 1190 | " (default 1).\n" |
| | 1191 | "\n" |
| | 1192 | "When a page reaches age 0, it's ready to be swapped out.\n" |
| | 1193 | "\n" |
| | 1194 | "The variables sc_age_cluster_fract, sc_age_cluster_min, sc_pageout_weight and\n" |
| | 1195 | "sc_bufferout_weight, can be used to control kswapd's aggressiveness in\n" |
| | 1196 | "swapping out pages.\n" |
| | 1197 | "\n" |
| | 1198 | "Sc_age_cluster_fract is used to calculate how many pages from a process are to\n" |
| | 1199 | "be scanned by kswapd. The formula used is\n" |
| | 1200 | "\n" |
| | 1201 | "(sc_age_cluster_fract divided by 1024) times resident set size\n" |
| | 1202 | "\n" |
| | 1203 | "So if you want kswapd to scan the whole process, sc_age_cluster_fract needs to\n" |
| | 1204 | "have a value of 1024. The minimum number of pages kswapd will scan is\n" |
| | 1205 | "represented by sc_age_cluster_min, which is done so that kswapd will also scan\n" |
| | 1206 | "small processes.\n" |
| | 1207 | "\n" |
| | 1208 | "The values of sc_pageout_weight and sc_bufferout_weight are used to control\n" |
| | 1209 | "how many tries kswapd will make in order to swap out one page/buffer. These\n" |
| | 1210 | "values can be used to fine-tune the ratio between user pages and buffer/cache\n" |
| | 1211 | "memory. When you find that your Linux system is swapping out too many process\n" |
| | 1212 | "pages in order to satisfy buffer memory demands, you may want to either\n" |
| | 1213 | "increase sc_bufferout_weight, or decrease the value of sc_pageout_weight.\n" |
| | 1214 | "\n" |
| | 1215 | "2.5 /proc/sys/dev - Device specific parameters\n" |
| | 1216 | "----------------------------------------------\n" |
| | 1217 | "\n" |
| | 1218 | "Currently there is only support for CDROM drives, and for those, there is only\n" |
| | 1219 | "one read-only file containing information about the CD-ROM drives attached to\n" |
| | 1220 | "the system:\n" |
| | 1221 | "\n" |
| | 1222 | " >cat /proc/sys/dev/cdrom/info \n" |
| | 1223 | " CD-ROM information, Id: cdrom.c 2.55 1999/04/25 \n" |
| | 1224 | " \n" |
| | 1225 | " drive name: sr0 hdb \n" |
| | 1226 | " drive speed: 32 40 \n" |
| | 1227 | " drive # of slots: 1 0 \n" |
| | 1228 | " Can close tray: 1 1 \n" |
| | 1229 | " Can open tray: 1 1 \n" |
| | 1230 | " Can lock tray: 1 1 \n" |
| | 1231 | " Can change speed: 1 1 \n" |
| | 1232 | " Can select disk: 0 1 \n" |
| | 1233 | " Can read multisession: 1 1 \n" |
| | 1234 | " Can read MCN: 1 1 \n" |
| | 1235 | " Reports media changed: 1 1 \n" |
| | 1236 | " Can play audio: 1 1 \n" |
| | 1237 | "\n" |
| | 1238 | "\n" |
| | 1239 | "You see two drives, sr0 and hdb, along with a list of their features.\n" |
| | 1240 | "\n" |
| | 1241 | "2.6 /proc/sys/sunrpc - Remote procedure calls\n" |
| | 1242 | "---------------------------------------------\n" |
| | 1243 | "\n" |
| | 1244 | "This directory contains four files, which enable or disable debugging for the\n" |
| | 1245 | "RPC functions NFS, NFS-daemon, RPC and NLM. The default values are 0. They can\n" |
| | 1246 | "be set to one to turn debugging on. (The default value is 0 for each)\n" |
| | 1247 | "\n" |
| | 1248 | "2.7 /proc/sys/net - Networking stuff\n" |
| | 1249 | "------------------------------------\n" |
| | 1250 | "\n" |
| | 1251 | "The interface to the networking parts of the kernel is located in\n" |
| | 1252 | "/proc/sys/net. Table 2-3 shows all possible subdirectories. You may see only\n" |
| | 1253 | "some of them, depending on your kernel's configuration.\n" |
| | 1254 | "\n" |
| | 1255 | "\n" |
| | 1256 | "Table 2-3: Subdirectories in /proc/sys/net \n" |
| | 1257 | "..............................................................................\n" |
| | 1258 | " Directory Content Directory Content \n" |
| | 1259 | " core General parameter appletalk Appletalk protocol \n" |
| | 1260 | " unix Unix domain sockets netrom NET/ROM \n" |
| | 1261 | " 802 E802 protocol ax25 AX25 \n" |
| | 1262 | " ethernet Ethernet protocol rose X.25 PLP layer \n" |
| | 1263 | " ipv4 IP version 4 x25 X.25 protocol \n" |
| | 1264 | " ipx IPX token-ring IBM token ring \n" |
| | 1265 | " bridge Bridging decnet DEC net \n" |
| | 1266 | " ipv6 IP version 6 \n" |
| | 1267 | "..............................................................................\n" |
| | 1268 | "\n" |
| | 1269 | "We will concentrate on IP networking here. Since AX15, X.25, and DEC Net are\n" |
| | 1270 | "only minor players in the Linux world, we'll skip them in this chapter. You'll\n" |
| | 1271 | "find some short info on Appletalk and IPX further on in this chapter. Review\n" |
| | 1272 | "the online documentation and the kernel source to get a detailed view of the\n" |
| | 1273 | "parameters for those protocols. In this section we'll discuss the\n" |
| | 1274 | "subdirectories printed in bold letters in the table above. As default values\n" |
| | 1275 | "are suitable for most needs, there is no need to change these values.\n" |
| | 1276 | "\n" |
| | 1277 | "/proc/sys/net/core - Network core options\n" |
| | 1278 | "-----------------------------------------\n" |
| | 1279 | "\n" |
| | 1280 | "rmem_default\n" |
| | 1281 | "------------\n" |
| | 1282 | "\n" |
| | 1283 | "The default setting of the socket receive buffer in bytes.\n" |
| | 1284 | "\n" |
| | 1285 | "rmem_max\n" |
| | 1286 | "--------\n" |
| | 1287 | "\n" |
| | 1288 | "The maximum receive socket buffer size in bytes.\n" |
| | 1289 | "\n" |
| | 1290 | "wmem_default\n" |
| | 1291 | "------------\n" |
| | 1292 | "\n" |
| | 1293 | "The default setting (in bytes) of the socket send buffer.\n" |
| | 1294 | "\n" |
| | 1295 | "wmem_max\n" |
| | 1296 | "--------\n" |
| | 1297 | "\n" |
| | 1298 | "The maximum send socket buffer size in bytes.\n" |
| | 1299 | "\n" |
| | 1300 | "message_burst and message_cost\n" |
| | 1301 | "------------------------------\n" |
| | 1302 | "\n" |
| | 1303 | "These parameters are used to limit the warning messages written to the kernel\n" |
| | 1304 | "log from the networking code. They enforce a rate limit to make a\n" |
| | 1305 | "denial-of-service attack impossible. A higher message_cost factor, results in\n" |
| | 1306 | "fewer messages that will be written. Message_burst controls when messages will\n" |
| | 1307 | "be dropped. The default settings limit warning messages to one every five\n" |
| | 1308 | "seconds.\n" |
| | 1309 | "\n" |
| | 1310 | "netdev_max_backlog\n" |
| | 1311 | "------------------\n" |
| | 1312 | "\n" |
| | 1313 | "Maximum number of packets, queued on the INPUT side, when the interface\n" |
| | 1314 | "receives packets faster than kernel can process them.\n" |
| | 1315 | "\n" |
| | 1316 | "optmem_max\n" |
| | 1317 | "----------\n" |
| | 1318 | "\n" |
| | 1319 | "Maximum ancillary buffer size allowed per socket. Ancillary data is a sequence\n" |
| | 1320 | "of struct cmsghdr structures with appended data.\n" |
| | 1321 | "\n" |
| | 1322 | "/proc/sys/net/unix - Parameters for Unix domain sockets\n" |
| | 1323 | "-------------------------------------------------------\n" |
| | 1324 | "\n" |
| | 1325 | "There are only two files in this subdirectory. They control the delays for\n" |
| | 1326 | "deleting and destroying socket descriptors.\n" |
| | 1327 | "\n" |
| | 1328 | "2.8 /proc/sys/net/ipv4 - IPV4 settings\n" |
| | 1329 | "--------------------------------------\n" |
| | 1330 | "\n" |
| | 1331 | "IP version 4 is still the most used protocol in Unix networking. It will be\n" |
| | 1332 | "replaced by IP version 6 in the next couple of years, but for the moment it's\n" |
| | 1333 | "the de facto standard for the internet and is used in most networking\n" |
| | 1334 | "environments around the world. Because of the importance of this protocol,\n" |
| | 1335 | "we'll have a deeper look into the subtree controlling the behavior of the IPv4\n" |
| | 1336 | "subsystem of the Linux kernel.\n" |
| | 1337 | "\n" |
| | 1338 | "Let's start with the entries in /proc/sys/net/ipv4.\n" |
| | 1339 | "\n" |
| | 1340 | "ICMP settings\n" |
| | 1341 | "-------------\n" |
| | 1342 | "\n" |
| | 1343 | "icmp_echo_ignore_all and icmp_echo_ignore_broadcasts\n" |
| | 1344 | "----------------------------------------------------\n" |
| | 1345 | "\n" |
| | 1346 | "Turn on (1) or off (0), if the kernel should ignore all ICMP ECHO requests, or\n" |
| | 1347 | "just those to broadcast and multicast addresses.\n" |
| | 1348 | "\n" |
| | 1349 | "Please note that if you accept ICMP echo requests with a broadcast/multi\\-cast\n" |
| | 1350 | "destination address your network may be used as an exploder for denial of\n" |
| | 1351 | "service packet flooding attacks to other hosts.\n" |
| | 1352 | "\n" |
| | 1353 | "icmp_destunreach_rate, icmp_echoreply_rate, icmp_paramprob_rate and icmp_timeexeed_rate\n" |
| | 1354 | "---------------------------------------------------------------------------------------\n" |
| | 1355 | "\n" |
| | 1356 | "Sets limits for sending ICMP packets to specific targets. A value of zero\n" |
| | 1357 | "disables all limiting. Any positive value sets the maximum package rate in\n" |
| | 1358 | "hundredth of a second (on Intel systems).\n" |
| | 1359 | "\n" |
| | 1360 | "IP settings\n" |
| | 1361 | "-----------\n" |
| | 1362 | "\n" |
| | 1363 | "ip_autoconfig\n" |
| | 1364 | "-------------\n" |
| | 1365 | "\n" |
| | 1366 | "This file contains the number one if the host received its IP configuration by\n" |
| | 1367 | "RARP, BOOTP, DHCP or a similar mechanism. Otherwise it is zero.\n" |
| | 1368 | "\n" |
| | 1369 | "ip_default_ttl\n" |
| | 1370 | "--------------\n" |
| | 1371 | "\n" |
| | 1372 | "TTL (Time To Live) for IPv4 interfaces. This is simply the maximum number of\n" |
| | 1373 | "hops a packet may travel.\n" |
| | 1374 | "\n" |
| | 1375 | "ip_dynaddr\n" |
| | 1376 | "----------\n" |
| | 1377 | "\n" |
| | 1378 | "Enable dynamic socket address rewriting on interface address change. This is\n" |
| | 1379 | "useful for dialup interface with changing IP addresses.\n" |
| | 1380 | "\n" |
| | 1381 | "ip_forward\n" |
| | 1382 | "----------\n" |
| | 1383 | "\n" |
| | 1384 | "Enable or disable forwarding of IP packages between interfaces. Changing this\n" |
| | 1385 | "value resets all other parameters to their default values. They differ if the\n" |
| | 1386 | "kernel is configured as host or router.\n" |
| | 1387 | "\n" |
| | 1388 | "ip_local_port_range\n" |
| | 1389 | "-------------------\n" |
| | 1390 | "\n" |
| | 1391 | "Range of ports used by TCP and UDP to choose the local port. Contains two\n" |
| | 1392 | "numbers, the first number is the lowest port, the second number the highest\n" |
| | 1393 | "local port. Default is 1024-4999. Should be changed to 32768-61000 for\n" |
| | 1394 | "high-usage systems.\n" |
| | 1395 | "\n" |
| | 1396 | "ip_no_pmtu_disc\n" |
| | 1397 | "---------------\n" |
| | 1398 | "\n" |
| | 1399 | "Global switch to turn path MTU discovery off. It can also be set on a per\n" |
| | 1400 | "socket basis by the applications or on a per route basis.\n" |
| | 1401 | "\n" |
| | 1402 | "ip_masq_debug\n" |
| | 1403 | "-------------\n" |
| | 1404 | "\n" |
| | 1405 | "Enable/disable debugging of IP masquerading.\n" |
| | 1406 | "\n" |
| | 1407 | "IP fragmentation settings\n" |
| | 1408 | "-------------------------\n" |
| | 1409 | "\n" |
| | 1410 | "ipfrag_high_trash and ipfrag_low_trash\n" |
| | 1411 | "--------------------------------------\n" |
| | 1412 | "\n" |
| | 1413 | "Maximum memory used to reassemble IP fragments. When ipfrag_high_thresh bytes\n" |
| | 1414 | "of memory is allocated for this purpose, the fragment handler will toss\n" |
| | 1415 | "packets until ipfrag_low_thresh is reached.\n" |
| | 1416 | "\n" |
| | 1417 | "ipfrag_time\n" |
| | 1418 | "-----------\n" |
| | 1419 | "\n" |
| | 1420 | "Time in seconds to keep an IP fragment in memory.\n" |
| | 1421 | "\n" |
| | 1422 | "TCP settings\n" |
| | 1423 | "------------\n" |
| | 1424 | "\n" |
| | 1425 | "tcp_ecn\n" |
| | 1426 | "-------\n" |
| | 1427 | "\n" |
| | 1428 | "This file controls the use of the ECN bit in the IPv4 headers, this is a new\n" |
| | 1429 | "feature about Explicit Congestion Notification, but some routers and firewalls\n" |
| | 1430 | "block trafic that has this bit set, so it could be necessary to echo 0 to\n" |
| | 1431 | "/proc/sys/net/ipv4/tcp_ecn, if you want to talk to this sites. For more info\n" |
| | 1432 | "you could read RFC2481.\n" |
| | 1433 | "\n" |
| | 1434 | "tcp_retrans_collapse\n" |
| | 1435 | "--------------------\n" |
| | 1436 | "\n" |
| | 1437 | "Bug-to-bug compatibility with some broken printers. On retransmit, try to send\n" |
| | 1438 | "larger packets to work around bugs in certain TCP stacks. Can be turned off by\n" |
| | 1439 | "setting it to zero.\n" |
| | 1440 | "\n" |
| | 1441 | "tcp_keepalive_probes\n" |
| | 1442 | "--------------------\n" |
| | 1443 | "\n" |
| | 1444 | "Number of keep alive probes TCP sends out, until it decides that the\n" |
| | 1445 | "connection is broken.\n" |
| | 1446 | "\n" |
| | 1447 | "tcp_keepalive_time\n" |
| | 1448 | "------------------\n" |
| | 1449 | "\n" |
| | 1450 | "How often TCP sends out keep alive messages, when keep alive is enabled. The\n" |
| | 1451 | "default is 2 hours.\n" |
| | 1452 | "\n" |
| | 1453 | "tcp_syn_retries\n" |
| | 1454 | "---------------\n" |
| | 1455 | "\n" |
| | 1456 | "Number of times initial SYNs for a TCP connection attempt will be\n" |
| | 1457 | "retransmitted. Should not be higher than 255. This is only the timeout for\n" |
| | 1458 | "outgoing connections, for incoming connections the number of retransmits is\n" |
| | 1459 | "defined by tcp_retries1.\n" |
| | 1460 | "\n" |
| | 1461 | "tcp_sack\n" |
| | 1462 | "--------\n" |
| | 1463 | "\n" |
| | 1464 | "Enable select acknowledgments after RFC2018.\n" |
| | 1465 | "\n" |
| | 1466 | "tcp_timestamps\n" |
| | 1467 | "--------------\n" |
| | 1468 | "\n" |
| | 1469 | "Enable timestamps as defined in RFC1323.\n" |
| | 1470 | "\n" |
| | 1471 | "tcp_stdurg\n" |
| | 1472 | "----------\n" |
| | 1473 | "\n" |
| | 1474 | "Enable the strict RFC793 interpretation of the TCP urgent pointer field. The\n" |
| | 1475 | "default is to use the BSD compatible interpretation of the urgent pointer\n" |
| | 1476 | "pointing to the first byte after the urgent data. The RFC793 interpretation is\n" |
| | 1477 | "to have it point to the last byte of urgent data. Enabling this option may\n" |
| | 1478 | "lead to interoperatibility problems. Disabled by default.\n" |
| | 1479 | "\n" |
| | 1480 | "tcp_syncookies\n" |
| | 1481 | "--------------\n" |
| | 1482 | "\n" |
| | 1483 | "Only valid when the kernel was compiled with CONFIG_SYNCOOKIES. Send out\n" |
| | 1484 | "syncookies when the syn backlog queue of a socket overflows. This is to ward\n" |
| | 1485 | "off the common 'syn flood attack'. Disabled by default.\n" |
| | 1486 | "\n" |
| | 1487 | "Note that the concept of a socket backlog is abandoned. This means the peer\n" |
| | 1488 | "may not receive reliable error messages from an over loaded server with\n" |
| | 1489 | "syncookies enabled.\n" |
| | 1490 | "\n" |
| | 1491 | "tcp_window_scaling\n" |
| | 1492 | "------------------\n" |
| | 1493 | "\n" |
| | 1494 | "Enable window scaling as defined in RFC1323.\n" |
| | 1495 | "\n" |
| | 1496 | "tcp_fin_timeout\n" |
| | 1497 | "---------------\n" |
| | 1498 | "\n" |
| | 1499 | "The length of time in seconds it takes to receive a final FIN before the\n" |
| | 1500 | "socket is always closed. This is strictly a violation of the TCP\n" |
| | 1501 | "specification, but required to prevent denial-of-service attacks.\n" |
| | 1502 | "\n" |
| | 1503 | "tcp_max_ka_probes\n" |
| | 1504 | "-----------------\n" |
| | 1505 | "\n" |
| | 1506 | "Indicates how many keep alive probes are sent per slow timer run. Should not\n" |
| | 1507 | "be set too high to prevent bursts.\n" |
| | 1508 | "\n" |
| | 1509 | "tcp_max_syn_backlog\n" |
| | 1510 | "-------------------\n" |
| | 1511 | "\n" |
| | 1512 | "Length of the per socket backlog queue. Since Linux 2.2 the backlog specified\n" |
| | 1513 | "in listen(2) only specifies the length of the backlog queue of already\n" |
| | 1514 | "established sockets. When more connection requests arrive Linux starts to drop\n" |
| | 1515 | "packets. When syncookies are enabled the packets are still answered and the\n" |
| | 1516 | "maximum queue is effectively ignored.\n" |
| | 1517 | "\n" |
| | 1518 | "tcp_retries1\n" |
| | 1519 | "------------\n" |
| | 1520 | "\n" |
| | 1521 | "Defines how often an answer to a TCP connection request is retransmitted\n" |
| | 1522 | "before giving up.\n" |
| | 1523 | "\n" |
| | 1524 | "tcp_retries2\n" |
| | 1525 | "------------\n" |
| | 1526 | "\n" |
| | 1527 | "Defines how often a TCP packet is retransmitted before giving up.\n" |
| | 1528 | "\n" |
| | 1529 | "Interface specific settings\n" |
| | 1530 | "---------------------------\n" |
| | 1531 | "\n" |
| | 1532 | "In the directory /proc/sys/net/ipv4/conf you'll find one subdirectory for each\n" |
| | 1533 | "interface the system knows about and one directory calls all. Changes in the\n" |
| | 1534 | "all subdirectory affect all interfaces, whereas changes in the other\n" |
| | 1535 | "subdirectories affect only one interface. All directories have the same\n" |
| | 1536 | "entries:\n" |
| | 1537 | "\n" |
| | 1538 | "accept_redirects\n" |
| | 1539 | "----------------\n" |
| | 1540 | "\n" |
| | 1541 | "This switch decides if the kernel accepts ICMP redirect messages or not. The\n" |
| | 1542 | "default is 'yes' if the kernel is configured for a regular host and 'no' for a\n" |
| | 1543 | "router configuration.\n" |
| | 1544 | "\n" |
| | 1545 | "accept_source_route\n" |
| | 1546 | "-------------------\n" |
| | 1547 | "\n" |
| | 1548 | "Should source routed packages be accepted or declined. The default is\n" |
| | 1549 | "dependent on the kernel configuration. It's 'yes' for routers and 'no' for\n" |
| | 1550 | "hosts.\n" |
| | 1551 | "\n" |
| | 1552 | "bootp_relay\n" |
| | 1553 | "~~~~~~~~~~~\n" |
| | 1554 | "\n" |
| | 1555 | "Accept packets with source address 0.b.c.d with destinations not to this host\n" |
| | 1556 | "as local ones. It is supposed that a BOOTP relay daemon will catch and forward\n" |
| | 1557 | "such packets.\n" |
| | 1558 | "\n" |
| | 1559 | "The default is 0, since this feature is not implemented yet (kernel version\n" |
| | 1560 | "2.2.12).\n" |
| | 1561 | "\n" |
| | 1562 | "forwarding\n" |
| | 1563 | "----------\n" |
| | 1564 | "\n" |
| | 1565 | "Enable or disable IP forwarding on this interface.\n" |
| | 1566 | "\n" |
| | 1567 | "log_martians\n" |
| | 1568 | "------------\n" |
| | 1569 | "\n" |
| | 1570 | "Log packets with source addresses with no known route to kernel log.\n" |
| | 1571 | "\n" |
| | 1572 | "mc_forwarding\n" |
| | 1573 | "-------------\n" |
| | 1574 | "\n" |
| | 1575 | "Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE and a\n" |
| | 1576 | "multicast routing daemon is required.\n" |
| | 1577 | "\n" |
| | 1578 | "proxy_arp\n" |
| | 1579 | "---------\n" |
| | 1580 | "\n" |
| | 1581 | "Does (1) or does not (0) perform proxy ARP.\n" |
| | 1582 | "\n" |
| | 1583 | "rp_filter\n" |
| | 1584 | "---------\n" |
| | 1585 | "\n" |
| | 1586 | "Integer value determines if a source validation should be made. 1 means yes, 0\n" |
| | 1587 | "means no. Disabled by default, but local/broadcast address spoofing is always\n" |
| | 1588 | "on.\n" |
| | 1589 | "\n" |
| | 1590 | "If you set this to 1 on a router that is the only connection for a network to\n" |
| | 1591 | "the net, it will prevent spoofing attacks against your internal networks\n" |
| | 1592 | "(external addresses can still be spoofed), without the need for additional\n" |
| | 1593 | "firewall rules.\n" |
| | 1594 | "\n" |
| | 1595 | "secure_redirects\n" |
| | 1596 | "----------------\n" |
| | 1597 | "\n" |
| | 1598 | "Accept ICMP redirect messages only for gateways, listed in default gateway\n" |
| | 1599 | "list. Enabled by default.\n" |
| | 1600 | "\n" |
| | 1601 | "shared_media\n" |
| | 1602 | "------------\n" |
| | 1603 | "\n" |
| | 1604 | "If it is not set the kernel does not assume that different subnets on this\n" |
| | 1605 | "device can communicate directly. Default setting is 'yes'.\n" |
| | 1606 | "\n" |
| | 1607 | "send_redirects\n" |
| | 1608 | "--------------\n" |
| | 1609 | "\n" |
| | 1610 | "Determines whether to send ICMP redirects to other hosts.\n" |
| | 1611 | "\n" |
| | 1612 | "Routing settings\n" |
| | 1613 | "----------------\n" |
| | 1614 | "\n" |
| | 1615 | "The directory /proc/sys/net/ipv4/route contains several file to control\n" |
| | 1616 | "routing issues.\n" |
| | 1617 | "\n" |
| | 1618 | "error_burst and error_cost\n" |
| | 1619 | "--------------------------\n" |
| | 1620 | "\n" |
| | 1621 | "These parameters are used to limit the warning messages written to the kernel\n" |
| | 1622 | "log from the routing code. The higher the error_cost factor is, the fewer\n" |
| | 1623 | "messages will be written. Error_burst controls when messages will be dropped.\n" |
| | 1624 | "The default settings limit warning messages to one every five seconds.\n" |
| | 1625 | "\n" |
| | 1626 | "flush\n" |
| | 1627 | "-----\n" |
| | 1628 | "\n" |
| | 1629 | "Writing to this file results in a flush of the routing cache.\n" |
| | 1630 | "\n" |
| | 1631 | "gc_elastic, gc_interval, gc_min_interval, gc_tresh, gc_timeout\n" |
| | 1632 | "--------------------------------------------------------------\n" |
| | 1633 | "\n" |
| | 1634 | "Values to control the frequency and behavior of the garbage collection\n" |
| | 1635 | "algorithm for the routing cache.\n" |
| | 1636 | "\n" |
| | 1637 | "max_size\n" |
| | 1638 | "--------\n" |
| | 1639 | "\n" |
| | 1640 | "Maximum size of the routing cache. Old entries will be purged once the cache\n" |
| | 1641 | "reached has this size.\n" |
| | 1642 | "\n" |
| | 1643 | "max_delay, min_delay\n" |
| | 1644 | "--------------------\n" |
| | 1645 | "\n" |
| | 1646 | "Delays for flushing the routing cache.\n" |
| | 1647 | "\n" |
| | 1648 | "redirect_load, redirect_number\n" |
| | 1649 | "------------------------------\n" |
| | 1650 | "\n" |
| | 1651 | "Factors which determine if more ICPM redirects should be sent to a specific\n" |
| | 1652 | "host. No redirects will be sent once the load limit or the maximum number of\n" |
| | 1653 | "redirects has been reached.\n" |
| | 1654 | "\n" |
| | 1655 | "redirect_silence\n" |
| | 1656 | "----------------\n" |
| | 1657 | "\n" |
| | 1658 | "Timeout for redirects. After this period redirects will be sent again, even if\n" |
| | 1659 | "this has been stopped, because the load or number limit has been reached.\n" |
| | 1660 | "\n" |
| | 1661 | "Network Neighbor handling\n" |
| | 1662 | "-------------------------\n" |
| | 1663 | "\n" |
| | 1664 | "Settings about how to handle connections with direct neighbors (nodes attached\n" |
| | 1665 | "to the same link) can be found in the directory /proc/sys/net/ipv4/neigh.\n" |
| | 1666 | "\n" |
| | 1667 | "As we saw it in the conf directory, there is a default subdirectory which\n" |
| | 1668 | "holds the default values, and one directory for each interface. The contents\n" |
| | 1669 | "of the directories are identical, with the single exception that the default\n" |
| | 1670 | "settings contain additional options to set garbage collection parameters.\n" |
| | 1671 | "\n" |
| | 1672 | "In the interface directories you'll find the following entries:\n" |
| | 1673 | "\n" |
| | 1674 | "base_reachable_time\n" |
| | 1675 | "-------------------\n" |
| | 1676 | "\n" |
| | 1677 | "A base value used for computing the random reachable time value as specified\n" |
| | 1678 | "in RFC2461.\n" |
| | 1679 | "\n" |
| | 1680 | "retrans_time\n" |
| | 1681 | "------------\n" |
| | 1682 | "\n" |
| | 1683 | "The time, expressed in jiffies (1/100 sec), between retransmitted Neighbor\n" |
| | 1684 | "Solicitation messages. Used for address resolution and to determine if a\n" |
| | 1685 | "neighbor is unreachable.\n" |
| | 1686 | "\n" |
| | 1687 | "unres_qlen\n" |
| | 1688 | "----------\n" |
| | 1689 | "\n" |
| | 1690 | "Maximum queue length for a pending arp request - the number of packets which\n" |
| | 1691 | "are accepted from other layers while the ARP address is still resolved.\n" |
| | 1692 | "\n" |
| | 1693 | "anycast_delay\n" |
| | 1694 | "-------------\n" |
| | 1695 | "\n" |
| | 1696 | "Maximum for random delay of answers to neighbor solicitation messages in\n" |
| | 1697 | "jiffies (1/100 sec). Not yet implemented (Linux does not have anycast support\n" |
| | 1698 | "yet).\n" |
| | 1699 | "\n" |
| | 1700 | "ucast_solicit\n" |
| | 1701 | "-------------\n" |
| | 1702 | "\n" |
| | 1703 | "Maximum number of retries for unicast solicitation.\n" |
| | 1704 | "\n" |
| | 1705 | "mcast_solicit\n" |
| | 1706 | "-------------\n" |
| | 1707 | "\n" |
| | 1708 | "Maximum number of retries for multicast solicitation.\n" |
| | 1709 | "\n" |
| | 1710 | "delay_first_probe_time\n" |
| | 1711 | "----------------------\n" |
| | 1712 | "\n" |
| | 1713 | "Delay for the first time probe if the neighbor is reachable. (see\n" |
| | 1714 | "gc_stale_time)\n" |
| | 1715 | "\n" |
| | 1716 | "locktime\n" |
| | 1717 | "--------\n" |
| | 1718 | "\n" |
| | 1719 | "An ARP/neighbor entry is only replaced with a new one if the old is at least\n" |
| | 1720 | "locktime old. This prevents ARP cache thrashing.\n" |
| | 1721 | "\n" |
| | 1722 | "proxy_delay\n" |
| | 1723 | "-----------\n" |
| | 1724 | "\n" |
| | 1725 | "Maximum time (real time is random [0..proxytime]) before answering to an ARP\n" |
| | 1726 | "request for which we have an proxy ARP entry. In some cases, this is used to\n" |
| | 1727 | "prevent network flooding.\n" |
| | 1728 | "\n" |
| | 1729 | "proxy_qlen\n" |
| | 1730 | "----------\n" |
| | 1731 | "\n" |
| | 1732 | "Maximum queue length of the delayed proxy arp timer. (see proxy_delay).\n" |
| | 1733 | "\n" |
| | 1734 | "app_solcit\n" |
| | 1735 | "----------\n" |
| | 1736 | "\n" |
| | 1737 | "Determines the number of requests to send to the user level ARP daemon. Use 0\n" |
| | 1738 | "to turn off.\n" |
| | 1739 | "\n" |
| | 1740 | "gc_stale_time\n" |
| | 1741 | "-------------\n" |
| | 1742 | "\n" |
| | 1743 | "Determines how often to check for stale ARP entries. After an ARP entry is\n" |
| | 1744 | "stale it will be resolved again (which is useful when an IP address migrates\n" |
| | 1745 | "to another machine). When ucast_solicit is greater than 0 it first tries to\n" |
| | 1746 | "send an ARP packet directly to the known host When that fails and\n" |
| | 1747 | "mcast_solicit is greater than 0, an ARP request is broadcasted.\n" |
| | 1748 | "\n" |
| | 1749 | "2.9 Appletalk\n" |
| | 1750 | "-------------\n" |
| | 1751 | "\n" |
| | 1752 | "The /proc/sys/net/appletalk directory holds the Appletalk configuration data\n" |
| | 1753 | "when Appletalk is loaded. The configurable parameters are:\n" |
| | 1754 | "\n" |
| | 1755 | "aarp-expiry-time\n" |
| | 1756 | "----------------\n" |
| | 1757 | "\n" |
| | 1758 | "The amount of time we keep an ARP entry before expiring it. Used to age out\n" |
| | 1759 | "old hosts.\n" |
| | 1760 | "\n" |
| | 1761 | "aarp-resolve-time\n" |
| | 1762 | "-----------------\n" |
| | 1763 | "\n" |
| | 1764 | "The amount of time we will spend trying to resolve an Appletalk address.\n" |
| | 1765 | "\n" |
| | 1766 | "aarp-retransmit-limit\n" |
| | 1767 | "---------------------\n" |
| | 1768 | "\n" |
| | 1769 | "The number of times we will retransmit a query before giving up.\n" |
| | 1770 | "\n" |
| | 1771 | "aarp-tick-time\n" |
| | 1772 | "--------------\n" |
| | 1773 | "\n" |
| | 1774 | "Controls the rate at which expires are checked.\n" |
| | 1775 | "\n" |
| | 1776 | "The directory /proc/net/appletalk holds the list of active Appletalk sockets\n" |
| | 1777 | "on a machine.\n" |
| | 1778 | "\n" |
| | 1779 | "The fields indicate the DDP type, the local address (in network:node format)\n" |
| | 1780 | "the remote address, the size of the transmit pending queue, the size of the\n" |
| | 1781 | "received queue (bytes waiting for applications to read) the state and the uid\n" |
| | 1782 | "owning the socket.\n" |
| | 1783 | "\n" |
| | 1784 | "/proc/net/atalk_iface lists all the interfaces configured for appletalk.It\n" |
| | 1785 | "shows the name of the interface, its Appletalk address, the network range on\n" |
| | 1786 | "that address (or network number for phase 1 networks), and the status of the\n" |
| | 1787 | "interface.\n" |
| | 1788 | "\n" |
| | 1789 | "/proc/net/atalk_route lists each known network route. It lists the target\n" |
| | 1790 | "(network) that the route leads to, the router (may be directly connected), the\n" |
| | 1791 | "route flags, and the device the route is using.\n" |
| | 1792 | "\n" |
| | 1793 | "2.10 IPX\n" |
| | 1794 | "--------\n" |
| | 1795 | "\n" |
| | 1796 | "The IPX protocol has no tunable values in proc/sys/net.\n" |
| | 1797 | "\n" |
| | 1798 | "The IPX protocol does, however, provide proc/net/ipx. This lists each IPX\n" |
| | 1799 | "socket giving the local and remote addresses in Novell format (that is\n" |
| | 1800 | "network:node:port). In accordance with the strange Novell tradition,\n" |
| | 1801 | "everything but the port is in hex. Not_Connected is displayed for sockets that\n" |
| | 1802 | "are not tied to a specific remote address. The Tx and Rx queue sizes indicate\n" |
| | 1803 | "the number of bytes pending for transmission and reception. The state\n" |
| | 1804 | "indicates the state the socket is in and the uid is the owning uid of the\n" |
| | 1805 | "socket.\n" |
| | 1806 | "\n" |
| | 1807 | "The /proc/net/ipx_interface file lists all IPX interfaces. For each interface\n" |
| | 1808 | "it gives the network number, the node number, and indicates if the network is\n" |
| | 1809 | "the primary network. It also indicates which device it is bound to (or\n" |
| | 1810 | "Internal for internal networks) and the Frame Type if appropriate. Linux\n" |
| | 1811 | "supports 802.3, 802.2, 802.2 SNAP and DIX (Blue Book) ethernet framing for\n" |
| | 1812 | "IPX.\n" |
| | 1813 | "\n" |
| | 1814 | "The /proc/net/ipx_route table holds a list of IPX routes. For each route it\n" |
| | 1815 | "gives the destination network, the router node (or Directly) and the network\n" |
| | 1816 | "address of the router (or Connected) for internal networks.\n" |
| | 1817 | "\n" |
| | 1818 | "------------------------------------------------------------------------------\n" |
| | 1819 | "Summary\n" |
| | 1820 | "------------------------------------------------------------------------------\n" |
| | 1821 | "Certain aspects of kernel behavior can be modified at runtime, without the\n" |
| | 1822 | "need to recompile the kernel, or even to reboot the system. The files in the\n" |
| | 1823 | "/proc/sys tree can not only be read, but also modified. You can use the echo\n" |
| | 1824 | "command to write value into these files, thereby changing the default settings\n" |
| | 1825 | "of the kernel.\n" |
| | 1826 | "------------------------------------------------------------------------------\n" |
| | 1827 | "\n" |
| | 1828 | msgstr "" |
| | 1829 | "\n" |
| | 1830 | "------------------------------------------------------------------------------\n" |
| | 1831 | " O A R Q U I V O D E S I S T E M A /proc\n" |
| | 1832 | "------------------------------------------------------------------------------\n" |
| | 1833 | "/proc/sys Terrehon Bowden <terrehon@pacbell.net> 7 de Outubro de1999\n" |
| | 1834 | " Bodo Bauer <bb@ricochet.net>\n" |
| | 1835 | "\n" |
| | 1836 | "atualização 2.4.x\t Jorge Nerin <comandante@zaralinux.com> 14 de Novembro de 2000\n" |
| | 1837 | "------------------------------------------------------------------------------\n" |
| | 1838 | "Versão 1.3 Versão do Kernel: 2.2.12\n" |
| | 1839 | "\t\t\t\t\t Kernel version 2.4.0-test11-pre4\n" |
| | 1840 | "------------------------------------------------------------------------------\n" |
| | 1841 | "\n" |
| | 1842 | "Ãndice Remissivo\n" |
| | 1843 | "-----------------\n" |
| | 1844 | "\n" |
| | 1845 | " 0 Prefácio\n" |
| | 1846 | " 0.1\tIntrodução/Créditos\n" |