OSDN Git Service

96e30bd548b5b5d4b0a17a222d8afb34c6924db7
[linuxjm/LDP_man-pages.git] / release / man5 / proc.5
1 .\" Copyright (C) 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com)
2 .\" and Copyright (C) 2002-2008 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" with networking additions from Alan Cox (A.Cox@swansea.ac.uk)
4 .\" and scsi additions from Michael Neuffer (neuffer@mail.uni-mainz.de)
5 .\" and sysctl additions from Andries Brouwer (aeb@cwi.nl)
6 .\" and System V IPC (as well as various other) additions from
7 .\" Michael Kerrisk <mtk.manpages@gmail.com>
8 .\"
9 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
10 .\" This is free documentation; you can redistribute it and/or
11 .\" modify it under the terms of the GNU General Public License as
12 .\" published by the Free Software Foundation; either version 2 of
13 .\" the License, or (at your option) any later version.
14 .\"
15 .\" The GNU General Public License's references to "object code"
16 .\" and "executables" are to be interpreted as the output of any
17 .\" document formatting or typesetting system, including
18 .\" intermediate and printed output.
19 .\"
20 .\" This manual is distributed in the hope that it will be useful,
21 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
22 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 .\" GNU General Public License for more details.
24 .\"
25 .\" You should have received a copy of the GNU General Public
26 .\" License along with this manual; if not, see
27 .\" <http://www.gnu.org/licenses/>.
28 .\" %%%LICENSE_END
29 .\"
30 .\" Modified 1995-05-17 by faith@cs.unc.edu
31 .\" Minor changes by aeb and Marty Leisner (leisner@sdsp.mc.xerox.com).
32 .\" Modified 1996-04-13, 1996-07-22 by aeb@cwi.nl
33 .\" Modified 2001-12-16 by rwhron@earthlink.net
34 .\" Modified 2002-07-13 by jbelton@shaw.ca
35 .\" Modified 2002-07-22, 2003-05-27, 2004-04-06, 2004-05-25
36 .\"    by Michael Kerrisk <mtk.manpages@gmail.com>
37 .\" 2004-11-17, mtk -- updated notes on /proc/loadavg
38 .\" 2004-12-01, mtk, rtsig-max and rtsig-nr went away in 2.6.8
39 .\" 2004-12-14, mtk, updated 'statm', and fixed error in order of list
40 .\" 2005-05-12, mtk, updated 'stat'
41 .\" 2005-07-13, mtk, added /proc/sys/fs/mqueue/*
42 .\" 2005-09-16, mtk, Added /proc/sys/fs/suid_dumpable
43 .\" 2005-09-19, mtk, added /proc/zoneinfo
44 .\" 2005-03-01, mtk, moved /proc/sys/fs/mqueue/* material to mq_overview.7.
45 .\" 2008-06-05, mtk, Added /proc/[pid]/oom_score, /proc/[pid]/oom_adj,
46 .\"     /proc/[pid]/limits, /proc/[pid]/mountinfo, /proc/[pid]/mountstats,
47 .\"     and /proc/[pid]/fdinfo/*.
48 .\" 2008-06-19, mtk, Documented /proc/[pid]/status.
49 .\" 2008-07-15, mtk, added /proc/config.gz
50 .\"
51 .\" FIXME 2.6.13 seems to have /proc/vmcore implemented
52 .\" in the source code, but there is no option available under
53 .\" 'make xconfig'; eventually this should be fixed, and then info
54 .\" from the patch-2.6.13 and change log could be used to write an
55 .\" entry in this man page.
56 .\" Needs CONFIG_VMCORE
57 .\"
58 .\" FIXME cross check against Documentation/filesystems/proc.txt
59 .\" to see what information could be imported from that file
60 .\" into this file.
61 .\"
62 .\"*******************************************************************
63 .\"
64 .\" This file was generated with po4a. Translate the source file.
65 .\"
66 .\"*******************************************************************
67 .TH PROC 5 2013\-04\-17 Linux "Linux Programmer's Manual"
68 .SH 名前
69 proc \- プロセスの情報を含む擬似ファイルシステム
70 .SH 説明
71 \fIproc\fP ファイルシステムは擬似的なファイルシステムであり、 カーネル内のデータへのインターフェースとして使用される。 一般的には
72 \fI/proc\fP にマウントされる。 大部分のファイルは読み出し専用 (read\-only) であるが、 いくつかのファイルは書き込み可能であり、
73 そのファイルに書き込めばカーネルの内部変数を変更できる。
74 .LP
75 以下は \fI/proc\fP 階層の簡単なあらましである。
76 .PD 1
77 .TP 
78 \fI/proc/[pid]\fP
79 .\" FIXME Describe /proc/[pid]/attr and
80 .\"       /proc/[pid]/task/[tid]/attr
81 .\"       This is a directory
82 .\"       Added in ???
83 .\"       CONFIG_SECURITY
84 .\"
85 実行中のプロセスについてのサブディレクトリ。 サブディレクトリ名は (そのプロセスの) プロセス ID である。
86 各サブディレクトリは、以下の擬似ファイルとディレクトリを含む。
87 .TP 
88 \fI/proc/[number]/auxv\fP (カーネル 2.6.0\-test7 以降)
89 実行時にプロセスに渡された ELF インタプリタ情報が格納されている。 個々のエントリは、\fIunsigned long\fP 型の ID 1 個に
90 \fIunsigned long\fP 型の値 1 個が続くフォーマットである。 最後のエントリには 0 が 2 個入っている。
91 .TP 
92 \fI/proc/[pid]/cgroup\fP (Linux 2.6.24 以降)
93 .\"       Info in Documentation/cgroups/cgroups.txt
94 このファイルは、プロセスやタスクが所属するコントロールグループを示す。
95 cgroup の各階層についてエントリーが 1 つあり、
96 各エントリーは以下の形式のコロン区切りのフィールドで構成される。
97 .nf
98
99 \f(CW    5:cpuacct,cpu,cpuset:/daemons\fP
100 .fi
101 .IP
102 コロン区切りの各フィールドは、左から右の順で、以下の意味を持つ。
103 .RS 11
104 .IP 1. 3
105 階層 ID 番号
106 .IP 2.
107 その階層に関連付けたサブシステムの集合
108 .IP 3.
109 プロセスが所属する階層内のコントロールグループ
110 .RE
111 .IP
112 .\"
113 .\" FIXME Describe /proc/[pid]/clear_refs
114 .\"       Added in 2.6.22
115 .\"       "Clears page referenced bits shown in smaps output"
116 .\"       write-only
117 .\"       CONFIG_PROC_PAGE_MONITOR
118 このファイルが存在するのは、カーネルのコンフィギュレーション・オプショ
119 ン \fBCONFIG_CGROUPS\fP を有効にした場合だけである。
120 .TP 
121 \fI/proc/[pid]/cmdline\fP
122 .\" In 2.3.26, this also used to be true if the process was swapped out.
123 プロセスの完全なコマンド行を保持する。ただし、そのプロセスがゾンビプロセス
124 の場合は、このファイルは空となる。つまり、このファイルを読み出しても一文字
125 も返らない。このファイルではコマンドライン引き数が、
126 NULL バイト (\(aq\e0\(aq) で区切られた文字列として書かれており、
127 最後の文字列の後に NULL バイトが一つ置かれる。
128 .TP 
129 \fI/proc/[pid]/coredump_filter\fP (kernel 2.6.23 以降)
130 \fBcore\fP(5)  参照。
131 .TP 
132 \fI/proc/[pid]/cpuset\fP (kernel 2.6.12 以降)
133 .\" and/proc/[pid]/task/[tid]/cpuset
134 \fBcpuset\fP(7)  参照。
135 .TP 
136 \fI/proc/[pid]/cwd\fP
137 プロセスのカレントワーキングディレクトリへのシンボリックリンク。 例えば、プロセス 20 のカレントワーキングディレクトリを見つけるためには、
138 次のようにすればよい。
139
140 .in +4n
141 .nf
142 $\fB cd /proc/20/cwd; /bin/pwd\fP
143 .fi
144 .in
145
146 \fIpwd\fP コマンドはシェルの内部コマンドのことがよくあり、
147 うまく動作しないかもしれない。
148 \fBbash\fP(1) では \fIpwd\ \-P\fP を使ってもよい。
149
150 .\" The following was still true as at kernel 2.6.13
151 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
152 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
153 .TP 
154 \fI/proc/[pid]/environ\fP
155 このファイルはプロセスの環境変数を含んでいる。 各エントリは NULL バイト (\(aq\e0\(aq) で区切られていて、 末尾に NULL
156 バイトがあるかもしれない。 したがって、プロセス 1 の環境変数を表示するためには 次のようにすればよい。
157 .in +4n
158 .nf
159
160 $\fB strings /proc/1/environ\fP
161 .fi
162 .in
163 .TP 
164 \fI/proc/[pid]/exe\fP
165 .\" The following was still true as at kernel 2.6.13
166 Linux 2.2 以降では、このファイルはシンボリックリンクで、 実行可能コマンドの実際のパス名を格納している。
167 このシンボリックリンクは通常のように辿ることができる; これをオープンすると実行可能ファイルがオープンされる。 (コマンドラインで)
168 \fI/proc/[pid]/exe\fP と入力すると、プロセス番号 [pid] で実行されている 実行可能ファイルをもう一つ実行することができる。
169 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
170 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
171
172 Linux 2.0 以前では、 \fI/proc/[pid]/exe\fP は実行されたバイナリへのポインタで、シンボリックリンクのように見える。 Linux
173 2.0 以前では、このファイルに対して \fBreadlink\fP(2)  を実行すると、次のフォーマットの文字列が返る。
174
175     [デバイス番号]:iノード番号
176
177 たとえば、[0301]:1502 はメジャーデバイス番号 03 (IDE, MFM などのドライブ)  マイナーデバイス番号 01
178 (最初のドライブの最初のパーティション) の デバイス上の iノード番号 1502 である。
179
180 \fI\-inum\fP オプションをつけて \fBfind\fP(1) を使うと、
181 このファイルの所在を探すことができる。
182 .TP 
183 \fI/proc/[pid]/fd\fP
184 プロセスがオープンしたファイル各々に対するエントリを含むサブディレクトリ。 ファイルディスクリプタがファイル名で、
185 実際のファイルへのシンボリックリンクになっている。 したがって 0 は標準入力、1 は標準出力、2 は標準エラー出力、などとなる。
186
187 .\" The following was still true as at kernel 2.6.13
188 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このディレクトリの内容は参照できない (スレッドの終了は通常
189 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
190
191 コマンドライン引き数としてファイル名を受け取るが、引き数が 渡されなかった場合
192 に標準入力から入力を受け取らないようなプログラムや、 コマンドライン引き数とし
193 て書き込みファイルを受け取るが、引き数が 渡されなかった場合に標準出力に出力を
194 行わないようなプログラムであっても、 \fI/proc/[pid]/fd\fP を使うことで標準入力や
195 標準出力を使用できるようになる。 例えば、 \fI\-i\fP を入力ファイルを指定するフラ
196 グ、 \fI\-o\fP を出力ファイルを指定するフラグと仮定すると、
197 .in +4n
198 .nf
199
200 $\fB foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ...\fP
201 .fi
202 .in
203
204 .\" The following is not true in my tests (MTK):
205 .\" Note that this will not work for
206 .\" programs that seek on their files, as the files in the fd directory
207 .\" are not seekable.
208 を実行することにより、フィルタとして動作させることができる。
209
210 \fI/proc/self/fd/N\fP は、ある種の UNIX や UNIX 風のシステムにある \fI/dev/fd/N\fP
211 とだいたい同じである。 事実 Linux のたいていの MAKEDEV スクリプトは、
212 \fI/dev/fd\fP を \fI/proc/self/fd\fP へのシンボリックリンクにしている。
213
214 ほとんどのシステムでは、シンボリックリンク \fI/dev/stdin\fP, \fI/dev/stdout\fP, \fI/dev/stderr\fP
215 が提供されており、それぞれ \fI/proc/self/fd\fP 内のファイル \fI0\fP, \fI1\fP, \fI2\fP にリンクされている。
216 したがって、上述のサンプルコマンドは次のようにも書くことができる。
217 .in +4n
218 .nf
219
220 $\fB foobar \-i /dev/stdin \-o /dev/stdout ...\fP
221 .fi
222 .in
223 .\" FIXME Describe /proc/[pid]/loginuid
224 .\"       Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
225 .\"       CONFIG_AUDITSYSCALL
226 .TP 
227 \fI/proc/[pid]/fdinfo/\fP (kernel 2.6.22 以降)
228 このサブディレクトリには、そのプロセスがオープンしているファイル毎の エントリが入っており、ファイルディスクリプタがファイル名となっている。
229 各ファイルの内容を読み出すことで、対応するファイルディスクリプタに関する 情報を得ることができる。以下に例を示す。
230 .in +4n
231 .nf
232
233 $\fB cat /proc/12015/fdinfo/4\fP
234 pos:    1000
235 flags:  01002002
236 .fi
237 .in
238
239 \fIpos\fP フィールドは 10 進数で、現在のファイルオフセットを示す。 \fIflags\fP フィールドは 8 進数で、
240 ファイルのアクセスモードとファイル状態フラグを示す (\fBopen\fP(2)  参照)。
241
242 .\" FIXME document /proc/[pid]/io
243 .\" .TP
244 .\" .IR /proc/[pid]/io " (since kernel 2.6.20)"
245 このディレクトリのファイルは、プロセスの所有者だけが読み出すことができる。
246 .TP 
247 \fI/proc/[pid]/limits\fP (kernel 2.6.24 以降)
248 .\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589
249 This file displays the soft limit, hard limit, and units of measurement for
250 each of the process's resource limits (see \fBgetrlimit\fP(2)).  Up to and
251 including Linux 2.6.35, this file is protected to allow reading only by the
252 real UID of the process.  Since Linux 2.6.36, this file is readable by all
253 users on the system.
254 .TP 
255 \fI/proc/[pid]/map_files/\fP (since kernel 3.3)
256 .\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e
257 This subdirectory contains entries corresponding to memory\-mapped files (see
258 \fBmmap\fP(2)).  Entries are named by memory region start and end address pair
259 (expressed as hexadecimal numbers), and are symbolic links to the mapped
260 files themselves.  Here is an example, with the output wrapped and
261 reformatted to fit on an 80\-column display:
262 .in +4n
263 .nf
264
265 $\fB ls \-l /proc/self/map_files/\fP
266 lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31
267             3252e00000\-3252e20000 \-> /usr/lib64/ld\-2.15.so
268 \&...
269 .fi
270 .in
271
272 Although these entries are present for memory regions that were mapped with
273 the \fBMAP_FILE\fP flag, the way anonymous shared memory (regions created with
274 the \fBMAP_ANON | MAP_SHARED\fP flags)  is implemented in Linux means that such
275 regions also appear on this directory.  Here is an example where the target
276 file is the deleted \fI/dev/zero\fP one:
277 .in +4n
278 .nf
279
280
281 lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
282             7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted)
283 .fi
284 .in
285
286 This directory appears only if the \fBCONFIG_CHECKPOINT_RESTORE\fP kernel
287 configuration option is enabled.
288 .TP 
289 \fI/proc/[pid]/maps\fP
290 A file containing the currently mapped memory regions and their access
291 permissions.  See \fBmmap\fP(2)  for some further information about memory
292 mappings.
293
294 The format of the file is:
295
296 .in -7n
297 .nf
298 \fIaddress           perms offset  dev   inode       pathname\fP
299 00400000\-00452000 r\-xp 00000000 08:02 173521      /usr/bin/dbus\-daemon
300 00651000\-00652000 r\-\-p 00051000 08:02 173521      /usr/bin/dbus\-daemon
301 00652000\-00655000 rw\-p 00052000 08:02 173521      /usr/bin/dbus\-daemon
302 00e03000\-00e24000 rw\-p 00000000 00:00 0           [heap]
303 00e24000\-011f7000 rw\-p 00000000 00:00 0           [heap]
304 \&...
305 35b1800000\-35b1820000 r\-xp 00000000 08:02 135522  /usr/lib64/ld\-2.15.so
306 35b1a1f000\-35b1a20000 r\-\-p 0001f000 08:02 135522  /usr/lib64/ld\-2.15.so
307 35b1a20000\-35b1a21000 rw\-p 00020000 08:02 135522  /usr/lib64/ld\-2.15.so
308 35b1a21000\-35b1a22000 rw\-p 00000000 00:00 0
309 35b1c00000\-35b1dac000 r\-xp 00000000 08:02 135870  /usr/lib64/libc\-2.15.so
310 35b1dac000\-35b1fac000 \-\-\-p 001ac000 08:02 135870  /usr/lib64/libc\-2.15.so
311 35b1fac000\-35b1fb0000 r\-\-p 001ac000 08:02 135870  /usr/lib64/libc\-2.15.so
312 35b1fb0000\-35b1fb2000 rw\-p 001b0000 08:02 135870  /usr/lib64/libc\-2.15.so
313 \&...
314 f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0    [stack:986]
315 \&...
316 7fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0   [stack]
317 7fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0   [vdso]
318 .fi
319 .in
320
321 The \fIaddress\fP field is the address space in the process that the mapping
322 occupies.  The \fIperms\fP field is a set of permissions:
323
324 .nf
325 .in +5
326 r = read
327 w = write
328 x = execute
329 s = shared
330 p = private (copy on write)
331 .fi
332 .in
333
334 The \fIoffset\fP field is the offset into the file/whatever; \fIdev\fP is the
335 device (major:minor); \fIinode\fP is the inode on that device.  0 indicates
336 that no inode is associated with the memory region, as would be the case
337 with BSS (uninitialized data).
338
339 The \fIpathname\fP field will usually be the file that is backing the mapping.
340 For ELF files, you can easily coordinate with the \fIoffset\fP field by looking
341 at the Offset field in the ELF program headers (\fIreadelf\ \-l\fP).
342
343 There are additional helpful pseudo\-paths:
344 .RS 12
345 .TP 
346 \fI[stack]\fP
347 The initial process's (also known as the main thread's) stack.
348 .TP 
349 \fI[stack:<tid>]\fP (since Linux 3.4)
350 .\" commit b76437579d1344b612cf1851ae610c636cec7db0
351 A thread's stack (where the \fI<tid>\fP is a thread ID).  It
352 corresponds to the \fI/proc/[pid]/task/[tid]/\fP path.
353 .TP 
354 \fI[vdso]\fP
355 The virtual dynamically linked shared object.
356 .TP 
357 \fI[heap]\fP
358 The process's heap.
359 .in
360 .fi
361 .RE
362 .IP
363 If the \fIpathname\fP field is blank, this is an anonymous mapping as obtained
364 via the \fBmmap\fP(2)  function.  There is no easy way to coordinate this back
365 to a process's source, short of running it through \fBgdb\fP(1), \fBstrace\fP(1),
366 or similar.
367
368 Linux 2.0 ではパス名を書いたフィールドがない。
369 .TP 
370 \fI/proc/[pid]/mem\fP
371 このファイルは、 \fBopen\fP(2), \fBread\fP(2), \fBlseek\fP(2)
372 を通して、プロセスのメモリのページにアクセスするために使われる。
373 .TP 
374 \fI/proc/[pid]/mountinfo\fP (Linux 2.6.26 以降)
375 .\" This info adapted from Documentation/filesystems/proc.txt
376 このファイルには、マウントポイントについての情報が入っている。 以下のような形式の行から構成される。
377 .nf
378
379 \f(CW36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
380 (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)\fP
381 .fi
382 .IP
383 括弧付きの数字は、以下の説明のためのものである。
384 .RS 7
385 .TP  5
386 (1)
387 マウント ID: マウントの一意な識別子 (\fBumount\fP(2)  の後は再利用されるかもしれない)。
388 .TP 
389 (2)
390 parent ID: 親マウントの ID (マウントツリーの最上位の場合は自分自身の ID となる)。
391 .TP 
392 (3)
393 major:minor: ファイルシステム上のファイルの \fIst_dev\fP の値 (\fBstat\fP(2)  参照)。
394 .TP 
395 (4)
396 ルート: そのファイルシステム内のマウントのルート。
397 .TP 
398 (5)
399 マウントポイント: マウントポイントのそのプロセスのルートからの相対パス。
400 .TP 
401 (6)
402 マウントオプション: 各マウントのオプション。
403 .TP 
404 (7)
405 オプションフィールド: "tag[:value]" 形式のフィールドが 0 個以上並ぶ。
406 .TP 
407 (8)
408 セパレータ: オプションフィールドの終わりを示す。
409 .TP 
410 (9)
411 ファイルシステム種別: ファイルシステムの名前。 "type[.subtype]" という形式となる。
412 .TP 
413 (10)
414 マウント元: ファイルシステム固有の情報。ない場合は "none" となる。
415 .TP 
416 (11)
417 super options: スーパーブロック単位のオプション。
418 .RE
419 .IP
420 解釈する側は認識できないオプションフィールドは全て無視すべきである。 現在のところ、オプションフィールドとしては以下のようなものがある。
421 .RS 12
422 .TP  18
423 shared:X
424 マウントはピアグループ (peer group) X で共有されている。
425 .TP 
426 master:X
427 マウントはピアグループ (peer group) X のスレーブである。
428 .TP 
429 propagate_from:X
430 マウントはスレーブであり、ピアグループ X (*) から mount propagation を受信する。
431 .TP 
432 unbindable
433 マウントは unbind できない。
434 .RE
435 .IP
436 (*) X は、プロセスの root で直近の dominant peer group である。 X がマウントの直接のマスターである場合や、 同じ
437 root に dominant peer group がない場合は、 "master:X" フィールドだけが存在し、
438 "propagate_from:X" フィールドは存在しない。
439
440 mount propagation の詳細については、 Linux カーネルソースツリー内の
441 \fIDocumentation/filesystems/sharedsubtree.txt\fP を参照。
442 .TP 
443 \fI/proc/[pid]/mounts\fP (Linux 2.4.19 以降)
444 そのプロセスのマウント名前空間に現在マウントされている 全ファイルシステムのリスト。 このファイルのフォーマットは \fBfstab\fP(5)
445 に載っている。 カーネル 2.6.15 以降では、このファイルを監視することができる (pollable)。
446 このファイルを読み出し用にオープンした後で、このファイルに変更があると (つまりファイルシステムのマウントやアンマウントがあると)、
447 \fBselect\fP(2)  ではそのファイルディスクリプタは読み出し可能となり、 \fBpoll\fP(2)  と \fBepoll_wait\fP(2)
448 ではそのファイルはエラー状態として通知される。
449 .TP 
450 \fI/proc/[pid]/mountstats\fP (Linux 2.6.17 以降)
451 このファイルを通じて、そのプロセスの名前空間内のマウントポイントに関する 各種情報 (統計、設定情報) を参照できる。
452 ファイルの各行は以下のフォーマットである。
453 .nf
454
455 device /dev/sda7 mounted on /home with fstype ext3 [statistics]
456 (       1      )            ( 2 )             (3 ) (4)
457 .fi
458 .IP
459 各行のフィールドは以下の通りである。
460 .RS 7
461 .TP  5
462 (1)
463 マウントされているデバイス名 (対応するデバイスがない場合は "nodevice" となる)。
464 .TP 
465 (2)
466 マウントポイントのファイルシステムツリーにおけるパス名。
467 .TP 
468 (3)
469 ファイルシステム種別。
470 .TP 
471 (4)
472 追加の統計や設定情報。 現在のところ (Linux 2.6.26 時点では)、 このフィールドで情報が提供されているのは NFS
473 ファイルシステムだけである。
474 .RE
475 .IP
476 このファイルはプロセスの所有者だけが読み出すことができる。
477 .TP 
478 \fI/proc/[pid]/ns/\fP (Linux 3.0 以降)
479 .\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
480 このサブディレクトリには、名前空間毎に 1 エントリが置かれる。
481 各エントリは \fBsetns\fP(2) による操作をサポートしている。
482 名前空間に関する情報は \fBclone\fP(2) を参照。
483 .TP 
484 \fI/proc/[pid]/ns/ipc\fP (Linux 3.0 以降)
485 このファイルをファイルシステムのどこか他の場所に bind mount することで (\fBmount\fP(2)
486 参照)、現在この名前空間にいる全てのプロセスが終了したとしても、 \fIpid\fP で指定されたプロセスの IPC 名前空間は有効な状態で保たれる。
487
488 このファイルをオープンすると、 \fIpid\fP で指定されたプロセスの IPC
489 名前空間のファイルハンドルが返される。このファイルディスクリプタがオープンされている限り、この名前空間にいる全てのプロセスが終了したとしても、この
490 IPC 名前空間は有効なままとなる。このファイルディスクリプタは \fBsetns\fP(2) に渡すことができる。
491 .TP 
492 \fI/proc/[pid]/ns/net\fP (Linux 3.0 以降)
493 このファイルをファイルシステムのどこか他の場所に bind mount することで (\fBmount\fP(2)
494 参照)、現在この名前空間にいる全てのプロセスが終了したとしても、 \fIpid\fP で指定されたプロセスのネットワーク名前空間は有効な状態で保たれる。
495
496 このファイルをオープンすると、 \fIpid\fP
497 で指定されたプロセスのネットワーク名前空間のファイルハンドルが返される。このファイルディスクリプタがオープンされている限り、この名前空間にいる全てのプロセスが終了したとしても、このネットワーク名前空間は有効なままとなる。このファイルディスクリプタは
498 \fBsetns\fP(2) に渡すことができる。
499 .TP 
500 \fI/proc/[pid]/ns/uts\fP (Linux 3.0 以降)
501 このファイルをファイルシステムのどこか他の場所に bind mount することで (\fBmount\fP(2)
502 参照)、現在この名前空間にいる全てのプロセスが終了したとしても、 \fIpid\fP で指定されたプロセスの UTS 名前空間は有効な状態で保たれる。
503
504 このファイルをオープンすると、 \fIpid\fP で指定されたプロセスの UTS
505 名前空間のファイルハンドルが返される。このファイルディスクリプタがオープンされている限り、この名前空間にいる全てのプロセスが終了したとしても、この
506 UTS 名前空間は有効なままとなる。このファイルディスクリプタは \fBsetns\fP(2) に渡すことができる。
507 .TP 
508 \fI/proc/[pid]/numa_maps\fP (Linux 2.6.14 以降)
509 \fBnuma\fP(7)  を参照。
510 .TP 
511 \fI/proc/[pid]/oom_adj\fP (Linux 2.6.11 以降)
512 このファイルは、メモリ不足 (OOM) の状況下でどのプロセスを殺すべきかを選択す
513 るのに使用されるスコアを調整するのに使用される。カーネルは、プロセスの
514 \fIoom_score\fP 値のビットシフト操作に、この値を使用する。この値として有効な値
515 は \-16 から +15 までと、特別な意味を持つ \-17 である。 \-17 はそのプロセス
516 に対する OOM\-killing を完全に無効にすることを意味する。正の値ほど、そのプロ
517 セスが OOM\-killer により殺される可能性が高くなり、負の値ほど可能性が低くなる。
518 .IP
519 このファイルのデフォルト値は 0 である。 新しいプロセスは親プロセスの \fIoom_adj\fP の設定を継承する。
520 このファイルを変更するためには、プロセスは特権 (\fBCAP_SYS_RESOURCE\fP) を持っていなければならない。
521 .IP
522 Since Linux 2.6.36, use of this file is deprecated in favor of
523 \fI/proc/[pid]/oom_score_adj\fP.
524 .TP 
525 \fI/proc/[pid]/oom_score\fP (Linux 2.6.11 以降)
526 .\" See mm/oom_kill.c::badness() in the 2.6.25 sources
527 .\" See mm/oom_kill.c::badness() in the 2.6.25 sources
528 このファイルは、OOM\-killer のプロセス選択用として、カーネルが このプロセス
529 に対して与えた現在のスコアを表示する。 高いスコアは、そのプロセスが
530 OOM\-killer により選択される 可能性が高いことを意味する。 このスコアの基本は
531 そのプロセスが使用しているメモリ量であり、 以下の要因により加算 (+) 減算 (\-)
532 が行われる。
533 .RS
534 .IP * 2
535 そのプロセスが多くの子プロセスを \fBfork\fP(2)  を使って作成しているか (+)。
536 .IP *
537 そのプロセスが長時間実行されて来たか、
538 もしくは 多くの CPU 時間を使用しているか (\-)。
539 .IP *
540 そのプロセスが低い nice 値 (> 0) を持っているか (+)。
541 .IP *
542 .\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
543 そのプロセスが特権を持っているか (\-)。
544 .IP *
545 .\" More precisely, if it has CAP_SYS_RAWIO
546 そのプロセスが direct hardware access を行っているか (\-)。
547 .RE
548 .IP
549 \fIoom_score\fP は、そのプロセスの \fIoom_score_adj\fP や \fIoom_adj\fP 設定で規定される調整にも影響を与える。
550 .TP 
551 \fI/proc/[pid]/oom_score_adj\fP (Linux 2.6.36 以降)
552 .\" Text taken from 3.7 Documentation/filesystems/proc.txt
553 This file can be used to adjust the badness heuristic used to select which
554 process gets killed in out\-of\-memory conditions.
555
556 The badness heuristic assigns a value to each candidate task ranging from 0
557 (never kill) to 1000 (always kill) to determine which process is targeted.
558 The units are roughly a proportion along that range of allowed memory the
559 process may allocate from, based on an estimation of its current memory and
560 swap use.  For example, if a task is using all allowed memory, its badness
561 score will be 1000.  If it is using half of its allowed memory, its score
562 will be 500.
563
564 There is an additional factor included in the badness score: root processes
565 are given 3% extra memory over other tasks.
566
567 The amount of "allowed" memory depends on the context in which the
568 OOM\-killer was called.  If it is due to the memory assigned to the
569 allocating task's cpuset being exhausted, the allowed memory represents the
570 set of mems assigned to that cpuset (see \fBcpuset\fP(7)).  If it is due to a
571 mempolicy's node(s) being exhausted, the allowed memory represents the set
572 of mempolicy nodes.  If it is due to a memory limit (or swap limit) being
573 reached, the allowed memory is that configured limit.  Finally, if it is due
574 to the entire system being out of memory, the allowed memory represents all
575 allocatable resources.
576
577 The value of \fIoom_score_adj\fP is added to the badness score before it is
578 used to determine which task to kill.  Acceptable values range from \-1000
579 (OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).  This allows user space to
580 control the preference for OOM\-killing, ranging from always preferring a
581 certain task or completely disabling it from OOM\-killing.  The lowest
582 possible value, \-1000, is equivalent to disabling OOM\-killing entirely for
583 that task, since it will always report a badness score of 0.
584
585 Consequently, it is very simple for user space to define the amount of
586 memory to consider for each task.  Setting a \fIoom_score_adj\fP value of +500,
587 for example, is roughly equivalent to allowing the remainder of tasks
588 sharing the same system, cpuset, mempolicy, or memory controller resources
589 to use at least 50% more memory.  A value of \-500, on the other hand, would
590 be roughly equivalent to discounting 50% of the task's allowed memory from
591 being considered as scoring against the task.
592
593 For backward compatibility with previous kernels, \fI/proc/[pid]/oom_adj\fP can
594 still be used to tune the badness score.  Its value is scaled linearly with
595 \fIoom_score_adj\fP.
596
597 .\" FIXME Describe /proc/[pid]/pagemap
598 .\"       Added in 2.6.25
599 .\"       CONFIG_PROC_PAGE_MONITOR
600 Writing to \fI/proc/[pid]/oom_score_adj\fP or \fI/proc/[pid]/oom_adj\fP will
601 change the other with its scaled value.
602 .TP 
603 \fI/proc/[pid]/root\fP
604 UNIX と Linux では、 ファイルシステムのルート (/) をプロセスごとに別々に
605 できる。これはシステムコール \fBchroot\fP(2) によって設定する。 このファイルは
606 プロセスのルートディレクトリを指すシンボリックリンクで、 exe や fd/* など
607 と同じような動作をする。
608
609 .\" The following was still true as at kernel 2.6.13
610 .\" FIXME Describe /proc/[pid]/seccomp
611 .\"       Added in 2.6.12
612 .\" FIXME Describe /proc/[pid]/sessionid
613 .\"       Added in 2.6.25; read-only; only readable by real UID
614 .\"       CONFIG_AUDITSYSCALL
615 .\" FIXME Describe /proc/[pid]/sched
616 .\"       Added in 2.6.23
617 .\"       CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
618 .\"       Displays various scheduling parameters
619 .\"       This file can be written, to reset stats
620 .\" FIXME Describe /proc/[pid]/schedstats and
621 .\"       /proc/[pid]/task/[tid]/schedstats
622 .\"       Added in 2.6.9
623 .\"       CONFIG_SCHEDSTATS
624 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
625 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
626 .TP 
627 \fI/proc/[pid]/smaps\fP (Linux 2.6.14 以降)
628 .\"       CONFIG_PROC_PAGE_MONITOR
629 このファイルは、そのプロセスの各マッピングのメモリ消費量を表示する。 マッピングのそれぞれについて、以下のような内容が表示される。
630 .in +4n
631 .nf
632
633 08048000\-080bc000 r\-xp 00000000 03:02 13130      /bin/bash
634 Size:               464 kB
635 Rss:                424 kB
636 Shared_Clean:       424 kB
637 Shared_Dirty:         0 kB
638 Private_Clean:        0 kB
639 Private_Dirty:        0 kB
640
641 .fi
642 .in
643 最初の行には、 \fI/proc/[pid]/maps\fP で表示されるマッピングと同じ情報が表示される。 残りの行には、マッピングのサイズ、現在 RAM
644 上に存在するマッピングの量、 マッピング内の共有ページのうちクリーンなページ数、ダーティなページ数、
645 マッピング内のプライベートページのうちクリーンなページ数、 ダーティなページ数、を示す。
646
647 このファイルが存在するのは、カーネルのコンフィギュレーション・オプション \fBCONFIG_MMU\fP を有効にした場合だけである。
648 .TP 
649 \fI/proc/[pid]/stat\fP
650 プロセスの状態についての情報。 これは \fBps\fP(1)  で使われ、 \fI/usr/src/linux/fs/proc/array.c\fP
651 で定義されている。
652
653 各フィールドを順番に、 \fBscanf\fP(3)  のフォーマット指定子付きで以下に示す。
654 .RS
655 .TP  12
656 \fIpid\fP %d
657 (1) プロセス ID。
658 .TP 
659 \fIcomm\fP %s
660 (2) 括弧でくくられた実行形式のファイル名。実行形式がスワップアウトされているかどうかによらず、見ることができる。
661 .TP 
662 \fIstate\fP %c
663 (3) "RSDZTW" のどれか 1 文字。 R は実行中 (running)、 S は割り込み可能な休眠状態 (sleeping in an
664 interruptible wait)、 D は割り込み不可能なディスクスリープの待機状態 (waiting in uninterruptible
665 disk sleep)、 Z はゾンビ状態 (zombie)、 T はトレースされている (traced) か (シグナルにより) 停止している状態
666 (stopped)、 W はページング中 (paging) を表している。
667 .TP 
668 \fIppid\fP %d
669 (4) 親プロセスの PID。
670 .TP 
671 \fIpgrp\fP %d
672 (5) プロセスのプロセスグループ ID。
673 .TP 
674 \fIsession\fP %d
675 (6) プロセスのセッション ID。
676 .TP 
677 \fItty_nr\fP %d
678 (7) プロセスの制御端末 (マイナー・デバイス番号はビット 31〜20 と 7〜0 にまたがって格納され、 メジャー・デバイス番号はビット 15〜8
679 に格納される)。
680 .TP 
681 \fItpgid\fP %d
682 .\" This field and following, up to and including wchan added 0.99.1
683 (8) プロセスの制御端末のフォアグランド・プロセス・グループの ID。
684 .TP 
685 \fIflags\fP %u (Linux 2.6.22 より前は %lu)
686 (9) プロセスのカーネルフラグワード。 ビットの意味は、 \fI<linux/sched.h>\fP で定義されている PF_*
687 を参照すること。 詳細はカーネルのバージョンに依存する。
688 .TP 
689 \fIminflt\fP %lu
690 (10) プロセスが引き起こしたマイナーフォールト (minor fault、ディスクから メモリページへのロードを必要としないフォールト) の回数。
691 .TP 
692 .\" field 11
693 \fIcminflt\fP %lu
694 (11) (そのプロセスが終了を待っている) 子プロセスが引き起こしたマイナーフォールトの回数。
695 .TP 
696 \fImajflt\fP %lu
697 (12) プロセスが引き起こしたメジャーフォールト (major fault、ディスクからメモリページへのロードを必要とするフォールト) の回数。
698 .TP 
699 \fIcmajflt\fP %lu
700 (13) (そのプロセスが終了を待っている) 子プロセスが引き起こしたメジャーフォールトの回数。
701 .TP 
702 \fIutime\fP %lu
703 (14) このプロセスがユーザーモードでスケジューリングされた時間の合計。 clock tick 単位で計測される
704 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 この値にはゲスト時間 \fIguest_time\fP (仮想 CPU
705 の実行に消費された時間)
706 も含まれる。これは、ゲスト時間のフィールドを認識しないアプリケーションにおいて、ゲスト時間分を計算に入れ損ねないようにするためである。
707 .TP 
708 \fIstime\fP %lu
709 (15) プロセスのカーネルモードでの実行時間 (単位 jiffies)。 このプロセスがカーネルモードでスケジューリングされた時間の合計。 clock
710 tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
711 .TP 
712 \fIcutime\fP %ld
713 (16) このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、 ユーザモードでスケジューリングされた時間の合計。 clock
714 tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 (\fBtimes\fP(2)  も参照すること。)
715 この値にはゲスト時間 \fIcguest_time\fP (仮想 CPU を実行するのに消費した時間、下記参照) も含まれる。
716 .TP 
717 \fIcstime\fP %ld
718 (17) このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、カーネルモードでスケジューリングされた時間の合計。 clock
719 tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
720 .TP 
721 \fIpriority\fP %ld
722 (18) (Linux 2.6 の場合の説明) リアルタイム・スケジューリングポリシー (下記の
723 \fIpolicy ;\fP \fBsched_setscheduler\fP(2) 参照) で動作しているプロセスでは、 この
724 値はスケジューリング優先度を反転した値 (スケジューリング優先度を マイナスにし
725 た値) となる。値は \-2 から \-100 までの範囲の数値で、 それぞれリアルタイム優先
726 度の 1 から 9 に対応する。 リアルタイム以外のスケジューリングポリシーで動作し
727 ているプロセスでは、 この値はカーネル内で管理されている nice 値そのもの
728 (\fBsetpriority\fP(2)) となる。 カーネルは nice 値を 0 (高) から 39 (低) の範囲
729 の値として保持しており、 それぞれユーザに見える nice 値の \-20 から 19 に対応
730 する。
731
732 .\" And back in kernel 1.2 days things were different again.
733 Linux 2.6 より前では、このプロセスに割り当てられたスケジューリング 重みを変換した値が表示されていた。
734 .TP 
735 \fInice\fP %ld
736 .\" Back in kernel 1.2 days things were different.
737 .\" .TP
738 .\" \fIcounter\fP %ld
739 .\" The current maximum size in jiffies of the process's next timeslice,
740 .\" or what is currently left of its current timeslice, if it is the
741 .\" currently running process.
742 .\" .TP
743 .\" \fItimeout\fP %u
744 .\" The time in jiffies of the process's next timeout.
745 .\" timeout was removed sometime around 2.1/2.2
746 (19) nice 値 (\fBsetpriority\fP(2) 参照)。 19 (最低優先) から \-20 (最高優先)
747 の範囲の値である。
748 .TP 
749 \fInum_threads\fP %ld
750 (20) このプロセスのスレッド数 (Linux 2.6 以降)。 カーネル 2.6 より前では、このフィールドは削除されたフィールドの 場所埋めとして
751 0 にハードコードされていた。
752 .TP 
753 .\" field 21
754 \fIitrealvalue\fP %ld
755 (21) インターバルタイマによって、次に \fBSIGALRM\fP がプロセスへ送られるまでの時間 (単位 jiffies)。 カーネル 2.6.17
756 以降では、このフィールドはメンテナンスされなくなり、 0 にハードコードされている。
757 .TP 
758 \fIstarttime\fP %llu (Linux 2.6 より前は %lu)
759 (22) The time the process started after system boot.  In kernels before
760 Linux 2.6, this value was expressed in jiffies.  Since Linux 2.6, the value
761 is expressed in clock ticks (divide by \fIsysconf(_SC_CLK_TCK)\fP).
762 .TP 
763 \fIvsize\fP %lu
764 (23) 仮想メモリのサイズ。単位はバイト。
765 .TP 
766 \fIrss\fP %ld
767 (24) Resident Set Size。プロセスが持っている実メモリ上のページ数。
768 これはちょうどテキスト、データ、スタック空間に使われているページ数である。 デマンドロードされていないページや
769 スワップアウトされたページの数は含んでいない。
770 .TP 
771 \fIrsslim\fP %lu
772 (25) このプロセスの rss の現在のソフト・リミット (バイト単位)。 \fBgetrlimit\fP(2) の \fBRLIMIT_RSS\fP
773 の説明を参照。
774 .TP 
775 \fIstartcode\fP %lu
776 (26) プログラムテキストが実行可能であるような領域の先頭アドレス。
777 .TP 
778 \fIendcode\fP %lu
779 (27) プログラムテキストが実行可能であるような領域の末尾アドレス。
780 .TP 
781 \fIstartstack\fP %lu
782 (28) スタックの開始アドレス (すなわち、スタックの底)。
783 .TP 
784 \fIkstkesp\fP %lu
785 (29) 現在の ESP (スタックポインタ) の値。 プロセスのカーネルスタックページにある。
786 .TP 
787 \fIkstkeip\fP %lu
788 (30) 現在の EIP (インストラクションポインタ) の値。
789 .TP 
790 .\" field 31
791 \fIsignal\fP %lu
792 (31) 処理待ちのシグナルのビットマップ。 10
793 進数で表示される。このフィールドは廃止予定である。リアルタイム・シグナルに関する情報は表示されないからである。代わりに
794 \fI/proc/[pid]/status\fP を使うこと。
795 .TP 
796 \fIblocked\fP %lu
797 (32) ブロックされた (blocked) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
798 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
799 .TP 
800 \fIsigignore\fP %lu
801 (33) 無視された (ignored) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
802 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
803 .TP 
804 \fIsigcatch\fP %lu
805 (34) 捕捉された (caught) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
806 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
807 .TP 
808 \fIwchan\fP %lu
809 (35) プロセスが待っている「チャネル」。これはシステムコールのアドレスであり、
810 文字名が必要ならば (アドレスとシステムコール名との) 対応表から見つけられる
811 (もし \fI/etc/psdatabase\fP [訳注: このファイル名はパッケージによる] を更新
812 しているならば、 \fIps \-l\fP して WCHAN フィールドを見よ)。
813 .TP 
814 \fInswap\fP %lu
815 .\" nswap was added in 2.0
816 (36) スワップされたページ数 (メンテナンスされていない)。
817 .TP 
818 \fIcnswap\fP %lu
819 .\" cnswap was added in 2.0
820 (37) 子プロセスの \fInswap\fP の累計 (メンテナンスされていない)。
821 .TP 
822 \fIexit_signal\fP %d (Linux 2.1.22 以降)
823 (38) プロセスが死んだときに親プロセスに送られるシグナル。
824 .TP 
825 \fIprocessor\fP %d (Linux 2.2.8 以降)
826 (39) このプロセスを最後に実行した CPU の番号。
827 .TP 
828 \fIrt_priority\fP %u (Linux 2.5.19 以降; Linux 2.6.22 より前は %lu)
829 (40) リアルタイム・スケジューリングの優先度。 リアルタイム・ポリシーの元でスケジューリングされるプロセスでは 1 から 99 の範囲の値となり、
830 リアルタイム以外のスケジューリングポリシーのプロセスでは 0 となる (\fBsched_setscheduler\fP(2)  参照)。
831 .TP 
832 .\" field 41
833 \fIpolicy\fP %u (Linux 2.5.19 以降; Linux 2.6.22 より前は %lu)
834 (41) スケジューリング・ポリシー (\fBsched_setscheduler\fP(2)  参照)。 値は、 \fIlinux/sched.h\fP の
835 SCHED_* 定数を使ってデコードすればよい。
836 .TP 
837 \fIdelayacct_blkio_ticks\fP %llu (Linux 2.6.18 以降)
838 (42) (clock tick (100分の1秒) 単位での) ブロック I/O の総遅延量。
839 .TP 
840 \fIguest_time\fP %lu (Linux 2.6.24 以降)
841 (43) プロセスのゲスト時間 (ゲスト OS の仮想 CPU を実行するのに消費された時間)。 clock tick 単位で計測される
842 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
843 .TP 
844 \fIcguest_time\fP %ld (Linux 2.6.24 以降)
845 (44) プロセスの子プロセスのゲスト時間。 clock tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP
846 で割った値が表示される)。
847 .RE
848 .TP 
849 \fI/proc/[pid]/statm\fP
850 (ページ単位で計測した) メモリ使用量についての情報を提供する。 各列は以下の通りである。
851 .in +4n
852 .nf
853
854 .\" (not including libs; broken, includes data segment)
855 .\" (including libs; broken, includes library text)
856 size       プログラムサイズの総計
857            (\fI/proc/[pid]/status\fP の VmSize と同じ)
858 resident   実メモリ上に存在するページ
859            (\fI/proc/[pid]/status\fP の VmRSS と同じ)
860 share      共有ページ (ファイルと関連付けられているページ)
861 text       テキスト (コード)
862 lib        ライブラリ (Linux 2.6 では未使用)
863 data       データ + スタック
864 dt         ダーティページ (Linux 2.6 では未使用)
865 .fi
866 .in
867 .TP 
868 \fI/proc/[pid]/status\fP
869 \fI/proc/[pid]/stat\fP と \fI/proc/[pid]/statm\fP にある多くの情報を、人間が解析しやすい形式で提供する。
870 以下に例を示す。
871 .in +4n
872 .nf
873
874 $\fB cat /proc/$$/status\fP
875 Name:   bash
876 State:  S (sleeping)
877 Tgid:   3515
878 Pid:    3515
879 PPid:   3452
880 TracerPid:      0
881 Uid:    1000    1000    1000    1000
882 Gid:    100     100     100     100
883 FDSize: 256
884 Groups: 16 33 100
885 VmPeak:     9136 kB
886 VmSize:     7896 kB
887 VmLck:         0 kB
888 VmHWM:      7572 kB
889 VmRSS:      6316 kB
890 VmData:     5224 kB
891 VmStk:        88 kB
892 VmExe:       572 kB
893 VmLib:      1708 kB
894 VmPTE:        20 kB
895 Threads:        1
896 SigQ:   0/3067
897 SigPnd: 0000000000000000
898 ShdPnd: 0000000000000000
899 SigBlk: 0000000000010000
900 SigIgn: 0000000000384004
901 SigCgt: 000000004b813efb
902 CapInh: 0000000000000000
903 CapPrm: 0000000000000000
904 CapEff: 0000000000000000
905 CapBnd: ffffffffffffffff
906 Cpus_allowed:   00000001
907 Cpus_allowed_list:      0
908 Mems_allowed:   1
909 Mems_allowed_list:      0
910 voluntary_ctxt_switches:        150
911 nonvoluntary_ctxt_switches:     545
912 .fi
913 .in
914 .IP
915 フィールドの詳細は以下の通りである。
916 .RS
917 .IP * 2
918 \fIName\fP: このプロセスにより実行されたコマンド。
919 .IP *
920 \fIState\fP: プロセスの現在の状態。 "R (running; 実行中)", "S (sleeping; 休眠状態)", "D (disk
921 sleep; ディスク待ちの休眠状態)", "T (stopped; 停止状態)", "T (tracing stop; トレースによる停止)", "Z
922 (zombie; ゾンビ状態)", "X (dead; 死亡)" のいずれかである。
923 .IP *
924 \fITgid\fP: スレッドグループ ID (すなわち、プロセス ID)。
925 .IP *
926 \fIPid\fP: スレッド ID (\fBgettid\fP(2)  参照)。
927 .IP *
928 \fIPPid\fP: 親プロセスの PID。
929 .IP *
930 \fITracerPid\fP: このプロセスをトレースしているプロセスの PID (トレースされていない場合は 0)。
931 .IP *
932 \fIUid\fP, \fIGid\fP: 実 UID/GID、実効 UID/GID、保存 set\-UID/GID、ファイルシステム UID/GID。
933 .IP *
934 \fIFDSize\fP: 現在割り当てられているファイルディスクリプタのスロット数。
935 .IP *
936 \fIGroups\fP: 補助グループのリスト。
937 .IP *
938 \fIVmPeak\fP: 仮想メモリサイズのピーク値。
939 .IP *
940 \fIVmSize\fP: 仮想メモリサイズ。
941 .IP *
942 \fIVmLck\fP: ロックされているメモリサイズ (\fBmlock\fP(3) 参照)。
943 .IP *
944 \fIVmHWM\fP: 実メモリ上に存在するページサイズ (resident set size)  のピーク値 ("high water mark")。
945 .IP *
946 \fIVmRSS\fP: 実メモリ上に存在するページサイズ。
947 .IP *
948 \fIVmData\fP, \fIVmStk\fP, \fIVmExe\fP: データ、スタック、テキストセグメントのサイズ。
949 .IP *
950 \fIVmLib\fP: 共有ライブラリ・コードのサイズ。
951 .IP *
952 \fIVmPTE\fP: ページ・テーブル・エントリのサイズ (Linux 2.6.10 以降)。
953 .IP *
954 \fIThreads\fP: このスレッドが属するプロセスのスレッド数。
955 .IP *
956 \fISigQ\fP: このフィールドにはスラッシュで区切られた 2 つの数字が入っている。この数字はこのプロセスの実ユーザ ID
957 宛にキューイングされたシグナルに関するものである。一つ目の数字は、この実ユーザ ID
958 宛に現在キューイングされているシグナル数である。二つ目の数字は、このプロセス宛にキューイングされたシグナル数に関するリソース上限値である
959 (\fBgetrlimit\fP(2) の \fBRLIMIT_SIGPENDING\fP の説明を参照)。
960 .IP *
961 \fISigPnd\fP, \fIShdPnd\fP: スレッド宛およびプロセス全体宛の処理待ちシグナルの数 (\fBpthreads\fP(7),
962 \fBsignal\fP(7)  参照)。
963 .IP *
964 \fISigBlk\fP, \fISigIgn\fP, \fISigCgt\fP: ブロックされるシグナル、無視されるシグナル、捕捉待ちのシグナルを 示すマスク値
965 (\fBsignal\fP(7))。
966 .IP *
967 \fICapInh\fP, \fICapPrm\fP, \fICapEff\fP: 継承可能 (inheritable)、許可 (permitted)、実効
968 (effective)  の各ケーパビリティセットで有効になっているケーパビリティのマスク値 (\fBcapabilities\fP(7)  参照)。
969 .IP *
970 \fICapBnd\fP: ケーパビリティ・バウンディングセット (カーネル 2.6.26 以降、 \fBcapabilities\fP(7)  参照)。
971 .IP *
972 \fICpus_allowed\fP: このプロセスが実行を許可されている CPU のマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
973 参照)。
974 .IP *
975 \fICpus_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
976 参照)。
977 .IP *
978 \fIMems_allowed\fP: このプロセスが使用できるメモリノードのマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
979 参照)。
980 .IP *
981 \fIMems_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
982 参照)。
983 .IP *
984 \fIvoluntary_context_switches\fP, \fInonvoluntary_context_switches\fP:
985 自発的/非自発的なコンテキストスイッチの回数 (Linux 2.6.23 以降)。
986 .RE
987 .TP 
988 \fI/proc/[pid]/task\fP (Linux 2.6.0\-test6 以降)
989 このディレクトリには、そのプロセスのスレッド情報を含む サブディレクトリが 1 スレッドにつき 1 つ置かれる。
990 各サブディレクトリの名前はスレッドのスレッド ID (\fI[tid]\fP)  を示す数字である \fB(\fPgettid\fB(2)\fP を参照)。
991 これらの各サブディレクトリには、 \fI/proc/[pid]\fP ディレクトリ以下と同じ名前と内容のファイル群がある。
992 すべてのスレッドで共有される属性の場合、 \fItask/[tid]\fP サブディレクトリ以下の各ファイルの内容は 親ディレクトリ
993 \fI/proc/[pid]\fP の対応するファイルと同じになることだろう (例えば、マルチスレッド・プロセスではファイル
994 \fItask/[tid]/cwd\fP はいずれも親ディレクトリ内の \fI/proc/[pid]/cwd\fP
995 と同じ値を持つことになる。なぜなら、一つのプロセスに属すすべての スレッドは作業ディレクトリを共有するからである)。 スレッド毎に独立な属性の場合、
996 \fItask/[tid]\fP サブディレクトリ以下の各ファイルは異なる値を持つことがある (例えば、ファイル \fItask/[tid]/status\fP
997 はスレッド毎に異なる値を持つ可能性がある)。
998
999 .\" The following was still true as at kernel 2.6.13
1000 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 \fI/proc/[pid]/task\fP ディレクトリの内容は参照できない
1001 (スレッドの終了は通常 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
1002 .TP 
1003 \fI/proc/apm\fP
1004 Advanced Power Management のバージョンとバッテリ情報。 カーネルのコンパイル時に \fBCONFIG_APM\fP
1005 を定義したときに存在する。
1006 .TP 
1007 \fI/proc/bus\fP
1008 インストールされている各バス用にサブディレクトリがある。
1009 .TP 
1010 \fI/proc/bus/pccard\fP
1011 PCMCIA デバイスの情報が書かれるサブディレクトリ。 カーネルのコンパイル時に \fBCONFIG_PCMCIA\fP を定義したときに存在する。
1012 .TP 
1013 \fI/proc/bus/pccard/drivers\fP
1014 .TP 
1015 \fI/proc/bus/pci\fP
1016 いくつかのサブディレクトリがあり、 PCI バス・インストールされているデバイス・ デバイスドライバの情報が書かれた仮想ファイルがある。
1017 これらのファイルのうちいくつかは ASCII フォーマットではない。
1018 .TP 
1019 \fI/proc/bus/pci/devices\fP
1020 PCI デバイスの情報。 \fBlspci\fP(8)  や \fBsetpci\fP(8)  でアクセスすることができる。
1021 .TP 
1022 \fI/proc/cmdline\fP
1023 ブート時に Linux カーネルに渡された引き数。 引き数の受け渡しは、たいてい \fBlilo\fP(8)  や \fBgrub\fP(8)
1024 といったブートマネージャを使って行われる。
1025 .TP 
1026 \fI/proc/config.gz\fP (Linux 2.6 以降)
1027 このファイルでは、現在実行中のカーネルの構築時に使用された 設定オプションを参照できる。 書式は、 (\fImake xconfig\fP, \fImake
1028 config\fP などを使って) カーネルの設定を変更した際に生成される \fI.config\fP ファイルのものと同じである。
1029 ファイルの内容は圧縮されており、 \fBzcat\fP(1), \fBzgrep\fP(1)  などを使うと、表示や検索ができる。 ファイルが変更されていない限り、
1030 \fI/proc/config.gz\fP の内容は次のコマンドで得られる内容と同じである。
1031 .in +4n
1032 .nf
1033
1034 cat /lib/modules/$(uname \-r)/build/.config
1035 .fi
1036 .in
1037 .IP
1038 \fI/proc/config.gz\fP が提供されるのは、カーネルの設定で \fBCONFIG_IKCONFIG_PROC\fP
1039 が有効になっている場合のみである。
1040 .TP 
1041 \fI/proc/cpuinfo\fP
1042 このファイルは、CPU およびシステムアーキテクチャに依存する項目を 集めたもので、リストの内容はサポートされているアーキテクチャ毎に異なる。 2
1043 つだけ共通の項目がある。 \fIprocessor\fP はプロセッサ番号で、 \fIbogomips\fP はカーネルの初期化時に計算されるシステム定数である。
1044 SMP マシンでは各 CPU についての情報が書かれている。 \fBlscpu\fP(1) コマンドはこのファイルから情報を収集する。
1045 .TP 
1046 \fI/proc/devices\fP
1047 メジャーデバイス番号とデバイスグループのテキスト形式のリスト。 MAKEDEV スクリプトはこのファイルを使って、
1048 カーネルとの整合性を保つことができる。
1049 .TP 
1050 \fI/proc/diskstats\fP (Linux 2.5.69 以降)
1051 このファイルには各ディスクデバイスのディスク I/O 統計情報が書かれている。 更に詳しい情報は、Linux カーネルソースファイル
1052 \fIDocumentation/iostats.txt\fP を参照すること。
1053 .TP 
1054 \fI/proc/dma\fP
1055 登録されている \fIISA\fP DMA (direct memory access) チャネルのリスト。
1056 .TP 
1057 \fI/proc/driver\fP
1058 空のサブディレクトリ。
1059 .TP 
1060 \fI/proc/execdomains\fP
1061 実行ドメインのリスト (ABI パーソナリティ)。
1062 .TP 
1063 \fI/proc/fb\fP
1064 カーネルのコンパイル時に \fBCONFIG_FB\fP が定義されている場合、フレームバッファの情報が書かれる。
1065 .TP 
1066 \fI/proc/filesystems\fP
1067 カーネルが対応しているファイルシステムのテキスト形式のリスト。 カーネルに組み込まれてコンパイルされたファイルシステムと、
1068 カーネルモジュールが現在ロードされているファイルシステムが列挙される (\fBfilesystems\fP(5)  参照)。 ファイルシステムに
1069 "nodev" という印が付いている場合、 そのファイルシステムがマウントするためのブロックデバイスを 必要としないことを意味する (例えば、
1070 仮想ファイルシステム、ネットワークファイルシステムなど)。
1071
1072 ちなみに、マウント時にファイルシステムが指定されず、 どうやってもファイルシステムの種類を判定できなかった際に、 このファイルを \fBmount\fP(8)
1073 が使用するかもしれない。 その場合、このファイルに含まれるファイルシステムが試される (ただし、"nodev" の印がついたものは除く)。
1074 .TP 
1075 \fI/proc/fs\fP
1076 空のサブディレクトリ。
1077 .TP 
1078 \fI/proc/ide\fP
1079 このディレクトリは IDE バスをもつシステムに存在する。 各 IDE チャネルとそれに取り付けられている各デバイスごとにディレクトリがあり、
1080 以下のファイルが含まれている。
1081
1082 .in +4n
1083 .nf
1084 cache              バッファサイズ (KB)
1085 capacity           セクタ数
1086 driver             ドライバのバージョン
1087 geometry           物理ジオメトリと論理ジオメトリ
1088 identify           16 進数表記
1089 media              メディアのタイプ
1090 model              製造者のモデル番号
1091 settings           ドライブの設定
1092 smart_thresholds   16 進数表記
1093 smart_values       16 進数表記
1094 .fi
1095 .in
1096
1097 \fBhdparm\fP(8)  ユーティリティは、分かりやすい形式で この情報にアクセスするための手段を提供する。
1098 .TP 
1099 \fI/proc/interrupts\fP
1100 IO デバイス毎の CPU 別の割り込み回数の記録に使われる。 Linux 2.6.24 以降、少なくとも i386 と x86_64
1101 アーキテクチャでは、 (デバイスと関連がない) システム内部の割り込みについても記録される。 システム内部の割り込みには、NMI
1102 (nonmaskable interrupt), LOC (local timer interrupt) や、SMP システムでは TLB (TLB
1103 flush interrupt), RES (rescheduling interrupt), CAL (remote function call
1104 interrupt)  などがある。 簡単に読むことのできるフォーマットで、ASCII で表記されている。
1105 .TP 
1106 \fI/proc/iomem\fP
1107 Linux 2.4 における I/O メモリマップ。
1108 .TP 
1109 \fI/proc/ioports\fP
1110 現在登録され使われている I/O ポート領域のリスト。
1111 .TP 
1112 \fI/proc/kallsyms\fP (Linux 2.5.71 以降)
1113 カーネルの外部シンボル定義を保持する。 \fBmodules\fP(X)  関係のツールがローダブルモジュールを動的にリンクしたり バインド (bind)
1114 するのに使われる。 Linux 2.5.47 以前では、微妙に異なる書式の似たようなファイルが \fIksyms\fP という名前であった。
1115 .TP 
1116 \fI/proc/kcore\fP
1117 このファイルはシステムの物理メモリを表現しており、 ELF コアファイル形式 (core file format) で保持されている。
1118 この擬似ファイルと strip されていないカーネルのバイナリ (\fI/usr/src/linux/vmlinux\fP)  [訳注:
1119 パッケージに依存する]) があれば、 GDB はカーネル内の任意のデータ構造の現在の状態を調べられる。
1120
1121 このファイルの大きさは物理メモリ (RAM) のサイズに 4KB を加えた値である。
1122 .TP 
1123 \fI/proc/kmsg\fP
1124 このファイルは \fBsyslog\fP(2)  システムコールでカーネルメッセージを読み出す代りに使える。
1125 プロセスがこのファイルを読むためにはスーパーユーザー権限が必要であり、 ファイルを読み出すのは 1 つのプロセスのみに限るべきである。
1126 カーネルメッセージを記録するために、 \fBsyslog\fP(2)  システムコールの機能を使う syslog プロセスが稼働している場合、
1127 このファイルを読み出すべきではない。
1128
1129 このファイルの中の情報は \fBdmesg\fP(1)  によって表示される。
1130 .TP 
1131 \fI/proc/ksyms\fP (Linux 1.1.23\-2.5.47)
1132 \fI/proc/kallsyms\fP を参照。
1133 .TP 
1134 \fI/proc/loadavg\fP
1135 このファイルの最初の 3 つのフィールドはロードアベレージの数値で、 1, 5, 15 分
1136 あたりの実行キュー内 (state R) または ディスク I/O 待ち (state D) のジョブ数
1137 を与える。 これは \fBuptime\fP(1) などのプログラムによって得られる値と同じである。
1138 4 番目のフィールドはスラッシュ (/) で区切られた 2 つの数値から構成される。
1139 この数値のうち最初のものは、現在実行可能なカーネルスケジュールエンティティ
1140 (プロセス、スレッド) の数である。スラッシュの後の数値は、現在システム上に
1141 存在するカーネルスケジュールエンティティの数である。 5 番目のフィールドは
1142 システム上に最も最近生成されたプロセスの PID である。
1143 .TP 
1144 \fI/proc/locks\fP
1145 このファイルは現在のファイルロック (\fBflock\fP(2) と \fBfcntl\fP(2))  とリース (\fBfcntl\fP(2))  を表示する。
1146 .TP 
1147 \fI/proc/malloc\fP (Linux 2.2 以前のみ)
1148 .\" It looks like this only ever did something back in 1.0 days
1149 コンパイルのときに \fBCONFIGDEBUGMALLOC\fP が定義されているときのみ、このファイルは存在する。
1150 .TP 
1151 \fI/proc/meminfo\fP
1152 This file reports statistics about memory usage on the system.  It is used
1153 by \fBfree\fP(1)  to report the amount of free and used memory (both physical
1154 and swap)  on the system as well as the shared memory and buffers used by
1155 the kernel.  Each line of the file consists of a parameter name, followed by
1156 a colon, the value of the parameter, and an option unit of measurement
1157 (e.g., "kB").  The list below describes the parameter names and the format
1158 specifier required to read the field value.  Except as noted below, all of
1159 the fields have been present since at least Linux 2.6.0.  Some fileds are
1160 displayed only if the kernel was configured with various options; those
1161 dependencies are noted in the list.
1162 .RS
1163 .TP 
1164 \fIMemTotal\fP %lu
1165 Total usable RAM (i.e. physical RAM minus a few reserved bits and the kernel
1166 binary code).
1167 .TP 
1168 \fIMemFree\fP %lu
1169 The sum of \fILowFree\fP+\fIHighFree\fP.
1170 .TP 
1171 \fIBuffers\fP %lu
1172 Relatively temporary storage for raw disk blocks that shouldn't get
1173 tremendously large (20MB or so).
1174 .TP 
1175 \fICached\fP %lu
1176 In\-memory cache for files read from the disk (the page cache).  Doesn't
1177 include \fISwapCached\fP.
1178 .TP 
1179 \fISwapCached\fP %lu
1180 Memory that once was swapped out, is swapped back in but still also is in
1181 the swap file.  (If memory pressure is high, these pages don't need to be
1182 swapped out again because they are already in the swap file.  This saves
1183 I/O.)
1184 .TP 
1185 \fIActive\fP %lu
1186 Memory that has been used more recently and usually not reclaimed unless
1187 absolutely necessary.
1188 .TP 
1189 \fIInactive\fP %lu
1190 Memory which has been less recently used.  It is more eligible to be
1191 reclaimed for other purposes.
1192 .TP 
1193 \fIActive(anon)\fP %lu (Linux 2.6.28 以降)
1194 [To be documented.]
1195 .TP 
1196 \fIInactive(anon)\fP %lu (Linux 2.6.28 以降)
1197 [To be documented.]
1198 .TP 
1199 \fIActive(file)\fP %lu (Linux 2.6.28 以降)
1200 [To be documented.]
1201 .TP 
1202 \fIInactive(file)\fP %lu (Linux 2.6.28 以降)
1203 [To be documented.]
1204 .TP 
1205 \fIUnevictable\fP %lu (Linux 2.6.28 以降)
1206 (From Linux 2.6.28 to 2.6.30, \fBCONFIG_UNEVICTABLE_LRU\fP was required.)  [To
1207 be documented.]
1208 .TP 
1209 \fIMlocked\fP %lu (Linux 2.6.28 以降)
1210 (From Linux 2.6.28 to 2.6.30, \fBCONFIG_UNEVICTABLE_LRU\fP was required.)  [To
1211 be documented.]
1212 .TP 
1213 \fIHighTotal\fP %lu
1214 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)  Total amount
1215 of highmem.  Highmem is all memory above ~860MB of physical memory.  Highmem
1216 areas are for use by user\-space programs, or for the page cache.  The kernel
1217 must use tricks to access this memory, making it slower to access than
1218 lowmem.
1219 .TP 
1220 \fIHighFree\fP %lu
1221 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)  Amount of free
1222 highmem.
1223 .TP 
1224 \fILowTotal\fP %lu
1225 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)  Total amount
1226 of lowmem.  Lowmem is memory which can be used for everything that highmem
1227 can be used for, but it is also available for the kernel's use for its own
1228 data structures.  Among many other things, it is where everything from
1229 \fISlab\fP is allocated.  Bad things happen when you're out of lowmem.
1230 .TP 
1231 \fILowFree\fP %lu
1232 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)  Amount of free
1233 lowmem.
1234 .TP 
1235 \fIMmapCopy\fP %lu (Linux 2.6.29 以降)
1236 (\fBCONFIG_MMU\fP is required.)  [To be documented.]
1237 .TP 
1238 \fISwapTotal\fP %lu
1239 Total amount of swap space available.
1240 .TP 
1241 \fISwapFree\fP %lu
1242 Amount of swap space that is currently unused.
1243 .TP 
1244 \fIDirty\fP %lu
1245 Memory which is waiting to get written back to the disk.
1246 .TP 
1247 \fIWriteback\fP %lu
1248 Memory which is actively being written back to the disk.
1249 .TP 
1250 \fIAnonPages\fP %lu (Linux 2.6.18 以降)
1251 Non\-file backed pages mapped into user\-space page tables.
1252 .TP 
1253 \fIMapped\fP %lu
1254 Files which have been mmaped, such as libraries.
1255 .TP 
1256 \fIShmem\fP %lu (Linux 2.6.32 以降)
1257 [To be documented.]
1258 .TP 
1259 \fISlab\fP %lu
1260 In\-kernel data structures cache.
1261 .TP 
1262 \fISReclaimable\fP %lu (Linux 2.6.19 以降)
1263 Part of \fISlab\fP, that might be reclaimed, such as caches.
1264 .TP 
1265 \fISUnreclaim\fP %lu (Linux 2.6.19 以降)
1266 Part of \fISlab\fP, that cannot be reclaimed on memory pressure.
1267 .TP 
1268 \fIKernelStack\fP %lu (Linux 2.6.32 以降)
1269 Amount of memory allocated to kernel stacks.
1270 .TP 
1271 \fIPageTables\fP %lu (Linux 2.6.18 以降)
1272 Amount of memory dedicated to the lowest level of page tables.
1273 .TP 
1274 \fIQuicklists\fP %lu (Linux 2.6.27 以降)
1275 (\fBCONFIG_QUICKLIST\fP is required.)  [To be documented.]
1276 .TP 
1277 \fINFS_Unstable\fP %lu (Linux 2.6.18 以降)
1278 NFS pages sent to the server, but not yet committed to stable storage.
1279 .TP 
1280 \fIBounce\fP %lu (Linux 2.6.18 以降)
1281 Memory used for block device "bounce buffers".
1282 .TP 
1283 \fIWritebackTmp\fP %lu (Linux 2.6.26 以降)
1284 Memory used by FUSE for temporary writeback buffers.
1285 .TP 
1286 \fICommitLimit\fP %lu (Linux 2.6.10 以降)
1287 Based on the overcommit ratio ('vm.overcommit_ratio'), this is the total
1288 amount of memory currently available to be allocated on the system.  This
1289 limit is adhered to only if strict overcommit accounting is enabled (mode 2
1290 in \fI/proc/sys/vm/overcommit_ratio\fP).  The \fICommitLimit\fP is calculated
1291 using the following formula:
1292
1293     CommitLimit = (overcommit_ratio * Physical RAM) + Swap
1294
1295 For example, on a system with 1GB of physical RAM and 7GB of swap with a
1296 \fIovercommit_ratio\fP of 30, this formula yields a \fICommitLimit\fP of 7.3GB.
1297 For more details, see the memory overcommit documentation in the kernel
1298 source file \fIDocumentation/vm/overcommit\-accounting\fP.
1299 .TP 
1300 \fICommitted_AS\fP %lu
1301 The amount of memory presently allocated on the system.  The committed
1302 memory is a sum of all of the memory which has been allocated by processes,
1303 even if it has not been "used" by them as of yet.  A process which allocates
1304 1GB of memory (using \fBmalloc\fP(3)  or similar), but touches only 300MB of
1305 that memory will show up as using only 300MB of memory even if it has the
1306 address space allocated for the entire 1GB.  This 1GB is memory which has
1307 been "committed" to by the VM and can be used at any time by the allocating
1308 application.  With strict overcommit enabled on the system (mode 2
1309 \fI/proc/sys/vm/overcommit_memory\fP), allocations which would exceed the
1310 \fICommitLimit\fP (detailed above) will not be permitted.  This is useful if
1311 one needs to guarantee that processes will not fail due to lack of memory
1312 once that memory has been successfully allocated.
1313 .TP 
1314 \fIVmallocTotal\fP %lu
1315 Total size of vmalloc memory area.
1316 .TP 
1317 \fIVmallocUsed\fP %lu
1318 Amount of vmalloc area which is used.
1319 .TP 
1320 \fIVmallocChunk\fP %lu
1321 Largest contiguous block of vmalloc area which is free.
1322 .TP 
1323 \fIHardwareCorrupted\fP %lu (Linux 2.6.32 以降)
1324 (\fBCONFIG_MEMORY_FAILURE\fP is required.)  [To be documented.]
1325 .TP 
1326 \fIAnonHugePages\fP %lu (Linux 2.6.38 以降)
1327 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP is required.)  Non\-file backed huge pages
1328 mapped into user\-space page tables.
1329 .TP 
1330 \fIHugePages_Total\fP %lu
1331 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  The size of the pool of huge pages.
1332 .TP 
1333 \fIHugePages_Free\fP %lu
1334 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  The number of huge pages in the pool
1335 that are not yet allocated.
1336 .TP 
1337 \fIHugePages_Rsvd\fP %lu (Linux 2.6.17 以降)
1338 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  This is the number of huge pages for
1339 which a commitment to allocate from the pool has been made, but no
1340 allocation has yet been made.  These reserved huge pages guarantee that an
1341 application will be able to allocate a huge page from the pool of huge pages
1342 at fault time.
1343 .TP 
1344 \fIHugePages_Surp\fP %lu (Linux 2.6.24 以降)
1345 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  This is the number of huge pages in
1346 the pool above the value in \fI/proc/sys/vm/nr_hugepages\fP.  The maximum
1347 number of surplus huge pages is controlled by
1348 \fI/proc/sys/vm/nr_overcommit_hugepages\fP.
1349 .TP 
1350 \fIHugepagesize\fP %lu
1351 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  The size of huge pages.
1352 .RE
1353 .TP 
1354 \fI/proc/modules\fP
1355 現在システムにロードされているモジュールのテキスト形式のリスト。 \fBlsmod\fP(8)  も参照。
1356 .TP 
1357 \fI/proc/mounts\fP
1358 カーネル 2.4.19 より前では、このファイルは現在システムにマウントされている 全てのファイルシステムのリストであった。 Linux 2.4.19
1359 でプロセス単位のマウント名前空間が導入されたことに伴い、 このファイルは \fI/proc/self/mounts\fP へのリンクとなった。
1360 \fI/proc/self/mounts\fP はそのプロセス自身のマウント名前空間のマウントポイントのリストである。 このファイルのフォーマットは
1361 \fBfstab\fP(5)  に記述されている。
1362 .TP 
1363 \fI/proc/mtrr\fP
1364 Memory Type Range Registers。 詳細は、Linux カーネルソースファイル \fIDocumentation/mtrr.txt\fP
1365 を参照すること。
1366 .TP 
1367 \fI/proc/net\fP
1368 さまざまなネットワークについての擬似ファイルで、 それぞれがネットワーク層の各種の状態を与える。 これらのファイルの内容は ASCII 形式なので、
1369 \fBcat\fP(1)  で読み出せる。 とはいえ基本コマンドの \fBnetstat\fP(8)  はこれらのファイルの内容のよりすっきりとした表示を提供する。
1370 .TP 
1371 \fI/proc/net/arp\fP
1372 アドレス解決に使われるカーネルの ARP テーブルの ASCII 可読なダンプを保持している。 動的結合されたものと固定 (preprogrammed)
1373 の両方の APP エントリを見ることができる。フォーマットは以下のとおり:
1374
1375 .nf
1376 .in 8n
1377 \f(CWIP address     HW type   Flags     HW address          Mask   Device
1378 192.168.0.50   0x1       0x2       00:50:BF:25:68:F3   *      eth0
1379 192.168.0.250  0x1       0xc       00:00:00:00:00:00   *      eth0\fP
1380 .fi
1381 .in
1382
1383 ここで IP address はマシンの IPv4 アドレス、 HW type はそのアドレスの RFC\ 826 で定められているハードウェアの形式、
1384 Flags は ARP 構造体 (\fI/usr/include/linux/if_arp.h\fP 内で定義されている) の内部フラグ、 HW
1385 address はその IP アドレスにマップされているデータリンク層のアドレス (もしわかっていれば) である。
1386 .TP 
1387 \fI/proc/net/dev\fP
1388 擬似ファイル dev はネットワークデバイスの状態情報を含んでいる。 これは送受信したパケット数、エラーとコリジョン (collision) の回数、
1389 その他の基本的な統計を与える。 これらは \fBifconfig\fP(8)  がデバイスの状態を報告するのに使われる。 フォーマットは以下のとおり:
1390
1391 .nf
1392 .in 1n
1393 \f(CWInter\-|   Receive                                                |  Transmit
1394  face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
1395     lo: 2776770   11307    0    0    0     0          0         0  2776770   11307    0    0    0     0       0          0
1396   eth0: 1215645    2751    0    0    0     0          0         0  1782404    4324    0    0    0   427       0          0
1397   ppp0: 1622270    5552    1    0    0     0          0         0   354130    5669    0    0    0     0       0          0
1398   tap0:    7714      81    0    0    0     0          0         0     7714      81    0    0    0     0       0          0\fP
1399 .in
1400 .fi
1401 .\" .TP
1402 .\" .I /proc/net/ipx
1403 .\" No information.
1404 .\" .TP
1405 .\" .I /proc/net/ipx_route
1406 .\" No information.
1407 .TP 
1408 \fI/proc/net/dev_mcast\fP
1409 \fI/usr/src/linux/net/core/dev_mcast.c\fP で定義されており、以下の形式である。
1410 .nf
1411 .in +5
1412 indx interface_name  dmi_u dmi_g dmi_address
1413 2    eth0            1     0     01005e000001
1414 3    eth1            1     0     01005e000001
1415 4    eth2            1     0     01005e000001
1416 .in
1417 .fi
1418 .TP 
1419 \fI/proc/net/igmp\fP
1420 Internet Group Management Protocol (インターネットグループ管理プロトコル)。
1421 \fI/usr/src/linux/net/core/igmp.c\fP で定義されている。
1422 .TP 
1423 \fI/proc/net/rarp\fP
1424 このファイルは \fIarp\fP と同じフォーマットで 逆アドレス解決サービス (reverse address lookup services)
1425 \fBrarp\fP(8)  に提供するために使われる現在の逆マップデータベースの内容を含んでいる。 RARP
1426 がカーネルコンフィグレーションに設定されていなければ、 このファイルは存在しない。
1427 .TP 
1428 \fI/proc/net/raw\fP
1429 .\" .TP
1430 .\" .I /proc/net/route
1431 .\" No information, but looks similar to
1432 .\" .BR route (8).
1433 RAW ソケットテーブルのダンプを保持している。 ほとんどの情報はデバッグ以外では
1434 使われない。 \&"sl" の値はソケットのカーネルハッシュスロット、
1435 \&"local_address" はローカルアドレスとプロトコル番号のペア
1436 [訳者追加: "rem_address" はリモートアドレスとプロトコル番号のペア]。
1437 \&"st" はソケットの内部状態。 \&"tx_queue" と "rx_queue" はカーネルメモリを
1438 消費している 送信/受信データキューのサイズ。 \&"tr" と "tm\->when" と
1439 "rexmits" フィールドは RAW では使われていない。
1440 \&"uid" フィールドはソケット生成者の実効 UID を保持している。
1441 .TP 
1442 \fI/proc/net/snmp\fP
1443 このファイルは SNMP エージェントが必要とする IP, ICMP, TCP, UDP 管理情報を ASCII データとして保持している。
1444 .TP 
1445 \fI/proc/net/tcp\fP
1446 TCP ソケットテーブルのダンプを保持している。 大部分の情報はデバッグ以外には
1447 使われない。 sl はソケットのカーネルハッシュスロットの値、 \&"local_address"
1448 はローカルアドレスとポート番号のペアである。 (ソケットが接続している場合は)
1449 \&"rem_address" はリモートアドレスとポート番号の対である。 \&"st" はソケット
1450 の内部状態である。 \&"tx_queue" と "rx_queue" はカーネルメモリを消費している
1451 送信/受信データキューのサイズ。 \&"tr" と "tm\->when" と "rexmits"
1452 フィールドはソケット状態のカーネル 内部情報を保持しているが、
1453 これらはデバッグのときにしか役に立たない。 \&"uid" フィールドはソケット
1454 生成者の実効 UID を保持している。
1455 .TP 
1456 \fI/proc/net/udp\fP
1457 UDP ソケットテーブルのダンプを保持している。 大部分の情報はデバッグ以外には
1458 使われない。 sl はソケットのカーネルハッシュスロットの値、 "local_address"
1459 はローカルアドレスとポート番号のペアである。 (ソケットが接続している場合は)
1460 "rem_address" はリモートアドレスとポート番号のペアである。 "st" はソケットの
1461 内部状態である。 "tx_queue" と "rx_queue" はカーネルメモリを消費している
1462 送信/受信データキューのサイズ。 "tr" と "tm\->when" と "rexmits"
1463 フィールドは UDP では使われていない。 "uid" フィールドはソケット生成者の
1464 実効 UID を保持している。 フォーマットは以下のとおり:
1465
1466 .nf
1467 .in 1n
1468 \f(CWsl  local_address rem_address   st tx_queue rx_queue tr rexmits  tm\->when uid
1469  1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
1470  1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
1471  1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0\fP
1472 .in
1473 .fi
1474 .TP 
1475 \fI/proc/net/unix\fP
1476 UNIX ドメインソケットのリスト。 フォーマットは以下のとおり:
1477 .nf
1478 .sp .5
1479 \f(CWNum RefCount Protocol Flags    Type St Path
1480  0: 00000002 00000000 00000000 0001 03
1481  1: 00000001 00000000 00010000 0001 01 /dev/printer\fP
1482 .sp .5
1483 .fi
1484
1485 ここで、Num はカーネルのテーブルスロット数、 RefCount はソケットを使用して
1486 いるユーザー数、 Protocol はいまのところいつも 0 で、Flags はソケットの状態
1487 を保持している カーネル内部のフラグである。 Type はいまのところいつも 1
1488 (UNIX ドメインのデータグラムソケットは、現在のカーネルではサポートされていない
1489 [訳注: 2.0.34 ではサポートされているようだ])。
1490 St はソケットの内部状態で、Path は(もしあれば) ソケットのパス名である。
1491 .TP 
1492 \fI/proc/partitions\fP
1493 各パーティションのメジャー番号とマイナー番号が書かれている。 さらに、ブロック数とパーティション名も書かれている。
1494 .TP 
1495 \fI/proc/pci\fP
1496 カーネルの初期化時に見つかったすべての PCI デバイスのリストと その設定。
1497
1498 .\" FIXME /proc/sched_debug
1499 .\" .TP
1500 .\" .IR /proc/sched_debug " (since Linux 2.6.23)"
1501 .\" See also /proc/[pid]/sched
1502 このファイルは非推奨であり、新しい PCI 用の \fI/proc\fP インターフェイス (\fI/proc/bus/pci\fP)  を使うこと。
1503 このファイルは Linux 2.2 でオプションになった (カーネルのコンパイル時に \fBCONFIG_PCI_OLD_PROC\fP
1504 をセットすると利用可能であった)。 Linux 2.4 で再びオプションなしで有効に戻った。 さらに、Linux 2.6 で非推奨となり
1505 (\fBCONFIG_PCI_LEGACY_PROC\fP をセットするとまだ利用可能であった)、 最終的に Linux 2.6.17
1506 以降で完全に削除された。
1507 .TP 
1508 \fI/proc/profile\fP (Linux 2.4 以降)
1509 This file is present only if the kernel was booted with the \fIprofile=1\fP
1510 command\-line option.  It exposes kernel profiling information in a binary
1511 format for use by \fBreadprofile\fP(1).  Writing (e.g., an empty string) to
1512 this file resets the profiling counters; on some architectures, writing a
1513 binary integer "profiling multiplier" of size \fIsizeof(int)\fP sets the
1514 profiling interrupt frequency.
1515 .TP 
1516 \fI/proc/scsi\fP
1517 \fIscsi\fP 中間レベル擬似ファイルといくつかの SCSI 低レベルドライバの ディレクトリを含むディレクトリ。 これらのファイルは ASCII
1518 で表現されているので \fBcat\fP(1)  で読める。
1519
1520 いくつかのファイルは書き込み可能で、サブシステムの設定を変更したり、 特定の機能をオン/オフすることができる。
1521 .TP 
1522 \fI/proc/scsi/scsi\fP
1523 カーネルが知っているすべての SCSI デバイスのリスト。 このリストは起動時に (コンソールで) 見られるものとほぼ同じである。 scsi
1524 は現在のところ \fIadd\-single\-device\fP コマンドのみをサポートしている。 これによりルート (root)
1525 は既知のデバイスリストへ活線挿抜 (hotplugged)  デバイスを加えることができる。
1526
1527 次のコマンドを実行すると、
1528 .in +4n
1529 .nf
1530
1531 echo \(aqscsi add\-single\-device 1 0 5 0\(aq > /proc/scsi/scsi
1532
1533 .fi
1534 .in
1535 ホストアダプタ scsi1 は SCSI チャネル 0 で ID 5 LUN 0 のデバイスを探す。 もしこのアドレスに既知のデバイスがあるか、
1536 不正なアドレスであったならばエラーが返る。
1537 .TP 
1538 \fI/proc/scsi/[drivername]\fP
1539 いまのところ \fI[drivername]\fP は NCR53c7xx, aha152x, aha1542, aha1740, aic7xxx,
1540 buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, scsi_debug,
1541 seagate, t128, u15\-24f, ultrastore, wd7000 のどれかである。 少なくとも 1 つの SCSI
1542 ホストバスアダプタ (HBA) に ドライバが割り当てられていると、そのドライバに対応したディレクトリが現れる。 それぞれのディレクトリには、
1543 登録されたホストアダプタに対応してファイルが作られる。 このファイルの名前は、システムの初期化の際に ホストアダプタに割り当てられた番号になる。
1544
1545 これらのファイルを読めばドライバとホストアダプタの設定や 統計などを見ることができる。
1546
1547 これらのファイルへの書き込みはホストアダプタごとに異なる動作を引き起こす。 たとえば \fIlatency\fP と \fInolatency\fP
1548 コマンドを用いると、 ルート (root、スーパーユーザー) は eata_dma ドライバの隠し測定コードの オン/オフを切り替えることができる。
1549 また \fI lockup\fP と \fIunlock\fP コマンドを用いると、ルートは scsi_debug ドライバがシミュレートするバスロックアップ
1550 (bus lockup) を 制御することができる。
1551 .TP 
1552 \fI/proc/self\fP
1553 このディレクトリはプロセスに (プロセス自身の)  \fI/proc\fP ファイルシステムへのアクセスを参照させる。 これは \fI/proc\fP 内の
1554 (このプロセスの) プロセス ID が名前となっている ディレクトリと全く同一である。
1555 .TP 
1556 \fI/proc/slabinfo\fP
1557 Linux 2.6.16 以降では、 カーネル設定オプション \fBCONFIG_SLAB\fP が有効の場合にのみ、このファイルは存在する。
1558 カーネルキャッシュの情報。 \fI/proc/slabinfo\fP のフィールドは以下のとおり。
1559 .in +4n
1560 .nf
1561
1562 cache\-name
1563 num\-active\-objs
1564 total\-objs
1565 object\-size
1566 num\-active\-slabs
1567 total\-slabs
1568 num\-pages\-per\-slab
1569 .fi
1570 .in
1571
1572 詳細は \fBslabinfo\fP(5)  を参照すること。
1573 .TP 
1574 \fI/proc/stat\fP
1575 カーネル/システムの統計。 アーキテクチャによって異なる。 共通エントリには以下のものが含まれる。
1576 .RS
1577 .TP 
1578 \fIcpu  3357 0 4313 1362393\fP
1579 .\" 1024 on Alpha and ia64
1580 The amount of time, measured in units of USER_HZ (1/100ths of a second on
1581 most architectures, use \fIsysconf(_SC_CLK_TCK)\fP to obtain the right value),
1582 that the system spent in various states:
1583 .RS
1584 .TP 
1585 \fIuser\fP
1586 (1) Time spent in user mode.
1587 .TP 
1588 \fInice\fP
1589 (2) Time spent in user mode with low priority (nice).
1590 .TP 
1591 \fIsystem\fP
1592 (3) Time spent in system mode.
1593 .TP 
1594 \fIidle\fP
1595 .\" FIXME Actually, the following info about the /proc/stat 'cpu' field
1596 .\"       does not seem to be quite right (at least in 2.6.12 or 3.6):
1597 .\"       the idle time in /proc/uptime does not quite match this value
1598 (4) Time spent in the idle task.  This value should be USER_HZ times the
1599 second entry in the \fI/proc/uptime\fP pseudo\-file.
1600 .TP 
1601 \fIiowait\fP (Linux 2.5.41 以降)
1602 (5) Time waiting for I/O to complete.
1603 .TP 
1604 \fIirq\fP (Linux 2.6.0\-test4 以降)
1605 (6) Time servicing interrupts.
1606 .TP 
1607 \fIsoftirq\fP (Linux 2.6.0\-test4 以降)
1608 (7) Time servicing softirqs.
1609 .TP 
1610 \fIsteal\fP (Linux 2.6.11 以降)
1611 (8) 盗まれた時間 (stolen time)。仮想化環境での動作時に他のオペレーティングシステムにより消費された時間である。
1612 .TP 
1613 \fIguest\fP (Linux 2.6.24 以降)
1614 .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
1615 (9) Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU の 実行に消費された時間。
1616 .TP 
1617 \fIguest_nice\fP (Linux 2.6.33 以降)
1618 .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
1619 (10) nice が適用されたゲスト (Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU) の 実行に消費された時間。
1620 .RE
1621 .TP 
1622 \fIpage 5741 1808\fP
1623 システムが (ディスクから) ページイン/ページアウトしたページ数。
1624 .TP 
1625 \fIswap 1 0\fP
1626 スワップイン/スワップアウトされたページ数。
1627 .TP 
1628 .\" FIXME The following is not the full picture for the 'intr' of
1629 .\"       /proc/stat on 2.6:
1630 \fIintr 1462898\fP
1631 この行はシステム起動時以降に処理された割り込みの回数を示す。 最初の欄は処理された割り込み全ての合計であり、それ以降の欄は
1632 個々の割り込みについての合計数である。
1633 .TP 
1634 \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
1635 (メジャー番号, ディスクインデックス番号):(情報なし (noinfo), 読み込み回数, 読み込みブロック数, 書き出し回数, 書き出しブロック数)
1636 .br
1637 (Linux 2.4 のみ)
1638 .TP 
1639 \fIctxt 115315\fP
1640 コンテクスト・スイッチの延べ回数。
1641 .TP 
1642 \fIbtime 769041601\fP
1643 起動時刻、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。
1644 .TP 
1645 \fIprocesses 86031\fP
1646 システム起動時からの延べフォーク (fork) 数。
1647 .TP 
1648 \fIprocs_running 6\fP
1649 実行中状態のプロセス数 (Linux 2.5.45 以降)。
1650 .TP 
1651 \fIprocs_blocked 2\fP
1652 I/O 完了待ちで停止 (blocked) しているプロセス数 (Linux 2.5.45 以降)。
1653 .RE
1654 .TP 
1655 \fI/proc/swaps\fP
1656 使用中のスワップ領域。 \fBswapon\fP(8)  も参照すること。
1657 .TP 
1658 \fI/proc/sys\fP
1659 このディレクトリ (1.3.57 以降に存在) はカーネル変数に対応するいくつかの
1660 ファイルとサブディレクトリを含む。 これらの変数は読み出し可能である。
1661 また場合によっては \fI/proc\fP ファイルシステムや、 (非推奨の) システムコール
1662 \fBsysctl\fP(2) を用いて書き換えることもできる。
1663 .TP 
1664 \fI/proc/sys/abi\fP (Linux 2.4.10 以降)
1665 .\" On some systems, it is not present.
1666 このディレクトリにはアプリケーションのバイナリ情報が入ったファイルが置かれる。 更に詳しい情報は、 Linux カーネルソースファイル
1667 \fIDocumentation/sysctl/abi.txt\fP を参照すること。
1668 .TP 
1669 \fI/proc/sys/debug\fP
1670 このディレクトリは空の場合もある。
1671 .TP 
1672 \fI/proc/sys/dev\fP
1673 このディレクトリにはデバイス特有の情報 (たとえば \fIdev/cdrom/info\fP)  が含まれる。
1674 このディレクトリが空になっているシステムもある。
1675 .TP 
1676 \fI/proc/sys/fs\fP
1677 このディレクトリには、ファイルシステムに関連するカーネル変数用の
1678 ディレクトリとサブディレクトリが含まれる。
1679 .TP 
1680 \fI/proc/sys/fs/binfmt_misc\fP
1681 このディレクトリ以下のファイルについてのドキュメントは、 Linux カーネルソースの \fIDocumentation/binfmt_misc.txt\fP
1682 にある。
1683 .TP 
1684 \fI/proc/sys/fs/dentry\-state\fP (Linux 2.2 以降)
1685 このファイルには、ディレクトリキャッシュ (dcache) の状態に関する情報が 入っている。ファイルには、 \fInr_dentry\fP,
1686 \fInr_unused\fP, \fIage_limit\fP (秒単位の age), \fIwant_pages\fP (システムがリクエストしたページ数),
1687 ダミーの 2 つの値、 という 6 つの数字が書かれている。
1688 .RS
1689 .IP * 2
1690 \fInr_dentry\fP は割り当てられた dentry (dcache エントリ) の数である。 このフィールドは Linux 2.2
1691 では使用されない。
1692 .IP *
1693 \fInr_unused\fP は未使用の dentry 数である。
1694 .IP *
1695 .\" looks like this is unused in kernels 2.2 to 2.6
1696 \fIage_limit\fP は、メモリが不足している場合に次に dcache entry を再要求できるように なるまでの残り時間 (秒数) である。
1697 .IP *
1698 .\" looks like this is unused in kernels 2.2 to 2.6
1699 \fIwant_pages\fP は、カーネルが shrink_dcache_pages() を呼び出したが dcache がまだ縮小されていない場合に、0
1700 以外の値となる。
1701 .RE
1702 .TP 
1703 \fI/proc/sys/fs/dir\-notify\-enable\fP
1704 このファイルは \fBfcntl\fP(2)  に記述されている \fIdnotify\fP インターフェースをシステム全体で無効にしたり有効にしたりする。
1705 このファイルに値 0 が書かれている場合はインターフェースが無効になり、 値 1 の場合は有効になる。
1706 .TP 
1707 \fI/proc/sys/fs/dquot\-max\fP
1708 このファイルにはキャッシュされるディスク quota エントリの最大数が書かれている。 (2.4 系の)
1709 システムの中には、このファイルが存在しないものもある。 キャッシュされるディスク quota エントリの空きが非常に少なく、
1710 とても多くのシステムユーザーが同時に存在する場合、 この制限を上げるといいかもしれない。
1711 .TP 
1712 \fI/proc/sys/fs/dquot\-nr\fP
1713 このファイルには割り当てられているディスク quota のエントリ数と、 空いているディスク quota のエントリ数が書かれている。
1714 .TP 
1715 \fI/proc/sys/fs/epoll\fP (Linux 2.6.28 以降)
1716 このディレクトリには、ファイル \fImax_user_watches\fP がある。 これらは、 \fIepoll\fP
1717 インタフェースが消費するカーネルメモリ量を制限するのに使用できる。 詳細は \fBepoll\fP(7)  を参照。
1718 .TP 
1719 \fI/proc/sys/fs/file\-max\fP
1720 This file defines a system\-wide limit on the number of open files for all
1721 processes.  (See also \fBsetrlimit\fP(2), which can be used by a process to set
1722 the per\-process limit, \fBRLIMIT_NOFILE\fP, on the number of files it may
1723 open.)  If you get lots of error messages in the kernel log about running
1724 out of file handles (look for "VFS: file\-max limit <number>
1725 reached"), try increasing this value:
1726 .br
1727
1728 .br
1729 .nf
1730 \f(CW    echo 100000 > /proc/sys/fs/file\-max\fP
1731 .fi
1732
1733 \fIfile\-max\fP に書かれている値は、カーネル定数 \fBNR_OPEN\fP に制限される。
1734
1735 \fI/proc/sys/fs/file\-max\fP を増やした場合は、 \fI/proc/sys/fs/inode\-max\fP を新しい
1736 \fI/proc/sys/fs/file\-max\fP の値の 3\-4 倍に増やしておくこと。 こうしないと inode を使い果たしてしまうだろう。
1737
1738 特権プロセス (\fBCAP_SYS_ADMIN\fP) は \fIfile\-max\fP 上限を上書きできる。
1739 .TP 
1740 \fI/proc/sys/fs/file\-nr\fP
1741 This (read\-only) file contains three numbers: the number of allocated file
1742 handles (i.e., the number of files presently opened); the number of free
1743 file handles; and the maximum number of file handles (i.e., the same value
1744 as \fI/proc/sys/fs/file\-max\fP).  If the number of allocated file handles is
1745 close to the maximum, you should consider increasing the maximum.  Before
1746 Linux 2.6, the kernel allocated file handles dynamically, but it didn't free
1747 them again.  Instead the free file handles were kept in a list for
1748 reallocation; the "free file handles" value indicates the size of that
1749 list.  A large number of free file handles indicates that there was a past
1750 peak in the usage of open file handles.  Since Linux 2.6, the kernel does
1751 deallocate freed file handles, and the "free file handles" value is always
1752 zero.
1753 .TP 
1754 \fI/proc/sys/fs/inode\-max\fP
1755 このファイルには、メモリ内 inode の最大値が書かれている。 (2.4 系の) システムによっては、このファイルが存在しないかもしれない。 この値は
1756 \fIfile\-max\fP の値の 3\-4 倍にすべきである。 これは \fIstdin\fP, \fIstdout\fP, ネットワークソケットを扱うにも inode
1757 が必要なためである。 日常的に inode を使い果たしている場合は、この値を増やす必要がある。
1758 .TP 
1759 \fI/proc/sys/fs/inode\-nr\fP
1760 このファイルには、 \fIinode\-state\fP の最初の 2 つの値が書かれている。
1761 .TP 
1762 \fI/proc/sys/fs/inode\-state\fP
1763 このファイルには 7 個の値が書かれている: \fInr_inodes,\fP \fInr_free_inodes\fP, \fIpreshrink\fP と 4
1764 つのダミーの値である。 \fInr_inodes\fP はシステムが確保する inode の数である。 Linux は 1 度に 1 ページ分いっぱいに
1765 nr_inode を確保するので、この値が \fIinode\-max\fP より幾分大きくなることもある。 \fInr_free_inodes\fP は空いている
1766 inode の数を表す。 \fInr_inodes\fP > \fIinode\-max\fP の場合、 \fIpreshrink\fP は 0 以外の値になる。
1767 この場合システムは inode をさらに確保するのではなく、 inode リストを切り詰める必要がある。
1768 .TP 
1769 \fI/proc/sys/fs/inotify\fP (Linux 2.6.13 以降)
1770 このディレクトリには、ファイル \fImax_queued_events\fP, \fImax_user_instances\fP, and
1771 \fImax_user_watches\fP がある。これらは、 \fIinotify\fP インタフェースが消費するカーネルメモリ量を制限するのに利用できる。
1772 詳細は \fBinotify\fP(7)  を参照。
1773 .TP 
1774 \fI/proc/sys/fs/lease\-break\-time\fP
1775 このファイルは、ファイルを保持しているプロセスに対して カーネルがシグナルを送り、
1776 他のプロセスがそのファイルをオープンするのを待っていることを通知してから、 そのプロセスに対してカーネルがファイルのリース (lease, 貸し出し)
1777 (\fBfcntl\fP(2)  を参照) を許す猶予期間を指定する。 リースホルダ (lease holder: ファイルの貸し出しを受けているプロセス)
1778 が 猶予期間中にリースを削除するか階級を低くしない場合、 カーネルはファイルのリースを強制的に止める。
1779 .TP 
1780 \fI/proc/sys/fs/leases\-enable\fP
1781 このファイルはシステム全体でのファイルリース (\fBfcntl\fP(2)  を参照) を有効または無効にする。 ファイルに値 0
1782 が書き込まれている場合、リースは無効である。 0 以外の場合にはリースは有効である。
1783 .TP 
1784 \fI/proc/sys/fs/mqueue\fP (Linux 2.6.6 以降)
1785 このディレクトリにはファイル \fImsg_max\fP, \fImsgsize_max\fP, and \fIqueues_max\fP がある。これらは POSIX
1786 メッセージキューで使用されるリソースの 制御を行う。 詳細は \fBmq_overview\fP(7)  を参照。
1787 .TP 
1788 \fI/proc/sys/fs/overflowgid\fP と \fI/proc/sys/fs/overflowuid\fP
1789 これらのファイルにより、ユーザーは固定 UID と固定 GID の値を変更できる。 デフォルトは 65534 である。 Linux の UID と
1790 GID は 32 ビットであるが、 16 ビットの UID と GID しかサポートしないファイルシステムもある。
1791 このようなファイルシステムが書き込みを許可してマウントされた場合、 65535 を超える UID と GID は、
1792 ディスクに書き込まれる前にオーバーフロー値に変換される。
1793 .TP 
1794 \fI/proc/sys/fs/pipe\-max\-size\fP (Linux 2.6.35 以降)
1795 このファイルの値により、 \fBfcntl\fP(2) の \fBF_SETPIPE_SZ\fP
1796 操作で増やすことができるパイプ容量の上限値が定義される。この上限は非特権プロセスにのみ適用される。このファイルのデフォルト値は 1,048,576
1797 である。このファイルに設定した値は切り上げられて、実装側で利用するのに都合のよい値に変更される場合がある。切り上げられた値を確認するには、値を設定した後でこのファイルの内容を表示すればよい。このファイルに設定できる最小値はシステムのページサイズである。
1798 .TP 
1799 \fI/proc/sys/fs/protected_hardlinks\fP (Linux 3.6 以降)
1800 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
1801 When the value in this file is 0, no restrictions are placed on the creation
1802 of hard links (i.e., this is the historical behaviour before Linux 3.6).
1803 When the value in this file is 1, a hard link can be created to a target
1804 file only if one of the following conditions is true:
1805 .RS
1806 .IP * 3
1807 The caller has the \fBCAP_FOWNER\fP capability.
1808 .IP *
1809 The file system UID of the process creating the link matches the owner (UID)
1810 of the target file (as described in \fBcredentials\fP(7), a process's file
1811 system UID is normally the same as its effective UID).
1812 .IP *
1813 All of the following conditions are true:
1814 .RS 4
1815 .IP \(bu 3
1816 the target is a regular file;
1817 .IP \(bu
1818 the target file does not have its set\-user\-ID permission bit enabled;
1819 .IP \(bu
1820 the target file does not have both its set\-group\-ID and group\-executable
1821 permission bits enabled; and
1822 .IP \(bu
1823 the caller has permission to read and write the target file (either via the
1824 file's permissions mask or because it has suitable capabilities).
1825 .RE
1826 .RE
1827 .IP
1828 The default value in this file is 0.  Setting the value to 1 prevents a
1829 longstanding class of security issues caused by hard\-link\-based
1830 time\-of\-check, time\-of\-use races, most commonly seen in world\-writable
1831 directories such as \fI/tmp\fP.  The common method of exploiting this flaw is
1832 to cross privilege boundaries when following a given hard link (i.e., a root
1833 process follows a hard link created by another user).  Additionally, on
1834 systems without separated partitions, this stops unauthorized users from
1835 "pinning" vulnerable set\-user\-ID and set\-group\-ID files against being
1836 upgraded by the administrator, or linking to special files.
1837 .TP 
1838 \fI/proc/sys/fs/protected_symlinks\fP (Linux 3.6 以降)
1839 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
1840 When the value in this file is 0, no restrictions are placed on following
1841 symbolic links (i.e., this is the historical behaviour before Linux 3.6).
1842 When the value in this file is 1, symbolic links are followed only in the
1843 following circumstances:
1844 .RS
1845 .IP * 3
1846 the file system UID of the process following the link matches the owner
1847 (UID) of the symbolic link (as described in \fBcredentials\fP(7), a process's
1848 file system UID is normally the same as its effective UID);
1849 .IP *
1850 the link is not in a sticky world\-writable directory; or
1851 .IP *
1852 the symbolic link and and its parent directory have the same owner (UID)
1853 .RE
1854 .IP
1855 A system call that fails to follow a symbolic link because of the above
1856 restrictions returns the error \fBEACCES\fP in \fIerrno\fP.
1857 .IP
1858 The default value in this file is 0.  Setting the value to 1 avoids a
1859 longstanding class of security issues based on time\-of\-check, time\-of\-use
1860 races when accessing symbolic links.
1861 .TP 
1862 \fI/proc/sys/fs/suid_dumpable\fP (Linux 2.6.13 以降)
1863 .\" The following is based on text from Documentation/sysctl/kernel.txt
1864 このファイルの値により、set\-user\-ID されたバイナリや、 保護がかかった (protected) バイナリ / tainted な
1865 (汚染された; ライセンスがカーネルと適合しない) バイナリに対して、コアダンプファイルを 生成するかどうかが決定される。 以下の
1866 3つの値を指定することができる:
1867 .RS
1868 .TP 
1869 \fI0\ (default)\fP
1870 この値を指定すると、以前と同じ (Linux 2.6.13 より前の) 動作をする。 (\fBseteuid\fP(2), \fBsetgid\fP(2)
1871 などを呼び出すことや、set\-user\-ID や set\-group\-ID されたプログラムを 実行することで) 資格情報 (credentials)
1872 が変更されているプロセスや、 プロセスの実行バイナリの読み出し許可がないプロセスに対して、 コアダンプを生成しない。
1873 .TP 
1874 \fI1\ ("debug")\fP
1875 すべてのプロセスで、可能であればコアダンプを行う。 コアダンプファイルの所有者は、ダンプを行うプロセスのファイルシステム UID
1876 となり、セキュリティ上の考慮は行われない。 この値は、システムデバッグの場面だけを想定して設けられている。 ptrace のチェックも行われない。
1877 .TP 
1878 \fI2\ ("suidsafe")\fP
1879 通常はダンプされないようなバイナリ (上記の "0" 参照) を root だけが読み出し可能な形でダンプする。
1880 この場合、ユーザはそのコアダンプファイルを削除することはできるが、 読むことはできない。 セキュリティ上の理由から、このモードのコアダンプでは、
1881 既存のダンプファイルや他のファイルを上書きすることはない。 このモードは、管理者が通常の環境で問題を解析しようとする際に 適している。
1882 .IP
1883 .\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709
1884 .\" 54b501992dd2a839e94e76aa392c392b55080ce8
1885 Additionally, since Linux 3.6, \fI/proc/sys/kernel/core_pattern\fP must either
1886 be an absolute pathname or a pipe command, as detailed in \fBcore\fP(5).
1887 Warnings will be written to the kernel log if \fIcore_pattern\fP does not
1888 follow these rules, and no core dump will be produced.
1889 .RE
1890 .TP 
1891 このファイルはスーパブロックの値を制御する。
1892 この値はカーネルがマウントできるファイルシステムの最大値になる。 現在、 \fIsuper\-max\fP で許可されているファイルシステム数以上に
1893 マウントする必要がある場合は、この値を増加させるだけでよい。
1894 .TP 
1895 \fI/proc/sys/fs/super\-nr\fP
1896 このファイルには現在マウントされているファイルシステム数が書かれている。
1897 .TP 
1898 \fI/proc/sys/kernel\fP
1899 このディレクトリには、以下で説明する様々なカーネルパラメータを 制御するためのファイルが配置されている。
1900 .TP 
1901 \fI/proc/sys/kernel/acct\fP
1902 このファイルには 3 つの値が含まれている: \fIhighwater\fP, \fIlowwater\fP, \fIfrequency\fP である。
1903 BSD\-style process accounting が有効になっている場合、 これら 3 つの値が動作を制御する。
1904 ログファイルのあるファイルシステムの空き領域が \fIlowwater\fP パーセント以下になった場合は、ログ記録を一時停止する。 空き領域が
1905 \fIhighwater\fP パーセント以上になった場合に、ログ記録を再開する。 \fIfrequency\fP はカーネルが空き領域のチェックをする頻度である
1906 (単位は秒)。 デフォルトの値は、4, 2, 30 である。 つまり、空き領域が 2% 以下になるとログ記録を一時停止し、 空き領域が 4%
1907 以上となったときに再開する。 空き領域についての情報は 30 秒間有効である点に注意すること。
1908 .TP 
1909 \fI/proc/sys/kernel/cap_last_cap\fP (since Linux 3.2)
1910 See \fBcapabilities\fP(7).
1911 .TP 
1912 \fI/proc/sys/kernel/cap\-bound\fP (Linux 2.2 to 2.6.24 以降)
1913 \fI/proc/sys/kernel/cap\-bound\fP このファイルにはカーネルの \fIcapability bounding set\fP (符号付き
1914 10 進数表現) の値が書かれている。 \fBexecve\fP(2)  中は、このセットとプロセスに許可されている権限の AND がとられる。 Linux
1915 2.6.25 以降では、システム全体のケーパビリティバウンディングセットは なくなり、スレッド単位のバウンディングセットに置き換えられた。
1916 \fBcapabilities\fP(7)  を参照。
1917 .TP 
1918 \fI/proc/sys/kernel/core_pattern\fP
1919 \fBcore\fP(5)  参照。
1920 .TP 
1921 \fI/proc/sys/kernel/core_uses_pid\fP
1922 \fBcore\fP(5)  参照。
1923 .TP 
1924 \fI/proc/sys/kernel/ctrl\-alt\-del\fP
1925 このファイルはキーボードの Ctrl\-Alt\-Del の扱いを制御する。 このファイルにある値が 0 の場合、 Ctrl\-Alt\-Del が捕捉されると
1926 \fBinit\fP(8)  プログラムに送られて、正しく再起動される。 値が 0 より大きい場合、Vulcan Nerve Pinch (tm)
1927 に反応して、 Linux はダーティバッファを同期させることなく、すぐに再起動を行う。 注意: プログラム (dosemu など) に "raw"
1928 モードのキーボードがある場合、 ctrl\-alt\-del はカーネルの tty レイヤーに到達する前に プログラムに遮断され、
1929 プログラムに送られてどのように扱うかが決められる。
1930 .TP 
1931 \fI/proc/sys/kernel/dmesg_restrict\fP (Linux 2.6.37 以降)
1932 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
1933 The value in this file determines who can see kernel syslog contents.  A
1934 value of 0 in this file imposes no restrictions.  If the value is 1, only
1935 privileged users can read the kernel syslog.  (See \fBsyslog\fP(2)  for more
1936 details.)  Since Linux 3.4, only users with the \fBCAP_SYS_ADMIN\fP capability
1937 may change the value in this file.
1938 .TP 
1939 \fI/proc/sys/kernel/domainname\fP と \fI/proc/sys/kernel/hostname\fP
1940 これらのファイルは、コマンド \fBdomainname\fP(1), \fBhostname\fP(1)  と全く同じ方法で、 マシンの NIS/YP
1941 ドメイン名とホスト名の設定に使える。 すなわち
1942
1943 .in +4n
1944 .nf
1945 #\fB echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname\fP
1946 #\fB echo \(aqmydomain\(aq > /proc/sys/kernel/domainname\fP
1947 .fi
1948 .in
1949
1950 は、以下と同じ効果がある。
1951
1952 .in +4n
1953 .nf
1954 #\fB hostname \(aqdarkstar\(aq\fP
1955 #\fB domainname \(aqmydomain\(aq\fP
1956 .fi
1957 .in
1958
1959 注意: 典型的な darkstar.frop.org という名前には、 ホスト名 "darkstar" と DNS (Internet Domain
1960 Name Server)  ドメイン名 "frop.org" が含まれているが、DNS ドメイン名と NIS (Network Information
1961 Service) または YP (Yellow Pages) のドメイン名を混同してはならない。 一般にこれら 2 つのドメイン名は異なる。
1962 詳細な議論は、 \fBhostname\fP(1)  の man ページを参照すること。
1963 .TP 
1964 \fI/proc/sys/kernel/hotplug\fP
1965 このファイルはホットプラグ・ポリシー・エージェントのパスが書かれている。 このファイルのデフォルト値は \fI/sbin/hotplug\fP である。
1966 .TP 
1967 \fI/proc/sys/kernel/htab\-reclaim\fP
1968 (PowerPC のみ) このファイルを 0 以外の値に設定すると、 PowerPC htab (カーネルソースファイル
1969 \fIDocumentation/powerpc/ppc_htab.txt\fP 参照) を、システムがアイドルループになるたびに切り詰める。
1970 .TP 
1971 \fI/proc/sys/kernel/kptr_restrict\fP (Linux 2.6.38 以降)
1972 .\" 455cd5ab305c90ffc422dd2e0fb634730942b257
1973 .\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9
1974 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
1975 The value in this file determines whether kernel addresses are exposed via
1976 \fI/proc\fP files and other interfaces.  A value of 0 in this file imposes no
1977 restrictions.  If the value is 1, kernel pointers printed using the \fI%pK\fP
1978 format specifier will be replaced with zeros unless the user has the
1979 \fBCAP_SYSLOG\fP capability.  If the value is 2, kernel pointers printed using
1980 the \fI%pK\fP format specifier will be replaced with zeros regardless of the
1981 user's capabilities.  The initial default value for this file was 1, but the
1982 default was changed to 0 in Linux 2.6.39.  Since Linux 3.4, only users with
1983 the \fBCAP_SYS_ADMIN\fP capability can change the value in this file.
1984 .TP 
1985 \fI/proc/sys/kernel/l2cr\fP
1986 (PowerPC のみ) このファイルには G3 プロセッサボードの L2 キャッシュを制御するフラグが含まれる。 0 の場合、キャッシュは無効になる。
1987 0 以外の場合は有効になる。
1988 .TP 
1989 \fI/proc/sys/kernel/modprobe\fP
1990 このファイルには、カーネルモジュールローダへのパスが含まれる。 デフォルトの値は \fI/sbin/modprobe\fP
1991 である。このファイルは、\fBCONFIG_MODULES\fP オプション (Linux 2.6.26 以前では \fBCONFIG_KMOD\fP)
1992 を有効にしてカーネルが作成されている場合にのみ存在する。 このファイルについては、Linux カーネルソースファイル
1993 \fIDocumentation/kmod.txt\fP (カーネル 2.4 以前のみに存在) に記述されている。
1994 .TP 
1995 \fI/proc/sys/kernel/modules_disabled\fP (Linux 2.6.31 以降)
1996 .\" 3d43321b7015387cfebbe26436d0e9d299162ea1
1997 .\" From Documentation/sysctl/kernel.txt
1998 A toggle value indicating if modules are allowed to be loaded in an
1999 otherwise modular kernel.  This toggle defaults to off (0), but can be set
2000 true (1).  Once true, modules can be neither loaded nor unloaded, and the
2001 toggle cannot be set back to false.  The file is present only if the kernel
2002 is built with the \fBCONFIG_MODULES\fP option enabled.
2003 .TP 
2004 \fI/proc/sys/kernel/msgmax\fP
2005 このファイルは、System V メッセージキューに書き込まれる 1 つのメッセージの 最大バイト数を、システム全体で制限する。
2006 .TP 
2007 \fI/proc/sys/kernel/msgmni\fP (since Linux 2.4)
2008 This file defines the system\-wide limit on the number of message queue
2009 identifiers.
2010 .TP 
2011 \fI/proc/sys/kernel/msgmnb\fP
2012 このファイルは、 \fImsg_qbytes\fP の設定を初期化するシステム全体のパラメータで
2013 ある。 \fImsg_qbytes\fP は以降で作成されるメッセージキューで使われる。
2014 \fImsg_qbytes\fP 設定では、メッセージキューに書き込まれる最大バイト数を指定する。
2015 .TP 
2016 \fI/proc/sys/kernel/ostype\fP と \fI/proc/sys/kernel/osrelease\fP
2017 これらのファイルは文字列 \fI/proc/version\fP の各部分を与える。
2018 .TP 
2019 \fI/proc/sys/kernel/overflowgid\fP と \fI/proc/sys/kernel/overflowuid\fP
2020 これらのファイルは \fI/proc/sys/fs/overflowgid\fP と \fI/proc/sys/fs/overflowuid\fP
2021 を複製したものである。
2022 .TP 
2023 \fI/proc/sys/kernel/panic\fP
2024 このファイルはカーネル変数 \fIpanic_timeout\fP への読み出しと書き込みのアクセスを与える。 この値が 0 ならば、パニック時にカーネルは
2025 (無限) ループに入る。 0 でなければ、その秒数だけ待ってから自動的に再起動する。 ソフトウェア watchdog ドライバを使っている場合、
2026 推奨される設定は 60 である。
2027 .TP 
2028 \fI/proc/sys/kernel/panic_on_oops\fP (Linux 2.5.68 以降)
2029 このファイルは、oops や BUG が起こった場合のカーネルの動作を制御する。 ファイルに 0 が書かれている場合、システムは操作を続行しようとする。
2030 1 が書かれている場合、システムは (klogd が oops 出力を記録する時間を与えるために) 数秒間遅延した後、 panic を起こす。
2031 \fI/proc/sys/kernel/panic\fP ファイルも 0 でない場合、マシンは再起動される。
2032 .TP 
2033 \fI/proc/sys/kernel/pid_max\fP (Linux 2.5.34 以降)
2034 .\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
2035 .\" platforms, but this broke /proc/[pid]
2036 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
2037 このファイルは、PID をいくつで終了にするかを指定する (すなわち、このファイルの値は最大 PID より 1 大きい)。 このファイルのデフォルト値は
2038 32768 であり、 その場合には以前のカーネルと同じ PID の範囲になる。 32ビットのプラットフォームでは、 \fIpid_max\fP の最大値は
2039 32768 である。 64ビットのプラットフォームでは、 2^22 (\fBPID_MAX_LIMIT\fP, 約 4,000,000)
2040 までの任意の値を設定できる。
2041 .TP 
2042 \fI/proc/sys/kernel/powersave\-nap\fP (PowerPC のみ)
2043 このファイルにはフラグが書かれている。 フラグが設定されると、Linux\-PPC は 省電力の "nap" モードを使う。
2044 設定されない場合は、"doze" モードが使われる。
2045 .TP 
2046 \fI/proc/sys/kernel/printk\fP
2047 このファイルにある 4 つの値は、 \fIconsole_loglevel\fP, \fIdefault_message_loglevel\fP,
2048 \fIminimum_console_loglevel\fP, \fIdefault_console_loglevel\fP である。
2049 これらの値はエラーメッセージを表示したり記録したりする \fIprintk()\fP の動作に影響する。 各 loglevel の情報については、
2050 \fBsyslog\fP(2)  を参照すること。 優先度が \fIconsole_loglevel\fP 以上のメッセージは、コンソールに表示される。
2051 優先度が明示されていないメッセージは、優先度が \fIdefault_message_level\fP のときに表示される。
2052 \fIminimum_console_loglevel\fP は \fIconsole_loglevel\fP に設定できる最小 (最高) の値である。
2053 \fIdefault_console_loglevel\fP は \fIconsole_loglevel\fP のデフォルトの値である。
2054 .TP 
2055 \fI/proc/sys/kernel/pty\fP (Linux 2.6.4 以降)
2056 このディレクトリは、UNIX 98 疑似端末 (\fBpts\fP(4) を参照) の数に関連する
2057 2 つのファイルを含む。
2058 .TP 
2059 \fI/proc/sys/kernel/pty/max\fP
2060 このファイルは疑似端末の最大数を定義する。
2061 .TP 
2062 \fI/proc/sys/kernel/pty/nr\fP
2063 この読み出し専用のファイルは、現在いくつの疑似端末が使われているかを表す。
2064 .TP 
2065 \fI/proc/sys/kernel/random\fP
2066 このディレクトリは、ファイル \fI/dev/random\fP の操作を制御する様々なパラメータが書かれている。 詳細は \fBrandom\fP(4)
2067 を参照。
2068 .TP 
2069 \fI/proc/sys/kernel/real\-root\-dev\fP
2070 このファイルは Linux カーネルソースファイル \fIDocumentation/initrd.txt\fP に記述されている。
2071 .TP 
2072 \fI/proc/sys/kernel/reboot\-cmd\fP (Sparc のみ) 
2073 このファイルは SPARC ROM/Flash ブートローダに引き数を渡す方法を 提供しているように思われる。
2074 再起動後に何をするかを指定しているのだろうか?
2075 .TP 
2076 \fI/proc/sys/kernel/rtsig\-max\fP
2077 (2.6.7 までのカーネルにのみ存在する。 \fBsetrlimit\fP(2)  を参照すること)  このファイルはシステムで発行される POSIX
2078 real\-time (queued) signal の 最大数を調整するのに使用される。
2079 .TP 
2080 \fI/proc/sys/kernel/rtsig\-nr\fP
2081 (2.6.7 までのカーネルにのみ存在する)  このファイルは現在キューに入っている POSIX real\-time signal の数を表す。
2082 .TP 
2083 \fI/proc/sys/kernel/sched_rr_timeslice_ms\fP (since Linux 3.9)
2084 See \fBsched_rr_get_interval\fP(2).
2085 .TP 
2086 \fI/proc/sys/kernel/sem\fP (Linux 2.4 以降)
2087 このファイルには System V IPC セマフォを制限する 4 つの値が書かれている。 これらのフィールドは次の順番に並んでいる:
2088 .RS
2089 .IP SEMMSL 8
2090 セマフォ集合ごとのセマフォ数の最大値。
2091 .IP SEMMNS 8
2092 システム全体での、全てのセマフォ集合におけるセマフォ数の制限。
2093 .IP SEMOPM 8
2094 \fBsemop\fP(2)  コールに指定されるオペレーション数の最大値。
2095 .IP SEMMNI 8
2096 システム全体でのセマフォ識別子の最大値。
2097 .RE
2098 .TP 
2099 \fI/proc/sys/kernel/sg\-big\-buff\fP
2100 このファイルは、汎用 SCSI デバイス (sg) のバッファサイズの最大値を表す。 今はこれを変更することはできないが、 コンパイル時に
2101 \fIinclude/scsi/sg.h\fP を編集して \fBSG_BIG_BUFF\fP の値を変えれば変更できる。
2102 ただし、この値を変更する理由はないだろう。
2103 .TP 
2104 \fI/proc/sys/kernel/shm_rmid_forced\fP (since Linux 3.1)
2105 .\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53
2106 .\" See also Documentation/sysctl/kernel.txt
2107 If this file is set to 1, all System V shared memory segments will be marked
2108 for destruction as soon as the number of attached processes falls to zero;
2109 in other words, it is no longer possible to create shared memory segments
2110 that exist independently of any attached process.
2111 .IP
2112 The effect is as though a \fBshmctl\fP(2)  \fBIPC_RMID\fP is performed on all
2113 existing segments as well as all segments created in the future (until this
2114 file is reset to 0).  Note that existing segments that are attached to no
2115 process will be immediately destroyed when this file is set to 1.  Setting
2116 this option will also destroy segments that were created, but never
2117 attached, upon termination of the process that created the segment with
2118 \fBshmget\fP(2).
2119 .IP
2120 Setting this file to 1 provides a way of ensuring that all System V shared
2121 memory segments are counted against the resource usage and resource limits
2122 (see the description of \fBRLIMIT_AS\fP in \fBgetrlimit\fP(2))  of at least one
2123 process.
2124 .IP
2125 Because setting this file to 1 produces behavior that is nonstandard and
2126 could also break existing applications, the default value in this file is
2127 0.  Only set this file to 1 if you have a good understanding of the
2128 semantics of the applications using System V shared memory on your system.
2129 .TP 
2130 \fI/proc/sys/kernel/shmall\fP
2131 このファイルには System V 共有メモリの総ページ数の システム全体での制限が書かれている。
2132 .TP 
2133 \fI/proc/sys/kernel/shmmax\fP
2134 このファイルを通じて、(System V IPC) 共有メモリセグメントを作成するときの 最大サイズの実行時上限 (run\-time limit)
2135 を取得または設定できる。 現在は 1GB までの共有メモリセグメントが カーネルでサポートされている。 この値のデフォルトは \fBSHMMAX\fP
2136 である。
2137 .TP 
2138 \fI/proc/sys/kernel/shmmni\fP (since Linux 2.4)
2139 このファイルは、システム全体で作成可能な System V 共有メモリセグメント数を指定する。
2140 .TP 
2141 \fI/proc/sys/kernel/sysrq\fP
2142 このファイルは、SysRq キーにより起動が許可されている関数群を制御する ものである。デフォルトでは、ファイルの内容は 1 であり、
2143 これは起こり得る全ての SysRq リクエストが許可されることを意味する (古いバージョンのカーネルでは、SysRq はデフォルトでは無効になっており、
2144 実行時に明示的に有効にする必要があったが、今はそうではない)。 このファイルで指定可能な値は以下の通り。
2145
2146    0 \- sysrq を完全に無効にする
2147    1 \- sysrq の全ての関数を有効にする
2148   >1 \- 許可する sysrq 関数のビットマスク。内訳は以下の通り。
2149           2 \- コンソールのログ・レベルの制御を有効にする
2150           4 \- キーボードの制御を有効にする (SAK, unraw)
2151           8 \- プロセスなどのデバッグ・ダンプを有効にする
2152          16 \- sync コマンドを有効にする
2153          32 \- 読み出し専用での再マウントを有効にする
2154          64 \- プロセスへのシグナル発行を有効にする (term, kill, oom\-kill)
2155         128 \- リブート/電源オフを許可する
2156         256 \- 全てのリアルタイム・タスクの nice 値の変更を許可する
2157
2158 カーネル設定オプション \fBCONFIG_MAGIC_SYSRQ\fP が有効な場合のみ、このファイルは存在する。 詳細は、Linux
2159 カーネルソースファイル \fIDocumentation/sysrq.txt\fP を参照のこと。
2160 .TP 
2161 \fI/proc/sys/kernel/version\fP
2162 このファイルには、以下のような文字列が書かれている:
2163
2164     #5 Wed Feb 25 21:49:24 MET 1998
2165
2166 \&"#5" はこのソースで構築された 5 番目のカーネルであることを意味する。 その後にある日付はカーネルが構築された時刻を表す。
2167 .TP 
2168 \fI/proc/sys/kernel/threads\-max\fP (Linux 2.3.11 以降)
2169 このファイルは、システム全体で作成可能なスレッド数 (タスク数) の上限を指定する。
2170 .TP 
2171 \fI/proc/sys/kernel/zero\-paged\fP (PowerPC のみ) 
2172 このファイルはフラグを含む。 (0 以外の値で) 有効された場合、Linux\-PPC はアイドルループで pre\-zero page
2173 を行うので、get_free_pages の速度が向上する可能性がある。
2174 .TP 
2175 \fI/proc/sys/net\fP
2176 このディレクトリにはネットワーク関係の情報が入っている。 このディレクトリにあるファイルのいくつかについては、 \fBtcp\fP(7)  や
2177 \fBip\fP(7)  に説明がある。
2178 .TP 
2179 \fI/proc/sys/net/core/somaxconn\fP
2180 このファイルは \fBlisten\fP(2)  の \fIbacklog\fP 引き数の上限値を規定する。 詳細は \fBlisten\fP(2)
2181 のマニュアルページを参照。
2182 .TP 
2183 \fI/proc/sys/proc\fP
2184 このディレクトリは空の場合もある。
2185 .TP 
2186 \fI/proc/sys/sunrpc\fP
2187 このディレクトリはネットワークファイルシステム (NFS) への Sun remote procedure call (遠隔手続き呼び出し)
2188 をサポートする。 これが存在しないシステムもある。
2189 .TP 
2190 \fI/proc/sys/vm\fP
2191 このディレクトリにはメモリ管理の調整、バッファやキャッシュ管理のための ファイルがある。
2192 .TP 
2193 \fI/proc/sys/vm/drop_caches\fP (Linux 2.6.16 以降)
2194 このファイルに書き込みを行うことで、クリーンなキャッシュ、dentry、 inode をメモリ上から外し、そのメモリを解放する。
2195
2196 ページキャッシュを解放するには、 \fIecho 1 > /proc/sys/vm/drop_caches\fP とする。 dentry、inode
2197 を解放するには、 \fIecho 2 > /proc/sys/vm/drop_caches\fP とする。ページキャッシュ、dentry、inode
2198 を解放するには、 \fIecho 3 > /proc/sys/vm/drop_caches\fP とする。
2199
2200 この操作は非破壊的な操作で、ダーティな (dirty) オブジェクトは 解放されないので、この操作を行う際は最初に \fBsync\fP(8)
2201 を実行しておくべきである。
2202 .TP 
2203 \fI/proc/sys/vm/legacy_va_layout\fP (Linux 2.6.9 以降)
2204 .\" The following is from Documentation/filesystems/proc.txt
2205 0 以外の場合、新しい 32ビットメモリマッピング配置が無効になり、 カーネルは全てのプロセスに対して従来の (カーネル 2.4 の) 配置方法を
2206 使用する。
2207 .TP 
2208 \fI/proc/sys/vm/memory_failure_early_kill\fP (Linux 2.6.32 以降)
2209 .\" The following is based on the text in Documentation/sysctl/vm.txt
2210 このファイルは、カーネルが処理できない訂正不能なメモリエラー (通常はメモリモジュールでの 2 ビットエラー)
2211 がバックグラウンドでハードウェアにより検出された際に、プロセスをどのように kill するかを制御する。
2212 (ページの有効なコピーがディスク上にも存在するなど)
2213 いくつかの場面では、カーネルはアプリケーションに影響を与えずに透過的に故障を処理する。しかし、データの最新のコピーが他にはない場合には、データ破壊が波及するのを防ぐため、カーネルはプロセスを
2214 kill する。
2215
2216 このファイルは以下のいずれかの値を持つ。
2217 .RS
2218 .IP 1: 4
2219 データ破壊が検出されるとすぐに、故障が検出され復元できないページ (corrupted\-and\-not\-reloadable page)
2220 をマップしている全てのプロセスを kill する。この機能は、(カーネル内部で割り当てられたデータやスワップのキャッシュなど)
2221 少数のいくつかのタイプのページではサポートされていないが、大半のユーザページではこの機能は働く。
2222 .IP 0: 4
2223 データ破壊が検出されたページの全てのプロセスからの unmap のみを行い、そのページにアクセスしようとしたプロセスのみを kill する。
2224 .RE
2225 .IP
2226 この kill は \fIsi_code\fP に \fBBUS_MCEERR_AO\fP を設定した \fBSIGBUS\fP
2227 シグナルを使って行われる。プロセス側では必要であればこのシグナルを処理することができる。詳細は \fBsigaction\fP(2) を参照。
2228
2229 この機能は、高度なマシンチェック機構を持ったアーキテクチャ/プラットフォームにおいてのみ有効であり、ハードウェア機能にも依存している。
2230
2231 アプリケーションは \fBprctl\fP(2) の \fBPR_MCE_KILL\fP 操作を使って個別に
2232 \fImemory_failure_early_kill\fP の設定を上書きすることができる。
2233 .IP
2234 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
2235 存在する。
2236 .TP 
2237 \fI/proc/sys/vm/memory_failure_recovery\fP (Linux 2.6.32 以降)
2238 .\" The following is based on the text in Documentation/sysctl/vm.txt
2239 メモリ故障回復 (memory failure recovery) を有効にする
2240  (プラットフォームがサポートしている場合)
2241 .RS
2242 .IP 1: 4
2243 回復を試みる。
2244 .IP 0: 4
2245 メモリ故障時には常に panic を起こす。
2246 .RE
2247 .IP
2248 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
2249 存在する。
2250 .TP 
2251 \fI/proc/sys/vm/oom_dump_tasks\fP (Linux 2.6.25 以降)
2252 .\" The following is from Documentation/sysctl/vm.txt
2253 カーネルが OOM\-killing を実行する際に、システム全体のタスク・ダンプ (カーネルスレッドを除く) を生成するかを制御する。
2254 ダンプには、タスク (スレッド、プロセス) 毎に以下の情報が出力される: スレッド ID、実ユーザ ID、スレッドグループ ID (プロセス ID)、
2255 仮想メモリサイズ、Resident Set Size (実メモリ上に存在するページサイズ)、 タスクがスケジューリングされた CPU、 oom_adj
2256 スコア (\fI/proc/[pid]/oom_adj\fP の説明を参照)、コマンド名。 このダンプ情報は、なぜ OOM\-killer
2257 が起動されたかを知り、 その原因となったならず者のタスクを特定するのに役に立つ。
2258
2259 このファイルの内容が値 0 の場合、ダンプ情報の出力は行われない。 タスクが何千もある非常に巨大なシステムでは、
2260 各々のタスクについてメモリ状態をダンプするのは適切でないかもしれない。 そのようなシステムでは、ダンプ情報が必要でもないときに メモリ不足 (OOM)
2261 の状況で性能面の不利益が起こらないようにすべきだろう。
2262
2263 このファイルの内容が 0 以外の場合、 OOM\-killer が実際にメモリを占有したタスクを kill する度に ダンプ情報が出力される。
2264
2265 デフォルト値は 0 である。
2266 .TP 
2267 \fI/proc/sys/vm/oom_kill_allocating_task\fP (Linux 2.6.24 以降)
2268 .\" The following is from Documentation/sysctl/vm.txt
2269 このファイルは、メモリ不足 (OOM) の状況が起こった際に、 メモリ不足のきっかけとなったタスクを kill するかどうかを制御する。
2270
2271 このファイルが 0 に設定された場合、 OOM\-killer はタスクリスト全体をスキャンし、経験則に基づき kill するタスクを選択する。
2272 通常は、kill した場合に多くのメモリが解放できる、 ならず者のメモリ占有タスクが選択される。
2273
2274 このファイルが 0 以外に設定された場合、 OOM\-killer はメモリ不足の状況が発生するきっかけとなったタスクを 単純に kill
2275 するだけである。 これにより、たいていは重い処理となるタスクリストのスキャンを回避できる。
2276
2277 \fI/proc/sys/vm/panic_on_oom\fP が 0 以外の場合、
2278 \fI/proc/sys/vm/oom_kill_allocating_task\fP にどのような値が入っていたとしても、
2279 \fI/proc/sys/vm/panic_on_oom\fP の方が優先される。
2280
2281 デフォルト値は 0 である。
2282 .TP 
2283 \fI/proc/sys/vm/overcommit_memory\fP
2284 このファイルにはカーネル仮想メモリのアカウントモードが書かれている。 値は以下の通り:
2285 .RS
2286 .IP
2287 0: 発見的なオーバーコミット (heuristic overcommit) (これがデフォルトである)
2288 .br
2289 1: 常にオーバーコミットし、チェックしない。
2290 .br
2291 2: 常にチェックし、オーバーコミットしない。
2292 .RE
2293 .IP
2294 モード 0 では、 \fBMAP_NORESERVE\fP を設定して呼び出された \fBmmap\fP(2)  はチェックされない。
2295 またデフォルトのチェックはとても脆弱で、 プロセスを "OOM\-kill" してしまうリスクを引き起こす。 Linux 2.4 では 0
2296 以外の値はモード 1 を意味する。 (Linux 2.6 以降で利用可能な) モード 2 では、 システム上の仮想アドレス空間の合計が (SS +
2297 RAM*(r/100)) に制限されている。 ここで、SS はスワップ空間のサイズ、 RAM は物理メモリのサイズ、r はファイル
2298 \fI/proc/sys/vm/overcommit_ratio\fP の内容である。
2299 .TP 
2300 \fI/proc/sys/vm/overcommit_ratio\fP
2301 \fI/proc/sys/vm/overcommit_memory\fP の説明を参照すること。
2302 .TP 
2303 \fI/proc/sys/vm/panic_on_oom\fP (Linux 2.6.18 以降)
2304 .\" The following is adapted from Documentation/sysctl/vm.txt
2305 このファイルは、メモリ不足時にカーネルパニックを 起こすか起こさないかを制御する。
2306
2307 このファイルに値 0 を設定すると、 カーネルの OOM\-killer がならず者のプロセスを kill する。 普通は、OOM\-killer
2308 がならず者のプロセスを kill することができ、 システムは何とか動き続けることができる。
2309
2310 このファイルに値 1 を設定すると、 メモリ不足の状況が発生すると、カーネルは普通はパニックする。 しかしながら、プロセスが メモリポリシー
2311 (\fBmbind\fP(2)  の \fBMPOL_BIND\fP)  や cpusets (\fBcpuset\fP(7))
2312 を使って特定のノードへのメモリ割り当てを制限していて、 それらのノードでメモリ枯渇状態に至った場合は、 一つのプロセスが OOM\-killer により
2313 kill されるだけかもしれない。 この場合には、カーネルパニックは発生しない。 なぜなら、他のノードのメモリには空きがあるかもしれず、
2314 したがって、システム全体としてはメモリ不足の状況にまだ達していないかも しれないからである。
2315
2316 このファイルに値 2 を設定すると、 メモリ不足の状況が発生するとカーネルは常にパニックを起こす。
2317
2318 デフォルト値は 0 である。 1 と 2 はクラスタリングのフェイルオーバー用である。 フェイルオーバーの方針に応じてどちらかの値を選択すること。
2319 .TP 
2320 \fI/proc/sys/vm/swappiness\fP
2321 .\" The following is from Documentation/sysctl/vm.txt
2322 このファイルの値により、カーネルがどの程度激しくメモリページの スワップを行う
2323 かが制御される。 大きな値ほどスワップが激しくなり、小さい値ほど激しくなくなる。
2324 デフォルト値は 60 である。
2325 .TP 
2326 \fI/proc/sysrq\-trigger\fP (Linux 2.4.21 以降)
2327 このファイルに文字 character を書き込むと、 キーボードから ALT\-SysRq\-<character> を入力した場合と
2328 同じ SysRq 関数が起動される (\fI/proc/sys/kernel/sysrq\fP の説明を参照)。 通常、このファイルへ書き込みができるのは
2329 \fIroot\fP だけである。詳細については、Linux カーネルソースファイルの \fIDocumentation/sysrq.txt\fP を参照のこと。
2330 .TP 
2331 \fI/proc/sysvipc\fP
2332 疑似ファイル \fImsg\fP, \fIsem\fP, \fIshm\fP を含むサブディレクトリ。 これらのファイルは、現在システム上に存在する System V
2333 プロセス間通信 (Interprocess Communication, IPC) オブジェクト (それぞれ: メッセージキュー、セマフォ、共有メモリ)
2334 のリストであり、 \fBipcs\fP(1)  で取得できる情報と同じものを提供する。 これらのファイルにはヘッダがあり、理解しやすいように (1 行につき
2335 1 個の IPC オブジェクトの形式で) フォーマットされている。 \fBsvipc\fP(7)
2336 にはこれらのファイルから分かる情報の詳細な背景が書かれている。
2337 .TP 
2338 \fI/proc/tty\fP
2339 疑似ファイルを含むサブディレクトリ。 tty ドライバとライン設定 (line discipline) の書かれた サブディレクトリも含まれる。
2340 .TP 
2341 \fI/proc/uptime\fP
2342 このファイルは システム起動時から経過した時間 (秒) と アイドル (idle) しているプロセスが消費した時間 (秒) の 2 つの数を含む。
2343 .TP 
2344 \fI/proc/version\fP
2345 現在稼働しているカーネルのバージョン識別子である文字列。 これには \fI/proc/sys/ostype\fP,
2346 \fI/proc/sys/osrelease\fP, \fI/proc/sys/version\fP の内容が含まれる。 たとえばこのように:
2347 .nf
2348 .in -2
2349 \f(CWLinux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994\fP
2350 .in +2
2351 .fi
2352 .\" FIXME Document /proc/timer_list
2353 .\" .TP
2354 .\" .IR /proc/timer_list " (since Linux 2.6.21)"
2355 .\" See the 2.6.21 Change log
2356 .\" FIXME Document /proc/timer_stats
2357 .\" .TP
2358 .\" .IR /proc/timer_stats " (since Linux 2.6.21)"
2359 .\" See the 2.6.21 Change log
2360 .TP 
2361 \fI/proc/vmstat\fP (Linux 2.6 以降)
2362 このファイルは仮想メモリの様々な統計情報を表示する。
2363 .TP 
2364 \fI/proc/zoneinfo\fP (Linux 2.6.13 以降)
2365 .\" FIXME more should be said about /proc/zoneinfo
2366 このファイルはメモリのゾーン (memory zone) に関する情報を表示する。 仮想メモリの振舞いを分析するのに役立つ。
2367 .SH 注意
2368 ほとんどの文字列 (たとえば環境変数やコマンド行) は内部表現のままなので、
2369 各フィールドは NULL バイト (\(aq\e0\(aq) で区切られている。だから、
2370 \fIod \-c\fP や \fItr "\e000" "\en"\fP を使えば、それらはより読みやすくなる。
2371 また \fIecho \`cat <file>\`\fP でもよい。
2372
2373 .\" .SH ACKNOWLEDGEMENTS
2374 .\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
2375 .\" kernel source documentation files written by Rik van Riel.
2376 このマニュアルは不完全であり、たぶん不正確で、しばしば更新される必要がある。
2377 .SH 関連項目
2378 \fBcat\fP(1), \fBdmesg\fP(1), \fBfind\fP(1), \fBfree\fP(1), \fBps\fP(1), \fBtr\fP(1),
2379 \fBuptime\fP(1), \fBchroot\fP(2), \fBmmap\fP(2), \fBreadlink\fP(2), \fBsyslog\fP(2),
2380 \fBslabinfo\fP(5), \fBhier\fP(7), \fBtime\fP(7), \fBarp\fP(8), \fBhdparm\fP(8),
2381 \fBifconfig\fP(8), \fBinit\fP(8), \fBlsmod\fP(8), \fBlspci\fP(8), \fBmount\fP(8),
2382 \fBnetstat\fP(8), \fBprocinfo\fP(8), \fBroute\fP(8), \fBsysctl\fP(8)
2383
2384 Linux カーネルのソースファイル: \fIDocumentation/filesystems/proc.txt\fP,
2385 \fIDocumentation/sysctl/vm.txt\fP
2386 .SH この文書について
2387 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
2388 である。プロジェクトの説明とバグ報告に関する情報は
2389 http://www.kernel.org/doc/man\-pages/ に書かれている。