OSDN Git Service

be829b2cfc46cdf38fc8150b05082fe2b0d3c9c7
[linuxjm/LDP_man-pages.git] / draft / 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 . cross check against Documentation/filesystems/proc.txt
52 .\" to see what information could be imported from that file
53 .\" into this file.
54 .\"
55 .\"*******************************************************************
56 .\"
57 .\" This file was generated with po4a. Translate the source file.
58 .\"
59 .\"*******************************************************************
60 .\"
61 .\" Japanese Version Copyright (c) 1998,1999 Hiroaki Nagoya,
62 .\"     Copyright (c) 2001-2005 Yuichi SATO,
63 .\"     and Copyright (c) 2005-2013 Akihiro MOTOKI
64 .\"         all rights reserved.
65 .\" Translated 1998-07-09, Hiroaki Nagoya <nagoya@cc.hit-u.ac.jp>
66 .\" Proofreaded 1998-07-24, Hiroaki Nagoya <nagoya@cc.hit-u.ac.jp> ,
67 .\"                         Nakano Takeo <nakano@apm.seikei.ac.jp> and
68 .\"                         Shinya Hanataka <hanataka@abyss.rim.or.jp>.
69 .\" Matched with man-pages-1.22 1999-01-21, Hiroaki Nagoya
70 .\" Updated 1999-12-04, Kentaro Shirakata <argrath@yo.rim.or.jp>
71 .\" Updated 2001-04-24, Yuichi SATO <ysato444@yahoo.co.jp>
72 .\" Updated 2002-01-14, Yuichi SATO
73 .\" Updated 2002-11-04, Yuichi SATO
74 .\" Updated 2003-03-01, Yuichi SATO
75 .\" Updated 2003-10-18, Yuichi SATO
76 .\" Updated 2003-11-27, Yuichi SATO
77 .\" Updated 2005-01-22, Yuichi SATO
78 .\" Updated 2005-09-14, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
79 .\" Updated 2005-11-19, Akihiro MOTOKI, LDP v2.14
80 .\" Updated 2006-01-18, Akihiro MOTOKI, LDP v2.21
81 .\" Updated 2006-02-15, Akihiro MOTOKI, LDP v2.23
82 .\" Updated 2006-03-05, Akihiro MOTOKI, LDP v2.25
83 .\" Updated 2006-04-15, Akihiro MOTOKI, LDP v2.29
84 .\" Updated 2007-01-05, Akihiro MOTOKI, LDP v2.43
85 .\" Updated 2007-07-04, Akihiro MOTOKI, LDP v2.58
86 .\" Updated 2007-09-03, Akihiro MOTOKI, LDP v2.64
87 .\" Updated 2007-10-11, Akihiro MOTOKI, LDP v2.65
88 .\" Updated 2008-02-06, Akihiro MOTOKI, LDP v2.76
89 .\" Updated 2008-09-21, Akihiro MOTOKI, LDP v3.09
90 .\" Updated 2009-03-03, Akihiro MOTOKI, LDP v3.19
91 .\" Updated 2009-03-13, Akihiro MOTOKI, LDP v3.20
92 .\" Updated 2012-06-04, Akihiro MOTOKI <amotoki@gmail.com>
93 .\" Updated 2013-05-01, Akihiro MOTOKI
94 .\" Updated 2013-05-04, Akihiro MOTOKI
95 .\" Updated 2013-07-24, Akihiro MOTOKI
96 .\" Updated 2013-08-16, Akihiro MOTOKI
97 .\" Updated 2013-08-30, Akihiro MOTOKI, LDP v3.53
98 .\"
99 .TH PROC 5 2014\-12\-31 Linux "Linux Programmer's Manual"
100 .SH 名前
101 proc \- プロセスの情報を含む擬似ファイルシステム
102 .SH 説明
103 \fIproc\fP ファイルシステムは擬似的なファイルシステムであり、 カーネル内のデータへのインターフェースとして使用される。 一般的には
104 \fI/proc\fP にマウントされる。 大部分のファイルは読み出し専用 (read\-only) であるが、 いくつかのファイルは書き込み可能であり、
105 そのファイルに書き込めばカーネルの内部変数を変更できる。
106 .LP
107 以下のリストでは \fI/proc\fP 階層以下のファイルやディレクトリの多くについて説明している。
108 .PD 1
109 .TP 
110 \fI/proc/[pid]\fP
111 .\" FIXME Describe /proc/[pid]/attr and
112 .\"     /proc/[pid]/task/[tid]/attr
113 .\"     This is a directory
114 .\"     Added in 2.6.0
115 .\"     CONFIG_SECURITY
116 .\"     https://lwn.net/Articles/28222/
117 .\"     http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml
118 .\"
119 .\"     fscreate, current, prev, and exec present in Linux 2.6.0
120 .\"     keycreate added in Linux 2.6.18
121 .\"             commit 4eb582cf1fbd7b9e5f466e3718a59c957e75254e
122 .\"             /Documentation/keys.txt
123 .\"     sockcreate added in Linux 2.6.18
124 .\"             commit 42c3e03ef6b298813557cdb997bd6db619cd65a2
125 .\"
126 .\" FIXME Describe /proc/[pid]/autogroup
127 .\"     2.6.38
128 .\"     commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
129 .\"     CONFIG_SCHED_AUTOGROUP
130 .\"
131 実行中のプロセスについてのサブディレクトリ。 サブディレクトリ名は (そのプロセスの) プロセス ID である。
132 各サブディレクトリは、以下の擬似ファイルとディレクトリを含む。
133 .TP 
134 \fI/proc/[number]/auxv\fP (カーネル 2.6.0\-test7 以降)
135 実行時にプロセスに渡された ELF インタプリタ情報が格納されている。 個々のエントリは、\fIunsigned long\fP 型の ID 1 個に
136 \fIunsigned long\fP 型の値 1 個が続くフォーマットである。 最後のエントリには 0 が 2 個入っている。
137 \fBgetauxval\fP(3) も参照。
138 .TP 
139 \fI/proc/[pid]/cgroup\fP (Linux 2.6.24 以降)
140 .\"       Info in Documentation/cgroups/cgroups.txt
141 このファイルは、プロセスやタスクが所属するコントロールグループを示す。
142 cgroup の各階層についてエントリーが 1 つあり、
143 各エントリーは以下の形式のコロン区切りのフィールドで構成される。
144 .nf
145
146 \f(CW    5:cpuacct,cpu,cpuset:/daemons\fP
147 .fi
148 .IP
149 コロン区切りの各フィールドは、左から右の順で、以下の意味を持つ。
150 .RS 11
151 .IP 1. 3
152 階層 ID 番号
153 .IP 2.
154 その階層に関連付けたサブシステムの集合
155 .IP 3.
156 プロセスが所属する階層内のコントロールグループ
157 .RE
158 .IP
159 このファイルが存在するのは、カーネルのコンフィギュレーション・オプショ
160 ン \fBCONFIG_CGROUPS\fP を有効にした場合だけである。
161 .TP 
162 \fI/proc/[pid]/clear_refs\fP (Linux 2.6.22 以降)
163
164 .\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22)
165 .\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32)
166 .\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11)
167 .\"
168 .\"       "Clears page referenced bits shown in smaps output"
169 .\"       write-only, writable only by the owner of the process
170 このファイルは書き込み専用ファイルで、書き込めるのはプロセスの所有者だけである。
171
172 このファイルには以下の値を書き込むことができる。
173 .RS
174 .TP 
175 1 (Linux 2.6.22 以降)
176 .\" Internally: CLEAR_REFS_ALL
177 Reset the PG_Referenced and ACCESSED/YOUNG bits for all the pages associated
178 with the process.  (Before kernel 2.6.32, writing any nonzero value to this
179 file had this effect.)
180 .TP 
181 2 (Linux 2.6.32 以降)
182 .\" Internally: CLEAR_REFS_ANON
183 Reset the PG_Referenced and ACCESSED/YOUNG bits for all anonymous pages
184 associated with the process.
185 .TP 
186 3 (Linux 2.6.32 以降)
187 .\" Internally: CLEAR_REFS_MAPPED
188 Reset the PG_Referenced and ACCESSED/YOUNG bits for all file\-mapped pages
189 associated with the process.
190 .RE
191 .IP
192 Clearing the PG_Referenced and ACCESSED/YOUNG bits provides a method to
193 measure approximately how much memory a process is using.  One first
194 inspects the values in the "Referenced" fields for the VMAs shown in
195 \fI/proc/[pid]/smaps\fP to get an idea of the memory footprint of the process.
196 One then clears the PG_Referenced and ACCESSED/YOUNG bits and, after some
197 measured time interval, once again inspects the values in the "Referenced"
198 fields to get an idea of the change in memory footprint of the process
199 during the measured interval.  If one is interested only in inspecting the
200 selected mapping types, then the value 2 or 3 can be used instead of 1.
201
202 A further value can be written to affect a different bit:
203 .RS
204 .TP 
205 4 (Linux 3.11 以降)
206 .\" Internally: CLEAR_REFS_SOFT_DIRTY
207 Clear the soft\-dirty bit for all the pages associated with the process.
208 This is used (in conjunction with \fI/proc/[pid]/pagemap\fP)  by the
209 check\-point restore system to discover which pages of a process have been
210 dirtied since the file \fI/proc/[pid]/clear_refs\fP was written to.
211 .RE
212 .IP
213 Writing any value to \fI/proc/[pid]/clear_refs\fP other than those listed above
214 has no effect.
215
216 \fI/proc/[pid]/clear_refs\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
217 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
218 .TP 
219 \fI/proc/[pid]/cmdline\fP
220 .\" In 2.3.26, this also used to be true if the process was swapped out.
221 この読み出し専用のファイルはプロセスの完全なコマンド行を保持する。 ただし、そのプロセスがゾンビプロセスの場合は、 このファイルは空となる。 つまり、
222 このファイルを読み出しても一文字も返らない。 このファイルではコマンドライン引き数が、 ヌルバイト (\(aq\e0\(aq)
223 で区切られた文字列として書かれており、 最後の文字列の後にヌルバイトが一つ置かれる。
224 .TP 
225 \fI/proc/[pid]/comm\fP (Linux 2.6.33 以降)
226 .\" commit 4614a696bd1c3a9af3a08f0e5874830a85b889d4
227 This file exposes the process's \fIcomm\fP value\(emthat is, the command name
228 associated with the process.  Different threads in the same process may have
229 different \fIcomm\fP values, accessible via \fI/proc/[pid]/task/[tid]/comm\fP.  A
230 thread may modify its \fIcomm\fP value, or that of any of other thread in the
231 same thread group (see the discussion of \fBCLONE_THREAD\fP in \fBclone\fP(2)), by
232 writing to the file \fI/proc/self/task/[tid]/comm\fP.  Strings longer than
233 \fBTASK_COMM_LEN\fP (16) characters are silently truncated.
234
235 This file provides a superset of the \fBprctl\fP(2)  \fBPR_SET_NAME\fP and
236 \fBPR_GET_NAME\fP operations, and is employed by \fBpthread_setname_np\fP(3)  when
237 used to rename threads other than the caller.
238 .TP 
239 \fI/proc/[pid]/coredump_filter\fP (Linux 2.6.23 以降)
240 \fBcore\fP(5)  参照。
241 .TP 
242 \fI/proc/[pid]/cpuset\fP (Linux 2.6.12 以降)
243 .\" and/proc/[pid]/task/[tid]/cpuset
244 \fBcpuset\fP(7)  参照。
245 .TP 
246 \fI/proc/[pid]/cwd\fP
247 プロセスのカレントワーキングディレクトリへのシンボリックリンク。 例えば、プロセス 20 のカレントワーキングディレクトリを見つけるためには、
248 次のようにすればよい。
249
250 .in +4n
251 .nf
252 $\fB cd /proc/20/cwd; /bin/pwd\fP
253 .fi
254 .in
255
256 \fIpwd\fP コマンドはシェルの内部コマンドのことがよくあり、
257 うまく動作しないかもしれない。
258 \fBbash\fP(1) では \fIpwd\ \-P\fP を使ってもよい。
259
260 .\" The following was still true as at kernel 2.6.13
261 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
262 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
263 .TP 
264 \fI/proc/[pid]/environ\fP
265 このファイルはプロセスの環境変数を含んでいる。 各エントリはヌルバイト (\(aq\e0\(aq) で区切られていて、
266 末尾にヌルバイトがあるかもしれない。 したがって、プロセス 1 の環境変数を表示するためには 次のようにすればよい。
267 .in +4n
268 .nf
269
270 $\fB strings /proc/1/environ\fP
271 .fi
272 .in
273 .TP 
274 \fI/proc/[pid]/exe\fP
275 .\" The following was still true as at kernel 2.6.13
276 Linux 2.2 以降では、このファイルはシンボリックリンクで、 実行可能コマンドの実際のパス名を格納している。
277 このシンボリックリンクは通常のように辿ることができる; これをオープンすると実行可能ファイルがオープンされる。 (コマンドラインで)
278 \fI/proc/[pid]/exe\fP と入力すると、プロセス番号 [pid] で実行されている 実行可能ファイルをもう一つ実行することができる。
279 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
280 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
281
282 Linux 2.0 以前では、 \fI/proc/[pid]/exe\fP は実行されたバイナリへのポインタで、シンボリックリンクのように見える。 Linux
283 2.0 以前では、このファイルに対して \fBreadlink\fP(2)  を実行すると、次のフォーマットの文字列が返る。
284
285     [デバイス番号]:iノード番号
286
287 たとえば、[0301]:1502 はメジャーデバイス番号 03 (IDE, MFM などのドライブ)  マイナーデバイス番号 01
288 (最初のドライブの最初のパーティション) の デバイス上の iノード番号 1502 である。
289
290 \fI\-inum\fP オプションをつけて \fBfind\fP(1) を使うと、
291 このファイルの所在を探すことができる。
292 .TP 
293 \fI/proc/[pid]/fd/\fP
294 プロセスがオープンしたファイル各々に対するエントリを含むサブディレクトリ。 ファイルディスクリプタがファイル名で、
295 実際のファイルへのシンボリックリンクになっている。 したがって 0 は標準入力、1 は標準出力、2 は標準エラー出力、などとなる。
296
297 パイプやソケットのファイルディスクリプタでは、 エントリーはファイル種別が inode という内容を持つシンボリックリンクとなる。 このファイルに対して
298 \fBreadlink\fP(2) を呼び出すと以下の形式の文字列が返る。
299
300     type:[inode]
301
302 例えば、 \fIsocket:[2248868]\fP は inode が 2248868 のソケットである。 ソケットの場合、 その inode を元に
303 \fI/proc/net/\fP 以下のファイルを参照し詳しい情報を得ることができる。
304
305 対応する inode がないファイルディスクリプタ (例えば \fBepoll_create\fP(2), \fBeventfd\fP(2),
306 \fBinotify_init\fP(2), \fBsignalfd\fP(2), \fBtimerfd\fP(2) により生成されたファイルディスクリプタ) では、
307 エントリーはその内容が以下の形式のシンボリックリンクとなる。
308
309     anon_inode:<file\-type>
310
311 \fIfile\-type\fP は角括弧で囲まれる場合がある。
312
313 例えば、 epoll ファイルディスクリプタは、 内容が文字列 \fIanon_inode:[eventpoll]\fP
314 のシンボリックリンクを持つ場合がある。
315
316 .\"The following was still true as at kernel 2.6.13
317 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このディレクトリの内容は参照できない (スレッドの終了は通常
318 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
319
320 コマンドライン引き数としてファイル名を受け取るが、引き数が 渡されなかった場合
321 に標準入力から入力を受け取らないようなプログラムや、 コマンドライン引き数とし
322 て書き込みファイルを受け取るが、引き数が 渡されなかった場合に標準出力に出力を
323 行わないようなプログラムであっても、 \fI/proc/[pid]/fd\fP を使うことで標準入力や
324 標準出力を使用できるようになる。 例えば、 \fI\-i\fP を入力ファイルを指定するフラ
325 グ、 \fI\-o\fP を出力ファイルを指定するフラグと仮定すると、
326 .in +4n
327 .nf
328
329 $\fB foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ...\fP
330 .fi
331 .in
332
333 .\" The following is not true in my tests (MTK):
334 .\" Note that this will not work for
335 .\" programs that seek on their files, as the files in the fd directory
336 .\" are not seekable.
337 を実行することにより、フィルタとして動作させることができる。
338
339 \fI/proc/self/fd/N\fP は、ある種の UNIX や UNIX 風のシステムにある \fI/dev/fd/N\fP
340 とだいたい同じである。 事実 Linux のたいていの MAKEDEV スクリプトは、
341 \fI/dev/fd\fP を \fI/proc/self/fd\fP へのシンボリックリンクにしている。
342
343 ほとんどのシステムでは、シンボリックリンク \fI/dev/stdin\fP, \fI/dev/stdout\fP, \fI/dev/stderr\fP
344 が提供されており、それぞれ \fI/proc/self/fd\fP 内のファイル \fI0\fP, \fI1\fP, \fI2\fP にリンクされている。
345 したがって、上述のサンプルコマンドは次のようにも書くことができる。
346 .in +4n
347 .nf
348
349 $\fB foobar \-i /dev/stdin \-o /dev/stdout ...\fP
350 .fi
351 .in
352 .\" FIXME Describe /proc/[pid]/loginuid
353 .\"       Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
354 .\"       CONFIG_AUDITSYSCALL
355 .TP 
356 \fI/proc/[pid]/fdinfo/\fP (Linux 2.6.22 以降)
357 このサブディレクトリには、そのプロセスがオープンしているファイル毎の エントリが入っており、ファイルディスクリプタがファイル名となっている。
358 各ファイルの内容を読み出すことで、対応するファイルディスクリプタに関する 情報を得ることができる。以下に例を示す。
359 .in +4n
360 .nf
361
362 $\fB cat /proc/12015/fdinfo/4\fP
363 pos:    1000
364 flags:  01002002
365 .fi
366 .in
367
368 \fIpos\fP フィールドは 10 進数で、現在のファイルオフセットを示す。 \fIflags\fP フィールドは 8 進数で、
369 ファイルのアクセスモードとファイル状態フラグを示す (\fBopen\fP(2)  参照)。
370
371 .\" FIXME
372 .\" Certain file types include additional info; see
373 .\" Documentation/filesystems/proc.txt
374 .\"
375 .\" Especially interesting is this:
376 .\"
377 .\"     commit ab49bdecc3ebb46ab661f5f05d5c5ea9606406c6
378 .\"     Author: Cyrill Gorcunov <gorcunov@openvz.org>
379 .\"     Date:   Mon Dec 17 16:05:06 2012 -0800
380 .\"
381 .\" Basically, the /proc/PID/fdinfo/ entry for an inotify FD
382 .\" includes the file handles for all watched FDs
383 .\"
384 このディレクトリのファイルは、プロセスの所有者だけが読み出すことができる。
385 .TP 
386 \fI/proc/[pid]/io\fP (kernel 2.6.20 以降)
387 .\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2
388 このファイルは、 プロセスの I/O 統計情報を表示する。 以下に例を挙げる。
389 .in +4n
390 .nf
391
392 #\fB cat /proc/3828/io\fP
393 rchar: 323934931
394 wchar: 323929600
395 syscr: 632687
396 syscw: 632675
397 read_bytes: 0
398 write_bytes: 323932160
399 cancelled_write_bytes: 0
400 .fi
401 .in
402
403 フィールドの詳細は以下の通りである。
404 .RS
405 .TP 
406 \fIrchar\fP: 読み出し文字数
407 このタスクがきっかけでストレージから読み出されたバイト数。 この値は、単純に \fBread\fP(2)
408 や同様のシステムコールからこのプロセスに渡されたバイト数の合計である。 この値には、 端末入出力なども含まれ、 実際に物理ディスク I/O
409 が必要であったか (読み出しがページキャッシュからの読み出しで十分であったか) どうかは関係ない。
410 .TP 
411 \fIwchar\fP: 書き込み文字数
412 このタスクがきっかけで行われたか行われるはずのディスクへの書き込みバイト数。 \fIrchar\fP と同じ注意があてはまる。
413 .TP 
414 \fIsyscr\fP: 読み出しシステムコール数
415 読み出し I/O 操作\(em\fBread\fP(2) や \fBpread\fP(29 などのシステムコール\(emを試みた回数。
416 .TP 
417 \fIsyscw\fP: 書き込みシステムコール数
418 書き込み I/O 操作\(em\fBwrite\fP(2) や \fBpwrite\fP(29 などのシステムコール\(emを試みた回数。
419 .TP 
420 \fIread_bytes\fP: 読み出しバイト数
421 このプロセスが実際にストレージ層から取得しようとしたバイト数。 ブロックデバイス上のファイルシステムでは正確な値となる。
422 .TP 
423 \fIwrite_bytes\fP: 書き込みバイト数
424 このプロセスが実際にストレージ層に転送しようとしたバイト数。
425 .TP 
426 \fIcancelled_write_bytes\fP:
427 The big inaccuracy here is truncate.  If a process writes 1MB to a file and
428 then deletes the file, it will in fact perform no writeout.  But it will
429 have been accounted as having caused 1MB of write.  In other words: this
430 field represents the number of bytes which this process caused to not
431 happen, by truncating pagecache.  A task can cause "negative" I/O too.  If
432 this task truncates some dirty pagecache, some I/O which another task has
433 been accounted for (in its \fIwrite_bytes\fP)  will not be happening.
434 .RE
435 .IP
436 \fI注意\fP: 現在の実装では 32 ビットシステムでは少しいやらしい点がある。 プロセス B が 64
437 ビットカウンターの一つを更新している途中に、プロセス A がプロセス B の \fI/proc/[pid]/io\fP を読んだ場合、 プロセス A
438 に更新中の結果が見えることがある。
439 .TP 
440 \fI/proc/[pid]/gid_map\fP (Linux 3.5 以降)
441 \fI/proc/[pid]/uid_map\fP の説明を参照すること。
442
443 .TP 
444 \fI/proc/[pid]/limits\fP (Linux 2.6.24 以降)
445 .\" commit 3036e7b490bf7878c6dae952eec5fb87b1106589
446 このファイルは、そのプロセスの各リソース制限について、 ソフト・リミット、ハード・リミット、計測単位を表示する (\fBgetrlimit\fP(2)
447 参照)。 Linux 2.6.35 以前では、 プロセスの実 UID を持つプロセスだけが、 このファイルを読み出すことができる。 Linux
448 2.6.36 以降では、 システム上のすべてのユーザがこのファイルを読み出すことができる。
449 .TP 
450 \fI/proc/[pid]/map_files/\fP (kernel 3.3 以降)
451 .\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e
452 このサブディレクトリには、 メモリマップされたファイルに対応するエントリーが置かれる (\fBmmap\fP(2) 参照)。 エントリーの名前がメモリ領域の
453 (16 進数表現の) 開始アドレスと終了アドレスの組で、 エントリーはマップされているファイルへのシンボリックリンクである。 以下に例を示す。 なお、
454 出力は幅が 80 文字のディスプレイに合うように折り返して整形されている。
455 .in +4n
456 .nf
457
458 $\fB ls \-l /proc/self/map_files/\fP
459 lr\-\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:31
460             3252e00000\-3252e20000 \-> /usr/lib64/ld\-2.15.so
461 \&...
462 .fi
463 .in
464
465 これらのエントリーが存在するのは \fBMAP_FILE\fP フラグでマッピングされたメモリ領域についてであるが、 Linux での無名の共有メモリ
466 (\fBMAP_ANON | MAP_SHARED\fP で作成された領域) の実装方法では、
467 このディレクトリに無名の共有メモリに関するエントリーも存在する。 以下は、 マッピング元のファイルが削除された \fI/dev/zero\fP
468 ファイルでの例である。
469 .in +4n
470 .nf
471
472
473 lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
474             7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted)
475 .fi
476 .in
477
478 このディレクトリが存在するのは、 カーネルのコンフィギュレーション・オプション \fBCONFIG_CHECKPOINT_RESTORE\fP
479 が有効になっている場合だけである。
480 .TP 
481 \fI/proc/[pid]/maps\fP
482 現在マッピングされているメモリ領域とそのアクセスパーミッションを含む。 メモリマッピングについての詳しい情報は \fBmmap\fP(2) を参照。
483
484 ファイルのフォーマットは以下のとおり:
485
486 .in -7n
487 .nf
488 \fIaddress           perms offset  dev   inode       pathname\fP
489 00400000\-00452000 r\-xp 00000000 08:02 173521      /usr/bin/dbus\-daemon
490 00651000\-00652000 r\-\-p 00051000 08:02 173521      /usr/bin/dbus\-daemon
491 00652000\-00655000 rw\-p 00052000 08:02 173521      /usr/bin/dbus\-daemon
492 00e03000\-00e24000 rw\-p 00000000 00:00 0           [heap]
493 00e24000\-011f7000 rw\-p 00000000 00:00 0           [heap]
494 \&...
495 35b1800000\-35b1820000 r\-xp 00000000 08:02 135522  /usr/lib64/ld\-2.15.so
496 35b1a1f000\-35b1a20000 r\-\-p 0001f000 08:02 135522  /usr/lib64/ld\-2.15.so
497 35b1a20000\-35b1a21000 rw\-p 00020000 08:02 135522  /usr/lib64/ld\-2.15.so
498 35b1a21000\-35b1a22000 rw\-p 00000000 00:00 0
499 35b1c00000\-35b1dac000 r\-xp 00000000 08:02 135870  /usr/lib64/libc\-2.15.so
500 35b1dac000\-35b1fac000 \-\-\-p 001ac000 08:02 135870  /usr/lib64/libc\-2.15.so
501 35b1fac000\-35b1fb0000 r\-\-p 001ac000 08:02 135870  /usr/lib64/libc\-2.15.so
502 35b1fb0000\-35b1fb2000 rw\-p 001b0000 08:02 135870  /usr/lib64/libc\-2.15.so
503 \&...
504 f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0    [stack:986]
505 \&...
506 7fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0   [stack]
507 7fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0   [vdso]
508 .fi
509 .in
510
511 \fIaddress\fP フィールドは、 そのマッピングが占めているプロセスのアドレス空間である。 \fIperms\fP
512 フィールドはパーミッションのセットである。
513
514 .nf
515 .in +5
516 r = read
517 w = write
518 x = execute
519 s = shared
520 p = private (copy on write)
521 .fi
522 .in
523
524 \fIoffset\fP はファイル (などの) 中でのオフセット、 \fIdev\fP はデバイス (メジャーデバイス番号:マイナーデバイス番号)、
525 \fIinode\fP はそのデバイスの i ノード番号である。 0 は、BSS (初期化されていないデータ領域) の場合のように、 このメモリ領域はどの i
526 ノードとも関連付けられていないことを意味する。
527
528 \fIpathname\fP フィールドは、 通常そのマッピングに対応するファイルである。 ELF ファイルの場合、 ELF プログラムヘッダの Offset
529 フィールドを見ることで (\fIreadelf\ \-l\fP))、 簡単に \fIoffset\fP との対応付けをすることができる。
530
531 これに加え、 役に立つ擬似パス名がある。
532 .RS 12
533 .TP 
534 \fI[stack]\fP
535 初期プロセスのスタック (初期プロセスはメインスレッドとも呼ばれる)。
536 .TP 
537 \fI[stack:<tid>]\fP (Linux 3.4 以降)
538 .\" commit b76437579d1344b612cf1851ae610c636cec7db0
539 スレッドのスタック (\fI<tid>\fP はスレッド ID である)。 パス \fI/proc/[pid]/task/[tid]/\fP
540 に対応する。
541 .TP 
542 \fI[vdso]\fP
543 動的にリンクされる仮想共有オブジェクト (virtual dynamically linked shared object)。
544 .TP 
545 \fI[heap]\fP
546 プロセスのヒープ。
547 .in
548 .RE
549 .IP
550 \fIpathname\fP が空の場合、 その領域は \fBmmap\fP(2) を使って確保された無名マッピングである。 \fBgdb\fP(1),
551 \fBstrace\fP(1) などを使ってプロセスを実行しない限り、 この領域をプロセスのソースと対応付ける簡単な方法はない。
552
553 Linux 2.0 ではパス名を書いたフィールドがない。
554 .TP 
555 \fI/proc/[pid]/mem\fP
556 このファイルは、 \fBopen\fP(2), \fBread\fP(2), \fBlseek\fP(2)
557 を通して、プロセスのメモリのページにアクセスするために使われる。
558 .TP 
559 \fI/proc/[pid]/mountinfo\fP (Linux 2.6.26 以降)
560 .\" This info adapted from Documentation/filesystems/proc.txt
561 このファイルには、マウントポイントについての情報が入っている。 以下のような形式の行から構成される。
562 .nf
563
564 \f(CW36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
565 (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)\fP
566 .fi
567 .IP
568 括弧付きの数字は、以下の説明のためのものである。
569 .RS 7
570 .TP  5
571 (1)
572 マウント ID: マウントの一意な識別子 (\fBumount\fP(2)  の後は再利用されるかもしれない)。
573 .TP 
574 (2)
575 parent ID: 親マウントの ID (マウントツリーの最上位の場合は自分自身の ID となる)。
576 .TP 
577 (3)
578 major:minor: ファイルシステム上のファイルの \fIst_dev\fP の値 (\fBstat\fP(2)  参照)。
579 .TP 
580 (4)
581 ルート: そのファイルシステム内のマウントのルート。
582 .TP 
583 (5)
584 マウントポイント: マウントポイントのそのプロセスのルートからの相対パス。
585 .TP 
586 (6)
587 マウントオプション: 各マウントのオプション。
588 .TP 
589 (7)
590 オプションフィールド: "tag[:value]" 形式のフィールドが 0 個以上並ぶ。
591 .TP 
592 (8)
593 セパレータ: オプションフィールドの終わりを示す。
594 .TP 
595 (9)
596 ファイルシステム種別: ファイルシステムの名前。 "type[.subtype]" という形式となる。
597 .TP 
598 (10)
599 マウント元: ファイルシステム固有の情報。ない場合は "none" となる。
600 .TP 
601 (11)
602 super options: スーパーブロック単位のオプション。
603 .RE
604 .IP
605 解釈する側は認識できないオプションフィールドは全て無視すべきである。 現在のところ、オプションフィールドとしては以下のようなものがある。
606 .RS 12
607 .TP  18
608 shared:X
609 マウントはピアグループ (peer group) X で共有されている。
610 .TP 
611 master:X
612 マウントはピアグループ (peer group) X のスレーブである。
613 .TP 
614 propagate_from:X
615 マウントはスレーブであり、ピアグループ X (*) から mount propagation を受信する。
616 .TP 
617 unbindable
618 マウントは unbind できない。
619 .RE
620 .IP
621 (*) X は、プロセスの root で直近の dominant peer group である。 X がマウントの直接のマスターである場合や、 同じ
622 root に dominant peer group がない場合は、 "master:X" フィールドだけが存在し、
623 "propagate_from:X" フィールドは存在しない。
624
625 mount propagation の詳細については、 Linux カーネルソースツリー内の
626 \fIDocumentation/filesystems/sharedsubtree.txt\fP を参照。
627 .TP 
628 \fI/proc/[pid]/mounts\fP (Linux 2.4.19 以降)
629 そのプロセスのマウント名前空間に現在マウントされている 全ファイルシステムのリスト。 このファイルのフォーマットは \fBfstab\fP(5)
630 に載っている。 カーネル 2.6.15 以降では、このファイルを監視することができる (pollable)。
631 このファイルを読み出し用にオープンした後で、このファイルに変更があると (つまりファイルシステムのマウントやアンマウントがあると)、
632 \fBselect\fP(2)  ではそのファイルディスクリプタは読み出し可能となり、 \fBpoll\fP(2)  と \fBepoll_wait\fP(2)
633 ではそのファイルはエラー状態として通知される。 詳細は \fBnamespaces\fP(7) を参照。
634 .TP 
635 \fI/proc/[pid]/mountstats\fP (Linux 2.6.17 以降)
636 このファイルを通じて、そのプロセスのマウント名前空間内のマウントポイントに関する 各種情報 (統計、設定情報) を参照できる。
637 ファイルの各行は以下のフォーマットである。
638 .nf
639
640 device /dev/sda7 mounted on /home with fstype ext3 [statistics]
641 (       1      )            ( 2 )             (3 ) (4)
642 .fi
643 .IP
644 各行のフィールドは以下の通りである。
645 .RS 7
646 .TP  5
647 (1)
648 マウントされているデバイス名 (対応するデバイスがない場合は "nodevice" となる)。
649 .TP 
650 (2)
651 マウントポイントのファイルシステムツリーにおけるパス名。
652 .TP 
653 (3)
654 ファイルシステム種別。
655 .TP 
656 (4)
657 追加の統計や設定情報。 現在のところ (Linux 2.6.26 時点では)、 このフィールドで情報が提供されているのは NFS
658 ファイルシステムだけである。
659 .RE
660 .IP
661 このファイルはプロセスの所有者だけが読み出すことができる。
662
663 詳しい情報は \fBnamespaces\fP(7) を参照。
664 .TP 
665 \fI/proc/[pid]/ns/\fP (Linux 3.0 以降)
666 .\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
667 このサブディレクトリには、名前空間毎に 1 エントリが置かれる。
668 各エントリは \fBsetns\fP(2) による操作をサポートしている。
669 詳細な情報は \fBnamespaces\fP(7) を参照。
670
671 .TP 
672 \fI/proc/[pid]/numa_maps\fP (Linux 2.6.14 以降)
673 \fBnuma\fP(7)  を参照。
674 .TP 
675 \fI/proc/[pid]/oom_adj\fP (Linux 2.6.11 以降)
676 このファイルは、メモリ不足 (OOM) の状況下でどのプロセスを殺すべきかを選択す
677 るのに使用されるスコアを調整するのに使用される。カーネルは、プロセスの
678 \fIoom_score\fP 値のビットシフト操作に、この値を使用する。この値として有効な値
679 は \-16 から +15 までと、特別な意味を持つ \-17 である。 \-17 はそのプロセス
680 に対する OOM\-killing を完全に無効にすることを意味する。正の値ほど、そのプロ
681 セスが OOM\-killer により殺される可能性が高くなり、負の値ほど可能性が低くなる。
682 .IP
683 このファイルのデフォルト値は 0 である。 新しいプロセスは親プロセスの \fIoom_adj\fP の設定を継承する。
684 このファイルを変更するためには、プロセスは特権 (\fBCAP_SYS_RESOURCE\fP) を持っていなければならない。
685 .IP
686 Linux 2.6.36 以降では、 このファイルの使用は非推奨とされ、 代わりに \fI/proc/[pid]/oom_score_adj\fP
687 が推奨されている。
688 .TP 
689 \fI/proc/[pid]/oom_score\fP (Linux 2.6.11 以降)
690 .\" See mm/oom_kill.c::badness() in the 2.6.25 sources
691 .\" See mm/oom_kill.c::badness() in the 2.6.25 sources
692 このファイルは、OOM\-killer のプロセス選択用として、カーネルが このプロセス
693 に対して与えた現在のスコアを表示する。 高いスコアは、そのプロセスが
694 OOM\-killer により選択される 可能性が高いことを意味する。 このスコアの基本は
695 そのプロセスが使用しているメモリ量であり、 以下の要因により加算 (+) 減算 (\-)
696 が行われる。
697 .RS
698 .IP * 2
699 そのプロセスが多くの子プロセスを \fBfork\fP(2)  を使って作成しているか (+)。
700 .IP *
701 そのプロセスが長時間実行されて来たか、
702 もしくは 多くの CPU 時間を使用しているか (\-)。
703 .IP *
704 そのプロセスが低い nice 値 (> 0) を持っているか (+)。
705 .IP *
706 .\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
707 そのプロセスが特権を持っているか (\-)。
708 .IP *
709 .\" More precisely, if it has CAP_SYS_RAWIO
710 そのプロセスが direct hardware access を行っているか (\-)。
711 .RE
712 .IP
713 \fIoom_score\fP は、そのプロセスの \fIoom_score_adj\fP や \fIoom_adj\fP 設定で規定される調整にも影響を与える。
714 .TP 
715 \fI/proc/[pid]/oom_score_adj\fP (Linux 2.6.36 以降)
716 .\" Text taken from 3.7 Documentation/filesystems/proc.txt
717 This file can be used to adjust the badness heuristic used to select which
718 process gets killed in out\-of\-memory conditions.
719
720 The badness heuristic assigns a value to each candidate task ranging from 0
721 (never kill) to 1000 (always kill) to determine which process is targeted.
722 The units are roughly a proportion along that range of allowed memory the
723 process may allocate from, based on an estimation of its current memory and
724 swap use.  For example, if a task is using all allowed memory, its badness
725 score will be 1000.  If it is using half of its allowed memory, its score
726 will be 500.
727
728 There is an additional factor included in the badness score: root processes
729 are given 3% extra memory over other tasks.
730
731 The amount of "allowed" memory depends on the context in which the
732 OOM\-killer was called.  If it is due to the memory assigned to the
733 allocating task's cpuset being exhausted, the allowed memory represents the
734 set of mems assigned to that cpuset (see \fBcpuset\fP(7)).  If it is due to a
735 mempolicy's node(s) being exhausted, the allowed memory represents the set
736 of mempolicy nodes.  If it is due to a memory limit (or swap limit) being
737 reached, the allowed memory is that configured limit.  Finally, if it is due
738 to the entire system being out of memory, the allowed memory represents all
739 allocatable resources.
740
741 The value of \fIoom_score_adj\fP is added to the badness score before it is
742 used to determine which task to kill.  Acceptable values range from \-1000
743 (OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).  This allows user space to
744 control the preference for OOM\-killing, ranging from always preferring a
745 certain task or completely disabling it from OOM killing.  The lowest
746 possible value, \-1000, is equivalent to disabling OOM\-killing entirely for
747 that task, since it will always report a badness score of 0.
748
749 Consequently, it is very simple for user space to define the amount of
750 memory to consider for each task.  Setting a \fIoom_score_adj\fP value of +500,
751 for example, is roughly equivalent to allowing the remainder of tasks
752 sharing the same system, cpuset, mempolicy, or memory controller resources
753 to use at least 50% more memory.  A value of \-500, on the other hand, would
754 be roughly equivalent to discounting 50% of the task's allowed memory from
755 being considered as scoring against the task.
756
757 For backward compatibility with previous kernels, \fI/proc/[pid]/oom_adj\fP can
758 still be used to tune the badness score.  Its value is scaled linearly with
759 \fIoom_score_adj\fP.
760
761 Writing to \fI/proc/[pid]/oom_score_adj\fP or \fI/proc/[pid]/oom_adj\fP will
762 change the other with its scaled value.
763 .TP 
764 \fI/proc/[pid]/pagemap\fP (Linux 2.6.25 以降)
765 このファイルは、 プロセスの各仮想ページの物理ページフレームやスワップ領域へのマッピングを表示する。
766 各仮想ページに 64 ビットの値 1 つが対応し、 各ビットは以下のとおりである。
767 .RS 12
768 .TP 
769 63
770 セットされている場合、 このページは RAM に存在する。
771 .TP 
772 62
773 セットされている場合、 このページはスワップ領域に存在する。
774 .TP 
775 61 (Linux 3.5 以降)
776 このページはファイルマップされたページか共有無名ページである。
777 .TP 
778 60\-56 (Linux 3.11 以降)
779 .\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f
780 ゼロ。
781 .TP 
782 55 (Linux 3.11 以降)
783 PTE が soft\-dirty である (カーネルのソースファイル \fIDocumentation/vm/soft\-dirty.txt\fP を参照)。
784 .TP 
785 54\-0
786 このページが RAM に存在する場合 (ビット 63)、 これらのビットはページフレーム番号を示す。 このページフレーム番号は
787 \fI/proc/kpageflags\fP と \fI/proc/kpagecount\fP のインデックスに使用できる。 このページがスワップに存在する場合
788 (ビット 62)、 ビット 4\-0 はスワップ種別を示し、 ビット 54\-5 はスワップオフセットを示す。
789 .RE
790 .IP
791 Linux 3.11 より前では、 ビット 60\-55 はページサイズの基数 2 の log を示すのに使われていた。
792 .IP
793 \fI/proc/[pid]/pagemap\fP を効率的に活用するには、 \fI/proc/[pid]/maps\fP
794 を使ってメモリーのどの領域が実際にマップされているかを判断し、 seek でマップされていない領域をスキップするのがよい。
795 .IP
796 \fI/proc/[pid]/pagemap\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
797 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
798 .TP 
799 \fI/proc/[pid]/personality\fP (Linux 2.6.28 以降)
800 .\" commit 478307230810d7e2a753ed220db9066dfdf88718
801 This read\-only file exposes the process's execution domain, as set by
802 \fBpersonality\fP(2).  The value is displayed in hexadecimal notation.
803 .TP 
804 \fI/proc/[pid]/root\fP
805 UNIX と Linux では、 ファイルシステムのルート (/) をプロセスごとに別々にできる。 これはシステムコール \fBchroot\fP(2)
806 によって設定する。 このファイルはプロセスのルートディレクトリを指すシンボリックリンクで、 \fIexe\fP や \fIfd/*\fP
807 などと同じような動作をする。
808
809 .\" The following was still true as at kernel 2.6.13
810 .\" FIXME Describe /proc/[pid]/projid_map
811 .\"       Added in 3.7, commit f76d207a66c3a53defea67e7d36c3eb1b7d6d61d
812 .\" FIXME Describe /proc/[pid]/seccomp
813 .\"       Added in 2.6.12
814 .\"
815 .\" FIXME Describe /proc/[pid]/sessionid
816 .\"       Added in 2.6.25; read-only; only readable by real UID
817 .\"       commit 1e0bd7550ea9cf474b1ad4c6ff5729a507f75fdc
818 .\"       CONFIG_AUDITSYSCALL
819 .\"
820 .\" FIXME Describe /proc/[pid]/sched
821 .\"       Added in 2.6.23
822 .\"       CONFIG_SCHED_DEBUG, and additional fields if CONFIG_SCHEDSTATS
823 .\"       Displays various scheduling parameters
824 .\"       This file can be written, to reset stats
825 .\"       The set of fields exposed by this file have changed
826 .\"       significantly over time.
827 .\"       commit 43ae34cb4cd650d1eb4460a8253a8e747ba052ac
828 .\"
829 .\" FIXME Describe /proc/[pid]/schedstats and
830 .\"       /proc/[pid]/task/[tid]/schedstats
831 .\"       Added in 2.6.9
832 .\"       CONFIG_SCHEDSTATS
833 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
834 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
835 .TP 
836 \fI/proc/[pid]/smaps\fP (Linux 2.6.14 以降)
837 このファイルは、そのプロセスの各マッピングのメモリ消費量を表示する (\fBpmap\fP(1) コマンドは解析しやすいであろう形式で同様の情報を表示する)。
838 マッピングのそれぞれについて、以下のような内容が表示される。
839 .in +4n
840 .nf
841
842 00400000\-0048a000 r\-xp 00000000 fd:03 960637       /bin/bash
843 Size:                552 kB
844 Rss:                 460 kB
845 Pss:                 100 kB
846 Shared_Clean:        452 kB
847 Shared_Dirty:          0 kB
848 Private_Clean:         8 kB
849 Private_Dirty:         0 kB
850 Referenced:          460 kB
851 Anonymous:             0 kB
852 AnonHugePages:         0 kB
853 Swap:                  0 kB
854 KernelPageSize:        4 kB
855 MMUPageSize:           4 kB
856 Locked:                0 kB
857
858 .fi
859 .in
860 最初の行には、 \fI/proc/[pid]/maps\fP で表示されるマッピングと同じ情報が表示される。 残りの行には、マッピングのサイズ、現在 RAM
861 上に存在するマッピングの量 ("Rss")、 このマッピングのこのプロセスの proportional share ("Pss")、
862 マッピング内の共有ページのうちクリーンなページ数とダーティページ数、
863 マッピング内のプライベートページのうちクリーンなページ数とダーティページ数、を示す。 "Referenced" は参照された (referenced)
864 かアクセスされたと現在印が付いているメモリ量を示す。 "Anonymous" はどのファイルにも属していないメモリ量を示す。 "Swap"
865 は使用中だがスワップされている無名メモリ (would\-be\-anonymous memory) の量を示す。
866
867 The "KernelPageSize" entry is the page size used by the kernel to back a
868 VMA.  This matches the size used by the MMU in the majority of cases.
869 However, one counter\-example occurs on PPC64 kernels whereby a kernel using
870 64K as a base page size may still use 4K pages for the MMU on older
871 processors.  To distinguish, this patch reports "MMUPageSize" as the page
872 size used by the MMU.
873
874 The "Locked" indicates whether the mapping is locked in memory or not.
875
876 "VmFlags" field represents the kernel flags associated with the particular
877 virtual memory area in two letter encoded manner.  The codes are the
878 following:
879
880     rd  \- readable
881     wr  \- writable
882     ex  \- executable
883     sh  \- shared
884     mr  \- may read
885     mw  \- may write
886     me  \- may execute
887     ms  \- may share
888     gd  \- stack segment grows down
889     pf  \- pure PFN range
890     dw  \- disabled write to the mapped file
891     lo  \- pages are locked in memory
892     io  \- memory mapped I/O area
893     sr  \- sequential read advise provided
894     rr  \- random read advise provided
895     dc  \- do not copy area on fork
896     de  \- do not expand area on remapping
897     ac  \- area is accountable
898     nr  \- swap space is not reserved for the area
899     ht  \- area uses huge tlb pages
900     nl  \- non\-linear mapping
901     ar  \- architecture specific flag
902     dd  \- do not include area into core dump
903     sd  \- soft\-dirty flag
904     mm  \- mixed map area
905     hg  \- huge page advise flag
906     nh  \- no\-huge page advise flag
907     mg  \- mergeable advise flag
908
909 \fI/proc/[pid]/smaps\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
910 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
911 .TP 
912 \fI/proc/[pid]/stack\fP (Linux 2.6.29 以降)
913 .\" 2ec220e27f5040aec1e88901c1b6ea3d135787ad
914 This file provides a symbolic trace of the function calls in this process's
915 kernel stack.  This file is provided only if the kernel was built with the
916 \fBCONFIG_STACKTRACE\fP configuration option.
917 .TP 
918 \fI/proc/[pid]/stat\fP
919 プロセスの状態についての情報。 これは \fBps\fP(1)  で使われ、 カーネルのソースファイル \fIfs/proc/array.c\fP
920 で定義されている。
921
922 各フィールドを順番に、 \fBscanf\fP(3)  のフォーマット指定子付きで以下に示す。
923 .RS
924 .TP  10
925 (1) \fIpid\fP \ %d
926 .br
927 プロセス ID。
928 .TP 
929 (2) \fIcomm\fP \ %s
930 括弧でくくられた実行形式のファイル名。 実行形式がスワップアウトされているかどうかによらず、 見ることができる。
931 .TP 
932 (3) \fIstate\fP \ %c
933 プロセスの状態を示す、以下のいずれか 1 文字。
934 .RS
935 .IP R 3
936 実行中 (Running)
937 .IP S
938 Sleeping in an interruptible wait
939 .IP D
940 Waiting in uninterruptible disk sleep
941 .IP Z
942 ゾンビ (Zombie)
943 .IP T
944 (シグナルでの) 停止、または (Linux 2.6.33 より前では) トレースによる停止
945 .IP t
946 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
947 トレースによる停止 (Tracing stop) (Linux 2.6.33 以降)
948 .IP W
949 ページング中 (Linux 2.6.0 より前のみ)
950 .IP X
951 死亡 (Dead) (Linux 2.6.0 以降)
952 .IP x
953 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
954 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
955 死亡 (Dead) (Linux 2.6.33 から 3.13 までのみ)
956 .IP K
957 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
958 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
959 Wakekill (Linux 2.6.33 から 3.13 までのみ)
960 .IP W
961 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
962 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
963 Waking (Linux 2.6.33 から 3.13 までのみ)
964 .IP P
965 .\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb
966 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
967 Parked (Linux 3.9 から 3.13 までのみ)
968 .RE
969 .TP 
970 (4) \fIppid\fP \ %d
971 このプロセスの親プロセスの PID。
972 .TP 
973 (5) \fIpgrp\fP \ %d
974 プロセスのプロセスグループ ID。
975 .TP 
976 (6) \fIsession\fP \ %d
977 プロセスのセッション ID。
978 .TP 
979 (7) \fItty_nr\fP \ %d
980 プロセスの制御端末 (マイナー・デバイス番号はビット 31〜20 と 7〜0 にまたがって格納され、 メジャー・デバイス番号はビット 15〜8
981 に格納される)。
982 .TP 
983 (8) \fItpgid\fP \ %d
984 .\" This field and following, up to and including wchan added 0.99.1
985 プロセスの制御端末のフォアグランド・プロセス・グループの ID。
986 .TP 
987 (9) \fIflags\fP \ %u
988 プロセスのカーネルフラグワード。 ビットの意味は、 \fI<linux/sched.h>\fP で定義されている PF_* を参照すること。
989 詳細はカーネルのバージョンに依存する。
990
991 このフィールドのフォーマットは Linux 2.6 より前では %lu であった。
992 .TP 
993 (10) \fIminflt\fP \ %lu
994 プロセスが引き起こしたマイナーフォールト (minor fault、ディスクから メモリページへのロードを必要としないフォールト) の回数。
995 .TP 
996 (11) \fIcminflt\fP \ %lu
997 (そのプロセスが終了を待っている) 子プロセスが引き起こしたマイナーフォールトの回数。
998 .TP 
999 (12) \fImajflt\fP \ %lu
1000 プロセスが引き起こしたメジャーフォールト (major fault、ディスクからメモリページへのロードを必要とするフォールト) の回数。
1001 .TP 
1002 (13) \fIcmajflt\fP \ %lu
1003 (そのプロセスが終了を待っている) 子プロセスが引き起こしたメジャーフォールトの回数。
1004 .TP 
1005 (14) \fIutime\fP \ %lu
1006 このプロセスがユーザーモードでスケジューリングされた時間の合計。 clock tick 単位で計測される
1007 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 この値にはゲスト時間 \fIguest_time\fP (仮想 CPU
1008 の実行に消費された時間)
1009 も含まれる。これは、ゲスト時間のフィールドを認識しないアプリケーションにおいて、ゲスト時間分を計算に入れ損ねないようにするためである。
1010 .TP 
1011 (15) \fIstime\fP \ %lu
1012 プロセスのカーネルモードでの実行時間 (単位 jiffies)。 このプロセスがカーネルモードでスケジューリングされた時間の合計。 clock tick
1013 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1014 .TP 
1015 (16) \fIcutime\fP \ %ld
1016 このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、 ユーザモードでスケジューリングされた時間の合計。 clock tick
1017 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 (\fBtimes\fP(2)  も参照すること。)
1018 この値にはゲスト時間 \fIcguest_time\fP (仮想 CPU を実行するのに消費した時間、下記参照) も含まれる。
1019 .TP 
1020 (17) \fIcstime\fP \ %ld
1021 このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、カーネルモードでスケジューリングされた時間の合計。 clock tick
1022 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1023 .TP 
1024 (18) \fIpriority\fP \ %ld
1025 (Linux 2.6 の場合の説明) リアルタイム・スケジューリングポリシー (下記の
1026 \fIpolicy ;\fP \fBsched_setscheduler\fP(2) 参照) で動作しているプロセスでは、 この
1027 値はスケジューリング優先度を反転した値 (スケジューリング優先度を マイナスにし
1028 た値) となる。値は \-2 から \-100 までの範囲の数値で、 それぞれリアルタイム優先
1029 度の 1 から 99 に対応する。 リアルタイム以外のスケジューリングポリシーで動作し
1030 ているプロセスでは、 この値はカーネル内で管理されている nice 値そのもの
1031 (\fBsetpriority\fP(2)) となる。 カーネルは nice 値を 0 (高) から 39 (低) の範囲
1032 の値として保持しており、 それぞれユーザに見える nice 値の \-20 から 19 に対応
1033 する。
1034
1035 .\" And back in kernel 1.2 days things were different again.
1036 Linux 2.6 より前では、このプロセスに割り当てられたスケジューリング 重みを変換した値が表示されていた。
1037 .TP 
1038 (19) \fInice\fP \ %ld
1039 .\" Back in kernel 1.2 days things were different.
1040 .\" .TP
1041 .\" \fIcounter\fP %ld
1042 .\" The current maximum size in jiffies of the process's next timeslice,
1043 .\" or what is currently left of its current timeslice, if it is the
1044 .\" currently running process.
1045 .\" .TP
1046 .\" \fItimeout\fP %u
1047 .\" The time in jiffies of the process's next timeout.
1048 .\" timeout was removed sometime around 2.1/2.2
1049 nice 値 (\fBsetpriority\fP(2) 参照)。 19 (最低優先) から \-20 (最高優先)
1050 の範囲の値である。
1051 .TP 
1052 (20) \fInum_threads\fP \ %ld
1053 このプロセスのスレッド数 (Linux 2.6 以降)。 カーネル 2.6 より前では、このフィールドは削除されたフィールドの 場所埋めとして 0
1054 にハードコードされていた。
1055 .TP 
1056 (21) \fIitrealvalue\fP \ %ld
1057 インターバルタイマによって、次に \fBSIGALRM\fP がプロセスへ送られるまでの時間 (単位 jiffies)。 カーネル 2.6.17
1058 以降では、このフィールドはメンテナンスされなくなり、 0 にハードコードされている。
1059 .TP 
1060 (22) \fIstarttime\fP \ %llu
1061 プロセスの起動時刻。システムが起動した時刻が起点である。 Linux 2.6 より前のカーネルでは、 この値の単位は jiffies であった。
1062 Linux 2.6 以降では、 値の単位はクロック tick である (\fIsysconf(_SC_CLK_TCK)\fP で割った値となる)。
1063
1064 このフィールドのフォーマットは Linux 2.6 より前では %lu であった。
1065 .TP 
1066 (23) \fIvsize\fP \ %lu
1067 仮想メモリのサイズ。単位はバイト。
1068 .TP 
1069 (24) \fIrss\fP \ %ld
1070 Resident Set Size。プロセスが持っている実メモリ上のページ数。
1071 これはちょうどテキスト、データ、スタック空間に使われているページ数である。 デマンドロードされていないページや
1072 スワップアウトされたページの数は含んでいない。
1073 .TP 
1074 (25) \fIrsslim\fP \ %lu
1075 このプロセスの rss の現在のソフト・リミット (バイト単位)。 \fBgetrlimit\fP(2) の \fBRLIMIT_RSS\fP の説明を参照。
1076 .TP 
1077 (26) \fIstartcode\fP \ %lu
1078 プログラムテキストが実行可能であるような領域の先頭アドレス。
1079 .TP 
1080 (27) \fIendcode\fP \ %lu
1081 プログラムテキストが実行可能であるような領域の末尾アドレス。
1082 .TP 
1083 (28) \fIstartstack\fP \ %lu
1084 スタックの開始アドレス (すなわち、スタックの底)。
1085 .TP 
1086 (29) \fIkstkesp\fP \ %lu
1087 現在の ESP (スタックポインタ) の値。 プロセスのカーネルスタックページにある。
1088 .TP 
1089 (30) \fIkstkeip\fP \ %lu
1090 現在の EIP (インストラクションポインタ) の値。
1091 .TP 
1092 (31) \fIsignal\fP \ %lu
1093 処理待ちのシグナルのビットマップ。 10
1094 進数で表示される。このフィールドは廃止予定である。リアルタイム・シグナルに関する情報は表示されないからである。代わりに
1095 \fI/proc/[pid]/status\fP を使うこと。
1096 .TP 
1097 (32) \fIblocked\fP \ %lu
1098 ブロックされた (blocked) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1099 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
1100 .TP 
1101 (33) \fIsigignore\fP \ %lu
1102 無視された (ignored) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1103 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
1104 .TP 
1105 (34) \fIsigcatch\fP \ %lu
1106 捕捉された (caught) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1107 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
1108 .TP 
1109 (35) \fIwchan\fP \ %lu
1110 This is the "channel" in which the process is waiting.  It is the address of
1111 a location in the kernel where the process is sleeping.  The corresponding
1112 symbolic name can be found in \fI/proc/[pid]/wchan\fP.
1113 .TP 
1114 (36) \fInswap\fP \ %lu
1115 .\" nswap was added in 2.0
1116 スワップされたページ数 (メンテナンスされていない)。
1117 .TP 
1118 (37) \fIcnswap\fP \ %lu
1119 .\" cnswap was added in 2.0
1120 子プロセスの \fInswap\fP の累計 (メンテナンスされていない)。
1121 .TP 
1122 (38) \fIexit_signal\fP \ %d \ (Linux 2.1.22 以降)
1123 プロセスが死んだときに親プロセスに送られるシグナル。
1124 .TP 
1125 (39) \fIprocessor\fP \ %d \ (Linux 2.2.8 以降)
1126 このプロセスを最後に実行した CPU の番号。
1127 .TP 
1128 (40) \fIrt_priority\fP \ %u \ (Linux 2.5.19 以降)
1129 リアルタイム・スケジューリングの優先度。 リアルタイム・ポリシーの元でスケジューリングされるプロセスでは 1 から 99 の範囲の値となり、
1130 リアルタイム以外のスケジューリングポリシーのプロセスでは 0 となる (\fBsched_setscheduler\fP(2)  参照)。
1131 .TP 
1132 (41) \fIpolicy\fP \ %u \ (Linux 2.5.19 以降)
1133 スケジューリング・ポリシー (\fBsched_setscheduler\fP(2)  参照)。 値は、 \fIlinux/sched.h\fP の SCHED_*
1134 定数を使ってデコードすればよい。
1135
1136 このフィールドのフォーマットは Linux 2.6.22 より前は %lu であった。
1137 .TP 
1138 (42) \fIdelayacct_blkio_ticks\fP \ %llu \ (Linux 2.6.18 以降)
1139 (clock tick (100分の1秒) 単位での) ブロック I/O の総遅延量。
1140 .TP 
1141 (43) \fIguest_time\fP \ %lu \ (Linux 2.6.24 以降)
1142 プロセスのゲスト時間 (ゲスト OS の仮想 CPU を実行するのに消費された時間)。 clock tick 単位で計測される
1143 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1144 .TP 
1145 (44) \fIcguest_time\fP \ %ld \ (Linux 2.6.24 以降)
1146 プロセスの子プロセスのゲスト時間。 clock tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1147 .TP 
1148 (45) \fIstart_data\fP \ %lu \ (Linux 3.3 以降)
1149 .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
1150 Address above which program initialized and uninitialized (BSS) data are
1151 placed.
1152 .TP 
1153 (46) \fIend_data\fP \ %lu \ (Linux 3.3 以降)
1154 .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
1155 Address below which program initialized and uninitialized (BSS) data are
1156 placed.
1157 .TP 
1158 (47) \fIstart_brk\fP \ %lu \ (Linux 3.3 以降)
1159 .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
1160 Address above which program heap can be expanded with \fBbrk\fP(2).
1161 .TP 
1162 (48) \fIarg_start\fP \ %lu \ (Linux 3.5 以降)
1163 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1164 プログラムのコマンドライン引き数 (\fIargv\fP) が置かれる開始アドレス。
1165 .TP 
1166 (49) \fIarg_end\fP \ %lu \ (Linux 3.5 以降)
1167 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1168 プログラムのコマンドライン引き数 (\fIargv\fP) が置かれる終了アドレス。
1169 .TP 
1170 (50) \fIenv_start\fP \ %lu \ (Linux 3.5 以降)
1171 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1172 プログラムの環境 (environment) が置かれる開始アドレス。
1173 .TP 
1174 (51) \fIenv_end\fP \ %lu \ (Linux 3.5 以降)
1175 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1176 プログラムの環境 (environment) が置かれる終了アドレス。
1177 .TP 
1178 (52) \fIexit_code\fP \ %d \ (Linux 3.5 以降)
1179 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1180 \fBwaitpid\fP(2) が報告する形式のスレッドの終了ステータス。
1181 .RE
1182 .TP 
1183 \fI/proc/[pid]/statm\fP
1184 (ページ単位で計測した) メモリ使用量についての情報を提供する。 各列は以下の通りである。
1185 .in +4n
1186 .nf
1187
1188 .\" (not including libs; broken, includes data segment)
1189 .\" (including libs; broken, includes library text)
1190 size       プログラムサイズの総計
1191            (\fI/proc/[pid]/status\fP の VmSize と同じ)
1192 resident   実メモリ上に存在するページ
1193            (\fI/proc/[pid]/status\fP の VmRSS と同じ)
1194 share      共有ページ (ファイルと関連付けられているページ)
1195 text       テキスト (コード)
1196 lib        ライブラリ (Linux 2.6 では未使用)
1197 data       データ + スタック
1198 dt         ダーティページ (Linux 2.6 では未使用)
1199 .fi
1200 .in
1201 .TP 
1202 \fI/proc/[pid]/status\fP
1203 \fI/proc/[pid]/stat\fP と \fI/proc/[pid]/statm\fP にある多くの情報を、人間が解析しやすい形式で提供する。
1204 以下に例を示す。
1205 .in +4n
1206 .nf
1207
1208 $\fB cat /proc/$$/status\fP
1209 Name:   bash
1210 State:  S (sleeping)
1211 Tgid:   3515
1212 Pid:    3515
1213 PPid:   3452
1214 TracerPid:      0
1215 Uid:    1000    1000    1000    1000
1216 Gid:    100     100     100     100
1217 FDSize: 256
1218 Groups: 16 33 100
1219 VmPeak:     9136 kB
1220 VmSize:     7896 kB
1221 VmLck:         0 kB
1222 VmHWM:      7572 kB
1223 VmRSS:      6316 kB
1224 VmData:     5224 kB
1225 VmStk:        88 kB
1226 VmExe:       572 kB
1227 VmLib:      1708 kB
1228 VmPTE:        20 kB
1229 VmSwap:        0 kB
1230 Threads:        1
1231 SigQ:   0/3067
1232 SigPnd: 0000000000000000
1233 ShdPnd: 0000000000000000
1234 SigBlk: 0000000000010000
1235 SigIgn: 0000000000384004
1236 SigCgt: 000000004b813efb
1237 CapInh: 0000000000000000
1238 CapPrm: 0000000000000000
1239 CapEff: 0000000000000000
1240 CapBnd: ffffffffffffffff
1241 Seccomp:        0
1242 Cpus_allowed:   00000001
1243 Cpus_allowed_list:      0
1244 Mems_allowed:   1
1245 Mems_allowed_list:      0
1246 voluntary_ctxt_switches:        150
1247 nonvoluntary_ctxt_switches:     545
1248 .fi
1249 .in
1250 .IP
1251 フィールドの詳細は以下の通りである。
1252 .RS
1253 .IP * 2
1254 \fIName\fP: このプロセスにより実行されたコマンド。
1255 .IP *
1256 \fIState\fP: プロセスの現在の状態。 "R (running; 実行中)", "S (sleeping; 休眠状態)", "D (disk
1257 sleep; ディスク待ちの休眠状態)", "T (stopped; 停止状態)", "T (tracing stop; トレースによる停止)", "Z
1258 (zombie; ゾンビ状態)", "X (dead; 死亡)" のいずれかである。
1259 .IP *
1260 \fITgid\fP: スレッドグループ ID (すなわち、プロセス ID)。
1261 .IP *
1262 \fIPid\fP: スレッド ID (\fBgettid\fP(2)  参照)。
1263 .IP *
1264 \fIPPid\fP: 親プロセスの PID。
1265 .IP *
1266 \fITracerPid\fP: このプロセスをトレースしているプロセスの PID (トレースされていない場合は 0)。
1267 .IP *
1268 \fIUid\fP, \fIGid\fP: 実 UID/GID、実効 UID/GID、保存 set\-UID/GID、ファイルシステム UID/GID。
1269 .IP *
1270 \fIFDSize\fP: 現在割り当てられているファイルディスクリプタのスロット数。
1271 .IP *
1272 \fIGroups\fP: 補助グループのリスト。
1273 .IP *
1274 \fIVmPeak\fP: 仮想メモリサイズのピーク値。
1275 .IP *
1276 \fIVmSize\fP: 仮想メモリサイズ。
1277 .IP *
1278 \fIVmLck\fP: ロックされているメモリサイズ (\fBmlock\fP(3) 参照)。
1279 .IP *
1280 \fIVmHWM\fP: 実メモリ上に存在するページサイズ (resident set size)  のピーク値 ("high water mark")。
1281 .IP *
1282 \fIVmRSS\fP: 実メモリ上に存在するページサイズ。
1283 .IP *
1284 \fIVmData\fP, \fIVmStk\fP, \fIVmExe\fP: データ、スタック、テキストセグメントのサイズ。
1285 .IP *
1286 \fIVmLib\fP: 共有ライブラリ・コードのサイズ。
1287 .IP *
1288 \fIVmPTE\fP: ページ・テーブル・エントリのサイズ (Linux 2.6.10 以降)。
1289 .IP *
1290 .\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722
1291 \fIVmSwap\fP: スワップアウトされた仮想メモリサイズ (Linux 2.6.34 以降).
1292 .IP *
1293 \fIThreads\fP: このスレッドが属するプロセスのスレッド数。
1294 .IP *
1295 \fISigQ\fP: このフィールドにはスラッシュで区切られた 2 つの数字が入っている。この数字はこのプロセスの実ユーザ ID
1296 宛にキューイングされたシグナルに関するものである。一つ目の数字は、この実ユーザ ID
1297 宛に現在キューイングされているシグナル数である。二つ目の数字は、このプロセス宛にキューイングされたシグナル数に関するリソース上限値である
1298 (\fBgetrlimit\fP(2) の \fBRLIMIT_SIGPENDING\fP の説明を参照)。
1299 .IP *
1300 \fISigPnd\fP, \fIShdPnd\fP: スレッド宛およびプロセス全体宛の処理待ちシグナルの数 (\fBpthreads\fP(7),
1301 \fBsignal\fP(7)  参照)。
1302 .IP *
1303 \fISigBlk\fP, \fISigIgn\fP, \fISigCgt\fP: ブロックされるシグナル、無視されるシグナル、捕捉待ちのシグナルを 示すマスク値
1304 (\fBsignal\fP(7))。
1305 .IP *
1306 \fICapInh\fP, \fICapPrm\fP, \fICapEff\fP: 継承可能 (inheritable)、許可 (permitted)、実効
1307 (effective)  の各ケーパビリティセットで有効になっているケーパビリティのマスク値 (\fBcapabilities\fP(7)  参照)。
1308 .IP *
1309 \fICapBnd\fP: ケーパビリティ・バウンディングセット (Linux 2.6.26 以降、 \fBcapabilities\fP(7)  参照)。
1310 .IP *
1311 .\" commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816
1312 \fISeccomp\fP: Seccomp mode of the process (since Linux 3.8, see
1313 \fBseccomp\fP(2)).  0 means \fBSECCOMP_MODE_DISABLED\fP; 1 means
1314 \fBSECCOMP_MODE_STRICT\fP; 2 means \fBSECCOMP_MODE_FILTER\fP.  This field is
1315 provided only if the kernel was built with the \fBCONFIG_SECCOMP\fP kernel
1316 configuration option enabled.
1317 .IP *
1318 \fICpus_allowed\fP: このプロセスが実行を許可されている CPU のマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
1319 参照)。
1320 .IP *
1321 \fICpus_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
1322 参照)。
1323 .IP *
1324 \fIMems_allowed\fP: このプロセスが使用できるメモリノードのマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
1325 参照)。
1326 .IP *
1327 \fIMems_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
1328 参照)。
1329 .IP *
1330 \fIvoluntary_ctxt_switches\fP, \fInonvoluntary_ctxt_switches\fP:
1331 自発的/非自発的なコンテキストスイッチの回数 (Linux 2.6.23 以降)。
1332 .RE
1333 .TP 
1334 \fI/proc/[pid]/syscall\fP (Linux 2.6.27 以降)
1335 .\" commit ebcb67341fee34061430f3367f2e507e52ee051b
1336 This file exposes the system call number and argument registers for the
1337 system call currently being executed by the process, followed by the values
1338 of the stack pointer and program counter registers.  The values of all six
1339 argument registers are exposed, although most system calls use fewer
1340 registers.
1341
1342 If the process is blocked, but not in a system call, then the file displays
1343 \-1 in place of the system call number, followed by just the values of the
1344 stack pointer and program counter.  If process is not blocked, then file
1345 contains just the string "running".
1346
1347 カーネルの設定で \fBCONFIG_HAVE_ARCH_TRACEHOOK\fP が有効になっている場合にのみ、このファイルは存在する。
1348 .TP 
1349 \fI/proc/[pid]/task\fP (Linux 2.6.0\-test6 以降)
1350 このディレクトリには、そのプロセスのスレッド情報を含む サブディレクトリが 1 スレッドにつき 1 つ置かれる。
1351 各サブディレクトリの名前はスレッドのスレッド ID (\fI[tid]\fP)  を示す数字である \fB(\fPgettid\fB(2)\fP を参照)。
1352 これらの各サブディレクトリには、 \fI/proc/[pid]\fP ディレクトリ以下と同じ名前と内容のファイル群がある。
1353 すべてのスレッドで共有される属性の場合、 \fItask/[tid]\fP サブディレクトリ以下の各ファイルの内容は 親ディレクトリ
1354 \fI/proc/[pid]\fP の対応するファイルと同じになることだろう (例えば、マルチスレッド・プロセスではファイル
1355 \fItask/[tid]/cwd\fP はいずれも親ディレクトリ内の \fI/proc/[pid]/cwd\fP
1356 と同じ値を持つことになる。なぜなら、一つのプロセスに属すすべての スレッドは作業ディレクトリを共有するからである)。 スレッド毎に独立な属性の場合、
1357 \fItask/[tid]\fP サブディレクトリ以下の各ファイルは異なる値を持つことがある (例えば、ファイル \fItask/[tid]/status\fP
1358 はスレッド毎に異なる値を持つ可能性がある)。
1359
1360 .\" The following was still true as at kernel 2.6.13
1361 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 \fI/proc/[pid]/task\fP ディレクトリの内容は参照できない
1362 (スレッドの終了は通常 \fBpthread_exit\fP(3)  を呼び出しにより行われる)。
1363 .TP 
1364 \fI/proc/[pid]/uid_map\fP, \fI/proc/[pid]/gid_map\fP (Linux 3.5 以降)
1365 .\" commit 22d917d80e842829d0ca0a561967d728eb1d6303
1366 These files expose the mappings for user and group IDs inside the user
1367 namespace for the process \fIpid\fP.  The description here explains the details
1368 for \fIuid_map\fP; \fIgid_map\fP is exactly the same, but each instance of "user
1369 ID" is replaced by "group ID".
1370
1371 The \fIuid_map\fP file exposes the mapping of user IDs from the user namespace
1372 of the process \fIpid\fP to the user namespace of the process that opened
1373 \fIuid_map\fP (but see a qualification to this point below).  In other words,
1374 processes that are in different user namespaces will potentially see
1375 different values when reading from a particular \fIuid_map\fP file, depending
1376 on the user ID mappings for the user namespaces of the reading processes.
1377
1378
1379 Each line in the file specifies a 1\-to\-1 mapping of a range of contiguous
1380 between two user namespaces.  The specification in each line takes the form
1381 of three numbers delimited by white space.  The first two numbers specify
1382 the starting user ID in each user namespace.  The third number specifies the
1383 length of the mapped range.  In detail, the fields are interpreted as
1384 follows:
1385 .RS
1386 .IP (1) 4
1387 The start of the range of user IDs in the user namespace of the process
1388 \fIpid\fP.
1389 .IP (2)
1390 The start of the range of user IDs to which the user IDs specified by field
1391 one map.  How field two is interpreted depends on whether the process that
1392 opened \fIuid_map\fP and the process \fIpid\fP are in the same user namespace, as
1393 follows:
1394 .RS
1395 .IP a) 3
1396 If the two processes are in different user namespaces: field two is the
1397 start of a range of user IDs in the user namespace of the process that
1398 opened \fIuid_map\fP.
1399 .IP b)
1400 If the two processes are in the same user namespace: field two is the start
1401 of the range of user IDs in the parent user namespace of the process
1402 \fIpid\fP.  (The "parent user namespace" is the user namespace of the process
1403 that created a user namespace via a call to \fBunshare\fP(2)  or \fBclone\fP(2)
1404 with the \fBCLONE_NEWUSER\fP flag.)  This case enables the opener of \fIuid_map\fP
1405 (the common case here is opening \fI/proc/self/uid_map\fP)  to see the mapping
1406 of user IDs into the user namespace of the process that created this user
1407 namespace.
1408 .RE
1409 .IP (3)
1410 The length of the range of user IDs that is mapped between the two user
1411 namespaces.
1412 .RE
1413 .IP
1414 After the creation of a new user namespace, the \fIuid_map\fP file may be
1415 written to exactly once to specify the mapping of user IDs in the new user
1416 namespace.  (An attempt to write more than once to the file fails with the
1417 error \fBEPERM\fP.)
1418 .IP
1419 The lines written to \fIuid_map\fP must conform to the following rules:
1420 .RS
1421 .IP * 3
1422 The three fields must be valid numbers, and the last field must be greater
1423 than 0.
1424 .IP *
1425 Lines are terminated by newline characters.
1426 .IP *
1427 There is an (arbitrary) limit on the number of lines in the file.  As at
1428 Linux 3.8, the limit is five lines.
1429 .IP *
1430 The range of user IDs specified in each line cannot overlap with the ranges
1431 in any other lines.  In the current implementation (Linux 3.8), this
1432 requirement is satisfied by a simplistic implementation that imposes the
1433 further requirement that the values in both field 1 and field 2 of
1434 successive lines must be in ascending numerical order.
1435 .RE
1436 .IP
1437 Writes that violate the above rules fail with the error \fBEINVAL\fP.
1438
1439 In order for a process to write to the \fI/proc/[pid]/uid_map\fP
1440 (\fI/proc/[pid]/gid_map\fP)  file, the following requirements must be met:
1441 .RS
1442 .IP * 3
1443 The process must have the \fBCAP_SETUID\fP (\fBCAP_SETGID\fP)  capability in the
1444 user namespace of the process \fIpid\fP.
1445 .IP *
1446 The process must have the \fBCAP_SETUID\fP (\fBCAP_SETGID\fP)  capability in the
1447 parent user namespace.
1448 .IP *
1449 The process must be in either the user namespace of the process \fIpid\fP or
1450 inside the parent user namespace of the process \fIpid\fP.
1451 .RE
1452 For further details, see \fBnamespaces\fP(7).
1453 .TP 
1454 \fI/proc/[pid]/wchan\fP (Linux 2.6.0 以降)
1455 The symbolic name corresponding to the location in the kernel where the
1456 process is sleeping.
1457 .TP 
1458 \fI/proc/apm\fP
1459 Advanced Power Management のバージョンとバッテリ情報。 カーネルのコンパイル時に \fBCONFIG_APM\fP
1460 を定義したときに存在する。
1461 .TP 
1462 \fI/proc/buddyinfo\fP
1463 This file contains information which is used for diagnosing memory
1464 fragmentation issues.  Each line starts with the identification of the node
1465 and the name of the zone which together identify a memory region This is
1466 then followed by the count of available chunks of a certain order in which
1467 these zones are split.  The size in bytes of a certain order is given by the
1468 formual:
1469
1470     (2^order)\ *\ PAGE_SIZE
1471
1472 The binary buddy allocator algorithm inside the kernel will split one chunk
1473 into two chunks of a smaller order (thus with half the size) or combine two
1474 contiguous chunks into one larger chunk of a higher order (thus with double
1475 the size) to satisfy allocation requests and to counter memory
1476 fragmentation.  The order matches the column number, when starting to count
1477 at zero.
1478
1479 For example on a x86_64 system:
1480
1481 .in -12n
1482 .nf
1483 Node 0, zone     DMA     1    1    1    0    2    1    1    0    1    1    3
1484 Node 0, zone   DMA32    65   47    4   81   52   28   13   10    5    1  404
1485 Node 0, zone  Normal   216   55  189  101   84   38   37   27    5    3  587
1486 .fi
1487 .in
1488
1489 In this example, there is one node containing three zones and there are 11
1490 different chunk sizes.  If the page size is 4 kilobyteis, then the first
1491 zone called \fIDMA\fP (on x86 the first 16 megabyte of memory) has 1 chunk of 4
1492 kilobytes (order 0) available and has 3 chunks of 4 megabytes (order 10)
1493 available.
1494
1495 If the memory is heavily fragmentated, the counters for higher order chunks
1496 will be zero and allocation of large contiguous areas will fail.
1497
1498 Further information about the zones can be found in \fI/proc/zoneinfo\fP.
1499 .TP 
1500 \fI/proc/bus\fP
1501 インストールされている各バス用にサブディレクトリがある。
1502 .TP 
1503 \fI/proc/bus/pccard\fP
1504 PCMCIA デバイスの情報が書かれるサブディレクトリ。 カーネルのコンパイル時に \fBCONFIG_PCMCIA\fP を定義したときに存在する。
1505 .TP 
1506 \fI/proc/[pid]/timers\fP (Linux 3.10 以降)
1507 .\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5
1508 .\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0
1509 このプロセスの POSIX タイマーのリスト。 各タイマーは文字列 "ID:" で始まる行に表示される。 例:
1510
1511 .in +4n
1512 .nf
1513 ID: 1
1514 signal: 60/00007fff86e452a8
1515 notify: signal/pid.2634
1516 ClockID: 0
1517 ID: 0
1518 signal: 60/00007fff86e452a8
1519 notify: signal/pid.2634
1520 ClockID: 1
1521 .fi
1522 .in
1523
1524 各タイマーに表示される行の意味は次の通りである。
1525 .RS
1526 .TP 
1527 \fIID\fP
1528 このタイマーの ID。 この ID は \fBtimer_create\fP(2) が返すタイマー ID と同じではない。 \fIsiginfo_t\fP 構造化の
1529 \fIsi_timerid\fP フィールドで参照できるカーネル内部での ID と同じである (\fBsigaction\fP(2) 参照)。
1530 .TP 
1531 \fIsignal\fP
1532 このタイマーが通知の配送に使用するシグナル番号である。 スラッシュの後ろは、シグナルハンドラーに渡される
1533 \fIsigev_value.sival_ptr\fP 値である。 シグナルで通知されるタイマーでのみ有効である。
1534 .TP 
1535 \fInotify\fP
1536 スラッシュの前の部分は、このタイマーが使用する通知の配送方法であり、「スレッド」「シグナル」「なし」のいずれかである。 スラッシュのすぐ後には、
1537 \fBSIGEV_THREAD_ID\fP 通知を行うタイマーでは文字列の "tid" が、 もしくは他の方法で通知するタイマーでは "pid"
1538 が表示される。 "." の後ろは、 そのタイマーがシングルで通知を配送する場合にはシグナルの配送対象となるプロセスの PID である。
1539 .TP 
1540 \fIClockID\fP
1541 このフィールドはタイマーが時間を計測するのに使用するクロックを示す。 ほとんどのクロックでは、このフィールドは \fI<time.h>\fP
1542 で公開されるユーザー空間の \fBCLOCK_*\fP 定数のいずれかの数字である。 \fBCLOCK_PROCESS_CPUTIME_ID\fP
1543 タイマーでは、このフィールドに \-6 が表示される。 \fBCLOCK_THREAD_CPUTIME_ID\fP タイマーでは \-2 が表示される。
1544 .RE
1545 .TP 
1546 \fI/proc/bus/pccard/drivers\fP
1547 .TP 
1548 \fI/proc/bus/pci\fP
1549 いくつかのサブディレクトリがあり、 PCI バス・インストールされているデバイス・ デバイスドライバの情報が書かれた仮想ファイルがある。
1550 これらのファイルのうちいくつかは ASCII フォーマットではない。
1551 .TP 
1552 \fI/proc/bus/pci/devices\fP
1553 PCI デバイスの情報。 \fBlspci\fP(8)  や \fBsetpci\fP(8)  でアクセスすることができる。
1554 .TP 
1555 \fI/proc/cmdline\fP
1556 ブート時に Linux カーネルに渡された引き数。 引き数の受け渡しは、たいてい \fBlilo\fP(8)  や \fBgrub\fP(8)
1557 といったブートマネージャを使って行われる。
1558 .TP 
1559 \fI/proc/config.gz\fP (Linux 2.6 以降)
1560 このファイルでは、現在実行中のカーネルの構築時に使用された 設定オプションを参照できる。 書式は、 (\fImake xconfig\fP, \fImake
1561 config\fP などを使って) カーネルの設定を変更した際に生成される \fI.config\fP ファイルのものと同じである。
1562 ファイルの内容は圧縮されており、 \fBzcat\fP(1) や \fBzgrep\fP(1) を使うと、表示や検索ができる。 ファイルが変更されていない限り、
1563 \fI/proc/config.gz\fP の内容は次のコマンドで得られる内容と同じである。
1564 .in +4n
1565 .nf
1566
1567 cat /lib/modules/$(uname \-r)/build/.config
1568 .fi
1569 .in
1570 .IP
1571 \fI/proc/config.gz\fP が提供されるのは、カーネルの設定で \fBCONFIG_IKCONFIG_PROC\fP
1572 が有効になっている場合のみである。
1573 .TP 
1574 \fI/proc/cpuinfo\fP
1575 このファイルは、CPU およびシステムアーキテクチャに依存する項目を 集めたもので、リストの内容はサポートされているアーキテクチャ毎に異なる。 2
1576 つだけ共通の項目がある。 \fIprocessor\fP はプロセッサ番号で、 \fIbogomips\fP はカーネルの初期化時に計算されるシステム定数である。
1577 SMP マシンでは各 CPU についての情報が書かれている。 \fBlscpu\fP(1) コマンドはこのファイルから情報を収集する。
1578 .TP 
1579 \fI/proc/devices\fP
1580 メジャーデバイス番号とデバイスグループのテキスト形式のリスト。 MAKEDEV スクリプトはこのファイルを使って、
1581 カーネルとの整合性を保つことができる。
1582 .TP 
1583 \fI/proc/diskstats\fP (Linux 2.5.69 以降)
1584 このファイルには各ディスクデバイスのディスク I/O 統計情報が書かれている。 更に詳しい情報は、Linux カーネルソースファイル
1585 \fIDocumentation/iostats.txt\fP を参照すること。
1586 .TP 
1587 \fI/proc/dma\fP
1588 登録されている \fIISA\fP DMA (direct memory access) チャネルのリスト。
1589 .TP 
1590 \fI/proc/driver\fP
1591 空のサブディレクトリ。
1592 .TP 
1593 \fI/proc/execdomains\fP
1594 実行ドメインのリスト (ABI パーソナリティ)。
1595 .TP 
1596 \fI/proc/fb\fP
1597 カーネルのコンパイル時に \fBCONFIG_FB\fP が定義されている場合、フレームバッファの情報が書かれる。
1598 .TP 
1599 \fI/proc/filesystems\fP
1600 カーネルが対応しているファイルシステムのテキスト形式のリスト。 カーネルに組み込まれてコンパイルされたファイルシステムと、
1601 カーネルモジュールが現在ロードされているファイルシステムが列挙される (\fBfilesystems\fP(5)  参照)。 ファイルシステムに
1602 "nodev" という印が付いている場合、 そのファイルシステムがマウントするためのブロックデバイスを 必要としないことを意味する (例えば、
1603 仮想ファイルシステム、ネットワークファイルシステムなど)。
1604
1605 ちなみに、マウント時にファイルシステムが指定されず、 どうやってもファイルシステムの種類を判定できなかった際に、 このファイルを \fBmount\fP(8)
1606 が使用するかもしれない。 その場合、このファイルに含まれるファイルシステムが試される (ただし、"nodev" の印がついたものは除く)。
1607 .TP 
1608 \fI/proc/fs\fP
1609 .\" FIXME Much more needs to be said about /proc/fs
1610 .\"
1611 マウントされているファイルシステムに関する情報を提供するファイルが入ったサブディレクトリが入っている。
1612 .TP 
1613 \fI/proc/ide\fP
1614 このディレクトリは IDE バスをもつシステムに存在する。 各 IDE チャネルとそれに取り付けられている各デバイスごとにディレクトリがあり、
1615 以下のファイルが含まれている。
1616
1617 .in +4n
1618 .nf
1619 cache              バッファサイズ (KB)
1620 capacity           セクタ数
1621 driver             ドライバのバージョン
1622 geometry           物理ジオメトリと論理ジオメトリ
1623 identify           16 進数表記
1624 media              メディアのタイプ
1625 model              製造者のモデル番号
1626 settings           ドライブの設定
1627 smart_thresholds   16 進数表記
1628 smart_values       16 進数表記
1629 .fi
1630 .in
1631
1632 \fBhdparm\fP(8)  ユーティリティは、分かりやすい形式で この情報にアクセスするための手段を提供する。
1633 .TP 
1634 \fI/proc/interrupts\fP
1635 IO デバイス毎の CPU 別の割り込み回数の記録に使われる。 Linux 2.6.24 以降、少なくとも i386 と x86_64
1636 アーキテクチャでは、 (デバイスと関連がない) システム内部の割り込みについても記録される。 システム内部の割り込みには、NMI
1637 (nonmaskable interrupt), LOC (local timer interrupt) や、SMP システムでは TLB (TLB
1638 flush interrupt), RES (rescheduling interrupt), CAL (remote function call
1639 interrupt)  などがある。 簡単に読むことのできるフォーマットで、ASCII で表記されている。
1640 .TP 
1641 \fI/proc/iomem\fP
1642 Linux 2.4 における I/O メモリマップ。
1643 .TP 
1644 \fI/proc/ioports\fP
1645 現在登録され使われている I/O ポート領域のリスト。
1646 .TP 
1647 \fI/proc/kallsyms\fP (Linux 2.5.71 以降)
1648 カーネルの外部シンボル定義を保持する。 \fBmodules\fP(X)  関係のツールがローダブルモジュールを動的にリンクしたり バインド (bind)
1649 するのに使われる。 Linux 2.5.47 以前では、微妙に異なる書式の似たようなファイルが \fIksyms\fP という名前であった。
1650 .TP 
1651 \fI/proc/kcore\fP
1652 このファイルはシステムの物理メモリを表現しており、 ELF コアファイル形式 (core file format) で保持されている。
1653 この擬似ファイルと strip されていないカーネルのバイナリ (\fI/usr/src/linux/vmlinux\fP)  [訳注:
1654 パッケージに依存する]) があれば、 GDB はカーネル内の任意のデータ構造の現在の状態を調べられる。
1655
1656 このファイルの大きさは物理メモリ (RAM) のサイズに 4KB を加えた値である。
1657 .TP 
1658 \fI/proc/kmsg\fP
1659 このファイルは \fBsyslog\fP(2)  システムコールでカーネルメッセージを読み出す代りに使える。
1660 プロセスがこのファイルを読むためにはスーパーユーザー権限が必要であり、 ファイルを読み出すのは 1 つのプロセスのみに限るべきである。
1661 カーネルメッセージを記録するために、 \fBsyslog\fP(2)  システムコールの機能を使う syslog プロセスが稼働している場合、
1662 このファイルを読み出すべきではない。
1663
1664 このファイルの中の情報は \fBdmesg\fP(1)  によって表示される。
1665 .TP 
1666 \fI/proc/kpagecount\fP (Linux 2.6.25 以降)
1667 このファイルには、 各物理ページフレームがマッピングされた回数が 64 ビットカウンターとして入っている。 インデックスはページフレーム番号である
1668 (\fI/proc/[pid]/pagemap\fP の議論を参照)。
1669 .IP
1670 \fI/proc/kpagecount\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
1671 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
1672 .TP 
1673 \fI/proc/kpageflags\fP (Linux 2.6.25 以降)
1674 このファイルには、 各物理ページフレームに対応する 64 ビットマスクが入っている。 インデックスはページフレーム番号である
1675 (\fI/proc/[pid]/pagemap\fP の議論を参照)。 各ビットは以下のとおりである。
1676
1677      0 \- KPF_LOCKED
1678      1 \- KPF_ERROR
1679      2 \- KPF_REFERENCED
1680      3 \- KPF_UPTODATE
1681      4 \- KPF_DIRTY
1682      5 \- KPF_LRU
1683      6 \- KPF_ACTIVE
1684      7 \- KPF_SLAB
1685      8 \- KPF_WRITEBACK
1686      9 \- KPF_RECLAIM
1687     10 \- KPF_BUDDY
1688     11 \- KPF_MMAP           (Linux 2.6.31 以降)
1689     12 \- KPF_ANON           (Linux 2.6.31 以降)
1690     13 \- KPF_SWAPCACHE      (Linux 2.6.31 以降)
1691     14 \- KPF_SWAPBACKED     (Linux 2.6.31 以降)
1692     15 \- KPF_COMPOUND_HEAD  (Linux 2.6.31 以降)
1693     16 \- KPF_COMPOUND_TAIL  (Linux 2.6.31 以降)
1694     16 \- KPF_HUGE           (Linux 2.6.31 以降)
1695     18 \- KPF_UNEVICTABLE    (Linux 2.6.31 以降)
1696     19 \- KPF_HWPOISON       (Linux 2.6.31 以降)
1697     20 \- KPF_NOPAGE         (Linux 2.6.31 以降)
1698     21 \- KPF_KSM            (Linux 2.6.32 以降)
1699     22 \- KPF_THP            (Linux 3.4 以降)
1700
1701 .\" commit ad3bdefe877afb47480418fdb05ecd42842de65e
1702 .\" commit e07a4b9217d1e97d2f3a62b6b070efdc61212110
1703 これらのビットの意味の詳しい説明は、 カーネルのソースファイル \fIDocumentation/vm/pagemap.txt\fP を参照。 カーネル
1704 2.6.29 より前では、 \fBKPF_WRITEBACK\fP, \fBKPF_RECLAIM\fP, \fBKPF_BUDDY\fP, \fBKPF_LOCKED\fP
1705 は正しい値を返さなかった。
1706 .IP
1707 \fI/proc/kpageflags\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
1708 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
1709 .TP 
1710 \fI/proc/ksyms\fP (Linux 1.1.23\-2.5.47)
1711 \fI/proc/kallsyms\fP を参照。
1712 .TP 
1713 \fI/proc/loadavg\fP
1714 このファイルの最初の 3 つのフィールドはロードアベレージの数値で、 1, 5, 15 分
1715 あたりの実行キュー内 (state R) または ディスク I/O 待ち (state D) のジョブ数
1716 を与える。 これは \fBuptime\fP(1) などのプログラムによって得られる値と同じである。
1717 4 番目のフィールドはスラッシュ (/) で区切られた 2 つの数値から構成される。
1718 この数値のうち最初のものは、現在実行可能なカーネルスケジュールエンティティ
1719 (プロセス、スレッド) の数である。スラッシュの後の数値は、現在システム上に
1720 存在するカーネルスケジュールエンティティの数である。 5 番目のフィールドは
1721 システム上に最も最近生成されたプロセスの PID である。
1722 .TP 
1723 \fI/proc/locks\fP
1724 このファイルは現在のファイルロック (\fBflock\fP(2) と \fBfcntl\fP(2))  とリース (\fBfcntl\fP(2))  を表示する。
1725 .TP 
1726 \fI/proc/malloc\fP (Linux 2.2 以前のみ)
1727 .\" It looks like this only ever did something back in 1.0 days
1728 コンパイルのときに \fBCONFIGDEBUGMALLOC\fP が定義されているときのみ、このファイルは存在する。
1729 .TP 
1730 \fI/proc/meminfo\fP
1731 このファイルはシステムのメモリ使用状況の統計情報を表示する。 \fBfree\fP(1) はこのファイルを使って、 そのシステムの
1732 (物理メモリとスワップの両方の) 未使用と使用中のメモリ量と、 カーネルが使用している共有メモリとバッファの使用量を表示する。
1733 このファイルの各行は、パラメータ名の後に、 コロン、 パラメータ値が続く。 最後に ("kB" などの) 計測単位がある場合もある。 以下のリストでは、
1734 フィールド名と、フィールド値を読み込むのに必要なフォーマット指定子 (format specifier) について説明する。
1735 特に注記がある場合を除くと、すべてのフィールドが少なくとも Linux 2.6.0 以降では存在する。
1736 いくつかのフィールドは、カーネルでオプションが有効になっている場合にのみ表示される。 こうした依存関係についてはリスト内に注記がある。
1737 .RS
1738 .TP 
1739 \fIMemTotal\fP %lu
1740 使用可能な RAM の総量 (つまり、 物理 RAM サイズからいくつかの予約ビットとカーネルのバイナリコードの分を引いた値)。
1741 .TP 
1742 \fIMemFree\fP %lu
1743 \fILowFree\fP+\fIHighFree\fP の合計値。
1744 .TP 
1745 \fIBuffers\fP %lu
1746 Relatively temporary storage for raw disk blocks that shouldn't get
1747 tremendously large (20MB or so).
1748 .TP 
1749 \fICached\fP %lu
1750 ディスクから読み出したファイルのインメモリキャッシュ (ページキャッシュ)。 \fISwapCached\fP は含まれない。
1751 .TP 
1752 \fISwapCached\fP %lu
1753 一度スワップアウトされ、その後スワップインされたが、まだスワップファイルにも存在するメモリ。 (メモリが残り少ない場合、
1754 これらのページは、すでにスワップファイルに存在するので、もう一度スワップアウトする必要がない。 これにより I/O が節約できる。)
1755 .TP 
1756 \fIActive\fP %lu
1757 最近使用されたメモリで、通常は本当に必要にならない限り回収されないメモリ。
1758 .TP 
1759 \fIInactive\fP %lu
1760 最近あまり使用されていないメモリ。 他の使用するために優先して回収すべきメモリ。
1761 .TP 
1762 \fIActive(anon)\fP %lu (Linux 2.6.28 以降)
1763 [後で記載する]
1764 .TP 
1765 \fIInactive(anon)\fP %lu (Linux 2.6.28 以降)
1766 [後で記載する]
1767 .TP 
1768 \fIActive(file)\fP %lu (Linux 2.6.28 以降)
1769 [後で記載する]
1770 .TP 
1771 \fIInactive(file)\fP %lu (Linux 2.6.28 以降)
1772 [後で記載する]
1773 .TP 
1774 \fIUnevictable\fP %lu (Linux 2.6.28 以降)
1775 (Linux 2.6.28 から 2.6.30 まででは \fBCONFIG_UNEVICTABLE_LRU\fP が必要であった。)  [後で記載する]
1776 .TP 
1777 \fIMlocked\fP %lu (Linux 2.6.28 以降)
1778 (Linux 2.6.28 から 2.6.30 まででは \fBCONFIG_UNEVICTABLE_LRU\fP が必要であった。)  [後で記載する]
1779 .TP 
1780 \fIHighTotal\fP %lu
1781 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) highmem の総量。 highmem は物理メモリの 860MB
1782 付近よりも上の部分のメモリ領域全体のことである。 highmem 領域はユーザー空間プログラムとページキャッシュで使用される。
1783 カーネルはこのメモリにアクセスするのに小技を使っており、 lowmem よりもアクセスが遅くなる。
1784 .TP 
1785 \fIHighFree\fP %lu
1786 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) 未使用の highmem 量。
1787 .TP 
1788 \fILowTotal\fP %lu
1789 (Starting with Linux 2.6.19, \fBCONFIG_HIGHMEM\fP is required.)  Total amount
1790 of lowmem.  Lowmem is memory which can be used for everything that highmem
1791 can be used for, but it is also available for the kernel's use for its own
1792 data structures.  Among many other things, it is where everything from
1793 \fISlab\fP is allocated.  Bad things happen when you're out of lowmem.
1794 .TP 
1795 \fILowFree\fP %lu
1796 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) 未使用の lowmem 量。
1797 .TP 
1798 \fIMmapCopy\fP %lu (Linux 2.6.29 以降)
1799 (\fBCONFIG_MMU\fP が必要)  [後で記載する]
1800 .TP 
1801 \fISwapTotal\fP %lu
1802 利用可能なスワップ空間の総量。
1803 .TP 
1804 \fISwapFree\fP %lu
1805 現在未使用のスワップ空間の量。
1806 .TP 
1807 \fIDirty\fP %lu
1808 ディスクに書き戻されるのを待っているメモリ。
1809 .TP 
1810 \fIWriteback\fP %lu
1811 現在ディスクに書き戻し中のメモリ。
1812 .TP 
1813 \fIAnonPages\fP %lu (Linux 2.6.18 以降)
1814 ユーザー空間ページテーブルにマッピングされているファイルと関連付けられていないページ。
1815 .TP 
1816 \fIMapped\fP %lu
1817 (\fBmmap\fP(2) で) メモリにマッピングされているファイル。 ライブラリなど。
1818 .TP 
1819 \fIShmem\fP %lu (Linux 2.6.32 以降)
1820 [後で記載する]
1821 .TP 
1822 \fISlab\fP %lu
1823 カーネル内のデータ構造体のキャッシュ。
1824 .TP 
1825 \fISReclaimable\fP %lu (Linux 2.6.19 以降)
1826 回収可能な \fISlab\fP。 キャッシュなど。
1827 .TP 
1828 \fISUnreclaim\fP %lu (Linux 2.6.19 以降)
1829 メモリ消費が激しい際でも回収できない \fISlab\fP。
1830 .TP 
1831 \fIKernelStack\fP %lu (Linux 2.6.32 以降)
1832 カーネルスタックに割り宛てられているメモリ量。
1833 .TP 
1834 \fIPageTables\fP %lu (Linux 2.6.18 以降)
1835 Amount of memory dedicated to the lowest level of page tables.
1836 .TP 
1837 \fIQuicklists\fP %lu (Linux 2.6.27 以降)
1838 (\fBCONFIG_QUICKLIST\fP が必要)  [後で記載する]
1839 .TP 
1840 \fINFS_Unstable\fP %lu (Linux 2.6.18 以降)
1841 サーバに送信されたが、まだ永続的なストレージには書き込まれていない NFS ページ。
1842 .TP 
1843 \fIBounce\fP %lu (Linux 2.6.18 以降)
1844 Memory used for block device "bounce buffers".
1845 .TP 
1846 \fIWritebackTmp\fP %lu (Linux 2.6.26 以降)
1847 FUSE で一時的なライトバックバッファに使われているメモリ。
1848 .TP 
1849 \fICommitLimit\fP %lu (Linux 2.6.10 以降)
1850 This is the total amount of memory currently available to be allocated on
1851 the system, expressed in kilobytes.  This limit is adhered to only if strict
1852 overcommit accounting is enabled (mode 2 in
1853 \fI/proc/sys/vm/overcommit_memory\fP).  The limit is calculated according to
1854 the formula described under \fI/proc/sys/vm/overcommit_memory\fP.  For further
1855 details, see the kernel source file
1856 \fIDocumentation/vm/overcommit\-accounting\fP.
1857 .TP 
1858 \fICommitted_AS\fP %lu
1859 The amount of memory presently allocated on the system.  The committed
1860 memory is a sum of all of the memory which has been allocated by processes,
1861 even if it has not been "used" by them as of yet.  A process which allocates
1862 1GB of memory (using \fBmalloc\fP(3)  or similar), but touches only 300MB of
1863 that memory will show up as using only 300MB of memory even if it has the
1864 address space allocated for the entire 1GB.
1865
1866 This 1GB is memory which has been "committed" to by the VM and can be used
1867 at any time by the allocating application.  With strict overcommit enabled
1868 on the system (mode 2 in IR /proc/sys/vm/overcommit_memory ), allocations
1869 which would exceed the \fICommitLimit\fP will not be permitted.  This is useful
1870 if one needs to guarantee that processes will not fail due to lack of memory
1871 once that memory has been successfully allocated.
1872 .TP 
1873 \fIVmallocTotal\fP %lu
1874 vmalloc メモリ領域の総量。
1875 .TP 
1876 \fIVmallocUsed\fP %lu
1877 使用中の vmalloc 領域の量。
1878 .TP 
1879 \fIVmallocChunk\fP %lu
1880 vmalloc 領域の未使用の連続するブロックの最大サイズ。
1881 .TP 
1882 \fIHardwareCorrupted\fP %lu (Linux 2.6.32 以降)
1883 (\fBCONFIG_MEMORY_FAILURE\fP が必要) [後で記載する]
1884 .TP 
1885 \fIAnonHugePages\fP %lu (Linux 2.6.38 以降)
1886 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP が必要)
1887 ユーザー空間ページテーブルにマッピングされているファイルと関連付けられていないヒュージページ。
1888 .TP 
1889 \fIHugePages_Total\fP %lu
1890 (\fBCONFIG_HUGETLB_PAGE\fP が必要) ヒュージページのプールサイズ。
1891 .TP 
1892 \fIHugePages_Free\fP %lu
1893 (\fBCONFIG_HUGETLB_PAGE\fP が必要) プール内の割り当てられていないヒュージページ数。
1894 .TP 
1895 \fIHugePages_Rsvd\fP %lu (Linux 2.6.17 以降)
1896 (\fBCONFIG_HUGETLB_PAGE\fP が必要) プールから割り当てが宣言されたが、まだ割り当てが行われていないヒュージページ数。
1897 これらの予約ヒュージページにより、 アプリケーションがメモリフォールト時にヒュージページのプールからヒュージページが割り当てられることが保証される。
1898 .TP 
1899 \fIHugePages_Surp\fP %lu (Linux 2.6.24 以降)
1900 (\fBCONFIG_HUGETLB_PAGE\fP is required.)  This is the number of huge pages in
1901 the pool above the value in \fI/proc/sys/vm/nr_hugepages\fP.  The maximum
1902 number of surplus huge pages is controlled by
1903 \fI/proc/sys/vm/nr_overcommit_hugepages\fP.
1904 .TP 
1905 \fIHugepagesize\fP %lu
1906 (\fBCONFIG_HUGETLB_PAGE\fP が必要) ヒュージページのサイズ。
1907 .RE
1908 .TP 
1909 \fI/proc/modules\fP
1910 現在システムにロードされているモジュールのテキスト形式のリスト。 \fBlsmod\fP(8)  も参照。
1911 .TP 
1912 \fI/proc/mounts\fP
1913 カーネル 2.4.19 より前では、このファイルは現在システムにマウントされている 全てのファイルシステムのリストであった。 Linux 2.4.19
1914 でプロセス単位のマウント名前空間が導入されたことに伴い、 このファイルは \fI/proc/self/mounts\fP へのリンクとなった。
1915 \fI/proc/self/mounts\fP はそのプロセス自身のマウント名前空間のマウントポイントのリストである。 このファイルのフォーマットは
1916 \fBfstab\fP(5)  に記述されている。
1917 .TP 
1918 \fI/proc/mtrr\fP
1919 Memory Type Range Registers。 詳細は、Linux カーネルソースファイル \fIDocumentation/mtrr.txt\fP
1920 を参照すること。
1921 .TP 
1922 \fI/proc/net\fP
1923 さまざまなネットワークについての擬似ファイルで、 それぞれがネットワーク層の各種の状態を与える。 これらのファイルの内容は ASCII 形式なので、
1924 \fBcat\fP(1)  で読み出せる。 とはいえ基本コマンドの \fBnetstat\fP(8)  はこれらのファイルの内容のよりすっきりとした表示を提供する。
1925 .TP 
1926 \fI/proc/net/arp\fP
1927 アドレス解決に使われるカーネルの ARP テーブルの ASCII 可読なダンプを保持している。 動的結合されたものと固定 (preprogrammed)
1928 の両方の APP エントリを見ることができる。フォーマットは以下のとおり:
1929
1930 .nf
1931 .in 8n
1932 \f(CWIP address     HW type   Flags     HW address          Mask   Device
1933 192.168.0.50   0x1       0x2       00:50:BF:25:68:F3   *      eth0
1934 192.168.0.250  0x1       0xc       00:00:00:00:00:00   *      eth0\fP
1935 .fi
1936 .in
1937
1938 ここで IP address はマシンの IPv4 アドレス、 HW type はそのアドレスの RFC\ 826 で定められているハードウェアの形式、
1939 Flags は ARP 構造体 (\fI/usr/include/linux/if_arp.h\fP 内で定義されている) の内部フラグ、 HW
1940 address はその IP アドレスにマップされているデータリンク層のアドレス (もしわかっていれば) である。
1941 .TP 
1942 \fI/proc/net/dev\fP
1943 擬似ファイル dev はネットワークデバイスの状態情報を含んでいる。 これは送受信したパケット数、エラーとコリジョン (collision) の回数、
1944 その他の基本的な統計を与える。 これらは \fBifconfig\fP(8)  がデバイスの状態を報告するのに使われる。 フォーマットは以下のとおり:
1945
1946 .nf
1947 .in 1n
1948 \f(CWInter\-|   Receive                                                |  Transmit
1949  face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
1950     lo: 2776770   11307    0    0    0     0          0         0  2776770   11307    0    0    0     0       0          0
1951   eth0: 1215645    2751    0    0    0     0          0         0  1782404    4324    0    0    0   427       0          0
1952   ppp0: 1622270    5552    1    0    0     0          0         0   354130    5669    0    0    0     0       0          0
1953   tap0:    7714      81    0    0    0     0          0         0     7714      81    0    0    0     0       0          0\fP
1954 .in
1955 .fi
1956 .\" .TP
1957 .\" .I /proc/net/ipx
1958 .\" No information.
1959 .\" .TP
1960 .\" .I /proc/net/ipx_route
1961 .\" No information.
1962 .TP 
1963 \fI/proc/net/dev_mcast\fP
1964 \fI/usr/src/linux/net/core/dev_mcast.c\fP で定義されており、以下の形式である。
1965 .nf
1966 .in +5
1967 indx interface_name  dmi_u dmi_g dmi_address
1968 2    eth0            1     0     01005e000001
1969 3    eth1            1     0     01005e000001
1970 4    eth2            1     0     01005e000001
1971 .in
1972 .fi
1973 .TP 
1974 \fI/proc/net/igmp\fP
1975 Internet Group Management Protocol (インターネットグループ管理プロトコル)。
1976 \fI/usr/src/linux/net/core/igmp.c\fP で定義されている。
1977 .TP 
1978 \fI/proc/net/rarp\fP
1979 このファイルは \fIarp\fP と同じフォーマットで 逆アドレス解決サービス (reverse address lookup services)
1980 \fBrarp\fP(8)  に提供するために使われる現在の逆マップデータベースの内容を含んでいる。 RARP
1981 がカーネルコンフィグレーションに設定されていなければ、 このファイルは存在しない。
1982 .TP 
1983 \fI/proc/net/raw\fP
1984 .\" .TP
1985 .\" .I /proc/net/route
1986 .\" No information, but looks similar to
1987 .\" .BR route (8).
1988 RAW ソケットテーブルのダンプを保持している。 ほとんどの情報はデバッグ以外では
1989 使われない。 \&"sl" の値はソケットのカーネルハッシュスロット、
1990 \&"local_address" はローカルアドレスとプロトコル番号のペア
1991 [訳者追加: "rem_address" はリモートアドレスとプロトコル番号のペア]。
1992 \&"st" はソケットの内部状態。 \&"tx_queue" と "rx_queue" はカーネルメモリを
1993 消費している 送信/受信データキューのサイズ。 \&"tr" と "tm\->when" と
1994 "rexmits" フィールドは RAW では使われていない。
1995 \&"uid" フィールドはソケット生成者の実効 UID を保持している。
1996 .TP 
1997 \fI/proc/net/snmp\fP
1998 このファイルは SNMP エージェントが必要とする IP, ICMP, TCP, UDP 管理情報を ASCII データとして保持している。
1999 .TP 
2000 \fI/proc/net/tcp\fP
2001 TCP ソケットテーブルのダンプを保持している。 大部分の情報はデバッグ以外には
2002 使われない。 sl はソケットのカーネルハッシュスロットの値、 \&"local_address"
2003 はローカルアドレスとポート番号のペアである。 (ソケットが接続している場合は)
2004 \&"rem_address" はリモートアドレスとポート番号の対である。 \&"st" はソケット
2005 の内部状態である。 \&"tx_queue" と "rx_queue" はカーネルメモリを消費している
2006 送信/受信データキューのサイズ。 \&"tr" と "tm\->when" と "rexmits"
2007 フィールドはソケット状態のカーネル 内部情報を保持しているが、
2008 これらはデバッグのときにしか役に立たない。 \&"uid" フィールドはソケット
2009 生成者の実効 UID を保持している。
2010 .TP 
2011 \fI/proc/net/udp\fP
2012 UDP ソケットテーブルのダンプを保持している。 大部分の情報はデバッグ以外には
2013 使われない。 sl はソケットのカーネルハッシュスロットの値、 "local_address"
2014 はローカルアドレスとポート番号のペアである。 (ソケットが接続している場合は)
2015 "rem_address" はリモートアドレスとポート番号のペアである。 "st" はソケットの
2016 内部状態である。 "tx_queue" と "rx_queue" はカーネルメモリを消費している
2017 送信/受信データキューのサイズ。 "tr" と "tm\->when" と "rexmits"
2018 フィールドは UDP では使われていない。 "uid" フィールドはソケット生成者の
2019 実効 UID を保持している。 フォーマットは以下のとおり:
2020
2021 .nf
2022 .in 1n
2023 \f(CWsl  local_address rem_address   st tx_queue rx_queue tr rexmits  tm\->when uid
2024  1: 01642C89:0201 0C642C89:03FF 01 00000000:00000001 01:000071BA 00000000 0
2025  1: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 6F000100 0
2026  1: 00000000:0201 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0\fP
2027 .in
2028 .fi
2029 .TP 
2030 \fI/proc/net/unix\fP
2031 UNIX ドメインソケットのリスト。 フォーマットは以下のとおり:
2032 .nf
2033 .sp .5
2034 \f(CWNum RefCount Protocol Flags    Type St Path
2035  0: 00000002 00000000 00000000 0001 03
2036  1: 00000001 00000000 00010000 0001 01 /dev/printer\fP
2037 .sp .5
2038 .fi
2039
2040 ここで、Num はカーネルのテーブルスロット数、 RefCount はソケットを使用して
2041 いるユーザー数、 Protocol はいまのところいつも 0 で、Flags はソケットの状態
2042 を保持している カーネル内部のフラグである。 Type はいまのところいつも 1
2043 (UNIX ドメインのデータグラムソケットは、現在のカーネルではサポートされていない
2044 [訳注: 2.0.34 ではサポートされているようだ])。
2045 St はソケットの内部状態で、Path は(もしあれば) ソケットのパス名である。
2046 .TP 
2047 \fI/proc/net/netfilter/nfnetlink_queue\fP
2048 このファイルは netfilter ユーザー空間キューイングが使用されている場合 netfilter ユーザー空間キューイングの情報を表示する。
2049 各行が各キューの情報を表示する。 ユーザー空間で購読されていないキューは表示されない。
2050 .nf
2051
2052    1   4207     0  2 65535     0     0        0  1
2053   (1)   (2)    (3)(4)  (5)    (6)   (7)      (8)
2054 .fi
2055 .IP
2056 各行のフィールドは以下の通りである。
2057 .RS 7
2058 .TP  5
2059 (1)
2060 キューの ID。 これは \fBiptables\fP(8) NFQUEUE ターゲットの \fB\-\-queue\-num\fP や
2061 \fB\-\-queue\-balance\fP オプションで指定された値と一致する。 詳しい情報は \fBiptables\-extensions\fP(8) を参照。
2062 .TP 
2063 (2)
2064 キューを購読している netlink ポート ID。
2065 .TP 
2066 (3)
2067 現在キューに入っていてアプリケーションが処理するのを待っているパケット数。
2068 .TP 
2069 (4)
2070 キューのコピーモード。 値は 1 (メタデータのみ) か 2 (ペイロードデータもユーザー空間にコピーする) のいずれかである。
2071 .TP 
2072 (5)
2073 コピーする範囲。 つまり、 最大で何バイトのパケットペイロードをユーザー空間にコピーする必要があるかを示す。
2074 .TP 
2075 (6)
2076 キューでの破棄数。 すでに多数のパケットがユーザー空間が必ず必要な受け入れ/破棄の判定を送り返すのを待っていたため、
2077 カーネルがドロップする必要があったパケット数。
2078 .TP 
2079 (7)
2080 キューのユーザーでのドロップ数。 netlink サブシステム内で破棄されたパケット数。 このようなパケットの破棄が通常起こるのは、
2081 対応するソケットバッファが一杯の場合、 つまり、 ユーザー空間がメッセージを十分な速度で読み出せない場合である。
2082 .TP 
2083 (8)
2084 シーケンス番号。 キューに入ったすべてのパケットには 32 ビットの単調増加のシーケンス番号が関連付けられる。 これは一番最近キューに入ったパケットの
2085 ID となる。
2086 .RE
2087 .IP
2088 最後の数字は互換性のためだけに存在し、 常に 1 である。
2089 .TP 
2090 \fI/proc/partitions\fP
2091 各パーティションのメジャー番号とマイナー番号が書かれている。 さらに、 1024 バイトブロック数とパーティション名も書かれている。
2092 .TP 
2093 \fI/proc/pci\fP
2094 カーネルの初期化時に見つかったすべての PCI デバイスのリストと その設定。
2095
2096 .\" FIXME Document /proc/sched_debug
2097 .\"
2098 .\" .TP
2099 .\" .IR /proc/sched_debug " (since Linux 2.6.23)"
2100 .\" See also /proc/[pid]/sched
2101 このファイルは非推奨であり、新しい PCI 用の \fI/proc\fP インターフェイス (\fI/proc/bus/pci\fP)  を使うこと。
2102 このファイルは Linux 2.2 でオプションになった (カーネルのコンパイル時に \fBCONFIG_PCI_OLD_PROC\fP
2103 をセットすると利用可能であった)。 Linux 2.4 で再びオプションなしで有効に戻った。 さらに、Linux 2.6 で非推奨となり
2104 (\fBCONFIG_PCI_LEGACY_PROC\fP をセットするとまだ利用可能であった)、 最終的に Linux 2.6.17
2105 以降で完全に削除された。
2106 .TP 
2107 \fI/proc/profile\fP (Linux 2.4 以降)
2108 このファイルは、 カーネルが \fIprofile=1\fP コマンドラインオプションで起動された場合にのみ存在する。 このファイルは、
2109 カーネルのプロファイリング情報を \fBreadprofile\fP(1) を使って読み込めるバイナリ形式で公開する。 このファイルに
2110 (例えば、空の文字列を) 書き込むと、プロファイリングカウンターがリセットされる。 いくつかのアーキテクチャでは、 サイズ \fIsizeof(int)\fP
2111 のバイナリ整数である「プロファイリング倍率」を書き込むとプロファイリングの割り込み頻度を設定できる。
2112 .TP 
2113 \fI/proc/scsi\fP
2114 \fIscsi\fP 中間レベル擬似ファイルといくつかの SCSI 低レベルドライバの ディレクトリを含むディレクトリ。 これらのファイルは ASCII
2115 で表現されているので \fBcat\fP(1)  で読める。
2116
2117 いくつかのファイルは書き込み可能で、サブシステムの設定を変更したり、 特定の機能をオン/オフすることができる。
2118 .TP 
2119 \fI/proc/scsi/scsi\fP
2120 カーネルが知っているすべての SCSI デバイスのリスト。 このリストは起動時に (コンソールで) 見られるものとほぼ同じである。 scsi
2121 は現在のところ \fIadd\-single\-device\fP コマンドのみをサポートしている。 これによりルート (root)
2122 は既知のデバイスリストへ活線挿抜 (hotplugged)  デバイスを加えることができる。
2123
2124 次のコマンドを実行すると、
2125 .in +4n
2126 .nf
2127
2128 echo \(aqscsi add\-single\-device 1 0 5 0\(aq > /proc/scsi/scsi
2129
2130 .fi
2131 .in
2132 ホストアダプタ scsi1 は SCSI チャネル 0 で ID 5 LUN 0 のデバイスを探す。 もしこのアドレスに既知のデバイスがあるか、
2133 不正なアドレスであったならばエラーが返る。
2134 .TP 
2135 \fI/proc/scsi/[drivername]\fP
2136 いまのところ \fI[drivername]\fP は NCR53c7xx, aha152x, aha1542, aha1740, aic7xxx,
2137 buslogic, eata_dma, eata_pio, fdomain, in2000, pas16, qlogic, scsi_debug,
2138 seagate, t128, u15\-24f, ultrastore, wd7000 のどれかである。 少なくとも 1 つの SCSI
2139 ホストバスアダプタ (HBA) に ドライバが割り当てられていると、そのドライバに対応したディレクトリが現れる。 それぞれのディレクトリには、
2140 登録されたホストアダプタに対応してファイルが作られる。 このファイルの名前は、システムの初期化の際に ホストアダプタに割り当てられた番号になる。
2141
2142 これらのファイルを読めばドライバとホストアダプタの設定や 統計などを見ることができる。
2143
2144 これらのファイルへの書き込みはホストアダプタごとに異なる動作を引き起こす。 たとえば \fIlatency\fP と \fInolatency\fP
2145 コマンドを用いると、 ルート (root、スーパーユーザー) は eata_dma ドライバの隠し測定コードの オン/オフを切り替えることができる。
2146 また \fI lockup\fP と \fIunlock\fP コマンドを用いると、ルートは scsi_debug ドライバがシミュレートするバスロックアップ
2147 (bus lockup) を 制御することができる。
2148 .TP 
2149 \fI/proc/self\fP
2150 このディレクトリはプロセスに (プロセス自身の)  \fI/proc\fP ファイルシステムへのアクセスを参照させる。 これは \fI/proc\fP 内の
2151 (このプロセスの) プロセス ID が名前となっている ディレクトリと全く同一である。
2152 .TP 
2153 \fI/proc/slabinfo\fP
2154 Linux 2.6.16 以降では、 カーネル設定オプション \fBCONFIG_SLAB\fP が有効の場合にのみ、このファイルは存在する。
2155 カーネルキャッシュの情報。 \fI/proc/slabinfo\fP のフィールドは以下のとおり。
2156 .in +4n
2157 .nf
2158
2159 cache\-name
2160 num\-active\-objs
2161 total\-objs
2162 object\-size
2163 num\-active\-slabs
2164 total\-slabs
2165 num\-pages\-per\-slab
2166 .fi
2167 .in
2168
2169 詳細は \fBslabinfo\fP(5)  を参照すること。
2170 .TP 
2171 \fI/proc/stat\fP
2172 カーネル/システムの統計。 アーキテクチャによって異なる。 共通エントリには以下のものが含まれる。
2173 .RS
2174 .TP 
2175 \fIcpu  3357 0 4313 1362393\fP
2176 .\" 1024 on Alpha and ia64
2177 各種状態で消費された時間の合計値。 時間は USER_HZ を単位として計測される (ほとんどのアーキテクチャでは USER_HZ は 1/100
2178 秒で、 正しい値は \fIsysconf(_SC_CLK_TCK)\fP を使って取得できる)。
2179 .RS
2180 .TP 
2181 \fIuser\fP
2182 (1) ユーザーモードで消費した時間。
2183 .TP 
2184 \fInice\fP
2185 (2) 低い優先度 (nice) のユーザーモードで消費した時間。
2186 .TP 
2187 \fIsystem\fP
2188 (3) システムモードで消費した時間。
2189 .TP 
2190 \fIidle\fP
2191 .\" FIXME . Actually, the following info about the /proc/stat 'cpu' field
2192 .\"       does not seem to be quite right (at least in 2.6.12 or 3.6):
2193 .\"       the idle time in /proc/uptime does not quite match this value
2194 (4)  タスク待ち (idle task) で消費した時間。 この値は擬似ファイル \fI/proc/uptime\fP の 2 番目のエントリの値を
2195 USER_HZ 倍した値になるはずである。
2196 .TP 
2197 \fIiowait\fP (Linux 2.5.41 以降)
2198 (5) I/O の完了待ちの時間。
2199 .TP 
2200 \fIirq\fP (Linux 2.6.0\-test4 以降)
2201 (6) 割り込みの処理に使った時間。
2202 .TP 
2203 \fIsoftirq\fP (Linux 2.6.0\-test4 以降)
2204 (7) ソフト割り込みの処理に使った時間。
2205 .TP 
2206 \fIsteal\fP (Linux 2.6.11 以降)
2207 (8) 盗まれた時間 (stolen time)。仮想化環境での動作時に他のオペレーティングシステムにより消費された時間である。
2208 .TP 
2209 \fIguest\fP (Linux 2.6.24 以降)
2210 .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
2211 (9) Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU の 実行に消費された時間。
2212 .TP 
2213 \fIguest_nice\fP (Linux 2.6.33 以降)
2214 .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
2215 (10) nice が適用されたゲスト (Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU) の 実行に消費された時間。
2216 .RE
2217 .TP 
2218 \fIpage 5741 1808\fP
2219 システムが (ディスクから) ページイン/ページアウトしたページ数。
2220 .TP 
2221 \fIswap 1 0\fP
2222 スワップイン/スワップアウトされたページ数。
2223 .TP 
2224 .\" FIXME . The following is not the full picture for the 'intr' of
2225 .\"       /proc/stat on 2.6:
2226 \fIintr 1462898\fP
2227 この行はシステム起動時以降に処理された割り込みの回数を示す。 最初の欄は処理された割り込み全ての合計であり、
2228 これには番号が割り振られていないアーキテクチャー固有の割り込みも含まれる。 それ以降の欄はそれぞれ番号が割り振られた割り込みについての合計である。
2229 番号が割り振られていない割り込みは表示されず、 全体の合計にのみ加算される。
2230 .TP 
2231 \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
2232 (メジャー番号, ディスクインデックス番号):(情報なし (noinfo), 読み込み回数, 読み込みブロック数, 書き出し回数, 書き出しブロック数)
2233 .br
2234 (Linux 2.4 のみ)
2235 .TP 
2236 \fIctxt 115315\fP
2237 コンテクスト・スイッチの延べ回数。
2238 .TP 
2239 \fIbtime 769041601\fP
2240 起動時刻、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。
2241 .TP 
2242 \fIprocesses 86031\fP
2243 システム起動時からの延べフォーク (fork) 数。
2244 .TP 
2245 \fIprocs_running 6\fP
2246 実行中状態のプロセス数 (Linux 2.5.45 以降)。
2247 .TP 
2248 \fIprocs_blocked 2\fP
2249 I/O 完了待ちで停止 (blocked) しているプロセス数 (Linux 2.5.45 以降)。
2250 .RE
2251 .TP 
2252 \fI/proc/swaps\fP
2253 使用中のスワップ領域。 \fBswapon\fP(8)  も参照すること。
2254 .TP 
2255 \fI/proc/sys\fP
2256 このディレクトリ (1.3.57 以降に存在) はカーネル変数に対応するいくつかの
2257 ファイルとサブディレクトリを含む。 これらの変数は読み出し可能である。
2258 また場合によっては \fI/proc\fP ファイルシステムや、 (非推奨の) システムコール
2259 \fBsysctl\fP(2) を用いて書き換えることもできる。
2260 .TP 
2261 \fI/proc/sys/abi\fP (Linux 2.4.10 以降)
2262 .\" On some systems, it is not present.
2263 このディレクトリにはアプリケーションのバイナリ情報が入ったファイルが置かれる。 更に詳しい情報は、 Linux カーネルソースファイル
2264 \fIDocumentation/sysctl/abi.txt\fP を参照すること。
2265 .TP 
2266 \fI/proc/sys/debug\fP
2267 このディレクトリは空の場合もある。
2268 .TP 
2269 \fI/proc/sys/dev\fP
2270 このディレクトリにはデバイス特有の情報 (たとえば \fIdev/cdrom/info\fP)  が含まれる。
2271 このディレクトリが空になっているシステムもある。
2272 .TP 
2273 \fI/proc/sys/fs\fP
2274 このディレクトリには、ファイルシステムに関連するカーネル変数用の
2275 ディレクトリとサブディレクトリが含まれる。
2276 .TP 
2277 \fI/proc/sys/fs/binfmt_misc\fP
2278 このディレクトリ以下のファイルについてのドキュメントは、 Linux カーネルソースの \fIDocumentation/binfmt_misc.txt\fP
2279 にある。
2280 .TP 
2281 \fI/proc/sys/fs/dentry\-state\fP (Linux 2.2 以降)
2282 このファイルには、ディレクトリキャッシュ (dcache) の状態に関する情報が 入っている。ファイルには、 \fInr_dentry\fP,
2283 \fInr_unused\fP, \fIage_limit\fP (秒単位の age), \fIwant_pages\fP (システムがリクエストしたページ数),
2284 ダミーの 2 つの値、 という 6 つの数字が書かれている。
2285 .RS
2286 .IP * 2
2287 \fInr_dentry\fP は割り当てられた dentry (dcache エントリ) の数である。 このフィールドは Linux 2.2
2288 では使用されない。
2289 .IP *
2290 \fInr_unused\fP は未使用の dentry 数である。
2291 .IP *
2292 .\" looks like this is unused in kernels 2.2 to 2.6
2293 \fIage_limit\fP は、メモリが不足している場合に次に dcache entry を再要求できるように なるまでの残り時間 (秒数) である。
2294 .IP *
2295 .\" looks like this is unused in kernels 2.2 to 2.6
2296 \fIwant_pages\fP は、カーネルが shrink_dcache_pages() を呼び出したが dcache がまだ縮小されていない場合に、0
2297 以外の値となる。
2298 .RE
2299 .TP 
2300 \fI/proc/sys/fs/dir\-notify\-enable\fP
2301 このファイルは \fBfcntl\fP(2)  に記述されている \fIdnotify\fP インターフェースをシステム全体で無効にしたり有効にしたりする。
2302 このファイルに値 0 が書かれている場合はインターフェースが無効になり、 値 1 の場合は有効になる。
2303 .TP 
2304 \fI/proc/sys/fs/dquot\-max\fP
2305 このファイルにはキャッシュされるディスク quota エントリの最大数が書かれている。 (2.4 系の)
2306 システムの中には、このファイルが存在しないものもある。 キャッシュされるディスク quota エントリの空きが非常に少なく、
2307 とても多くのシステムユーザーが同時に存在する場合、 この制限を上げるといいかもしれない。
2308 .TP 
2309 \fI/proc/sys/fs/dquot\-nr\fP
2310 このファイルには割り当てられているディスク quota のエントリ数と、 空いているディスク quota のエントリ数が書かれている。
2311 .TP 
2312 \fI/proc/sys/fs/epoll\fP (Linux 2.6.28 以降)
2313 このディレクトリには、ファイル \fImax_user_watches\fP がある。 これらは、 \fIepoll\fP
2314 インタフェースが消費するカーネルメモリ量を制限するのに使用できる。 詳細は \fBepoll\fP(7)  を参照。
2315 .TP 
2316 \fI/proc/sys/fs/file\-max\fP
2317 このファイルは、 システム全体でプロセスがオープンできるファイル数の上限を定義する (\fBsetrlimit\fP(2) も参照;
2318 \fBsetrlimit\fP(2) を使うと、 オープンできるファイル数のプロセス毎の上限 \fBRLIMIT_NOFILE\fP を設定できる)。
2319 ファイルハンドルを使い果たしたというエラーメッセージ ("VFS: file\-max limit <number> reached"
2320 を探すとよい) がカーネルログに大量に出る場合は、以下のようにこの値を増加させてみるとよい。
2321 .br
2322
2323 .br
2324 .nf
2325 \f(CW    echo 100000 > /proc/sys/fs/file\-max\fP
2326 .fi
2327
2328 \fIfile\-max\fP に書かれている値は、カーネル定数 \fBNR_OPEN\fP に制限される。
2329
2330 特権プロセス (\fBCAP_SYS_ADMIN\fP) は \fIfile\-max\fP 上限を上書きできる。
2331 .TP 
2332 \fI/proc/sys/fs/file\-nr\fP
2333 This (read\-only) file contains three numbers: the number of allocated file
2334 handles (i.e., the number of files presently opened); the number of free
2335 file handles; and the maximum number of file handles (i.e., the same value
2336 as \fI/proc/sys/fs/file\-max\fP).  If the number of allocated file handles is
2337 close to the maximum, you should consider increasing the maximum.  Before
2338 Linux 2.6, the kernel allocated file handles dynamically, but it didn't free
2339 them again.  Instead the free file handles were kept in a list for
2340 reallocation; the "free file handles" value indicates the size of that
2341 list.  A large number of free file handles indicates that there was a past
2342 peak in the usage of open file handles.  Since Linux 2.6, the kernel does
2343 deallocate freed file handles, and the "free file handles" value is always
2344 zero.
2345 .TP 
2346 \fI/proc/sys/fs/inode\-max\fP (Linux 2.2 までにのみ存在)
2347 このファイルには、メモリ内 inode の最大値が書かれている。 この値は \fIfile\-max\fP の値の 3\-4 倍にすべきである。 これは
2348 \fIstdin\fP, \fIstdout\fP, ネットワークソケットを扱うにも inode が必要なためである。 日常的に inode
2349 を使い果たしている場合は、この値を増やす必要がある。
2350
2351 Linux 2.4 以降では、 inode 数の静的な上限はなくなり、 このファイルは削除された。
2352 .TP 
2353 \fI/proc/sys/fs/inode\-nr\fP
2354 このファイルには、 \fIinode\-state\fP の最初の 2 つの値が書かれている。
2355 .TP 
2356 \fI/proc/sys/fs/inode\-state\fP
2357 このファイルには 7 つの数字が入っている。 \fInr_inodes\fP, \fInr_free_inodes\fP, \fIpreshrink\fP と 4
2358 つのダミーの値 (常に 0) である。
2359
2360 .\" This can be slightly more than
2361 .\" .I inode-max
2362 .\" because Linux allocates them one page full at a time.
2363 \fInr_inodes\fP はシステムが割り当て済みの inode 数である。 \fInr_free_inodes\fP は未使用の inode 数である。
2364
2365 \fIpreshrink\fP は、 \fInr_inodes\fP > \fIinode\-max\fP で、 システムがさらに inode
2366 を割り当てるのではなく inode リストを刈り取る (余分なものを回収する) 必要がある場合に、 0 以外になる。 Linux 2.4 以降では、
2367 このフィールドはダミーの値 (常に 0) である。
2368 .TP 
2369 \fI/proc/sys/fs/inotify\fP (Linux 2.6.13 以降)
2370 このディレクトリには、ファイル \fImax_queued_events\fP, \fImax_user_instances\fP, and
2371 \fImax_user_watches\fP がある。これらは、 \fIinotify\fP インタフェースが消費するカーネルメモリ量を制限するのに利用できる。
2372 詳細は \fBinotify\fP(7)  を参照。
2373 .TP 
2374 \fI/proc/sys/fs/lease\-break\-time\fP
2375 このファイルは、ファイルを保持しているプロセスに対して カーネルがシグナルを送り、
2376 他のプロセスがそのファイルをオープンするのを待っていることを通知してから、 そのプロセスに対してカーネルがファイルのリース (lease, 貸し出し)
2377 (\fBfcntl\fP(2)  を参照) を許す猶予期間を指定する。 リースホルダ (lease holder: ファイルの貸し出しを受けているプロセス)
2378 が 猶予期間中にリースを削除するか階級を低くしない場合、 カーネルはファイルのリースを強制的に止める。
2379 .TP 
2380 \fI/proc/sys/fs/leases\-enable\fP
2381 このファイルはシステム全体でのファイルリース (\fBfcntl\fP(2)  を参照) を有効または無効にする。 ファイルに値 0
2382 が書き込まれている場合、リースは無効である。 0 以外の場合にはリースは有効である。
2383 .TP 
2384 \fI/proc/sys/fs/mqueue\fP (Linux 2.6.6 以降)
2385 このディレクトリにはファイル \fImsg_max\fP, \fImsgsize_max\fP, and \fIqueues_max\fP がある。これらは POSIX
2386 メッセージキューで使用されるリソースの 制御を行う。 詳細は \fBmq_overview\fP(7)  を参照。
2387 .TP 
2388 \fI/proc/sys/fs/overflowgid\fP と \fI/proc/sys/fs/overflowuid\fP
2389 これらのファイルにより、ユーザーは固定 UID と固定 GID の値を変更できる。 デフォルトは 65534 である。 Linux の UID と
2390 GID は 32 ビットであるが、 16 ビットの UID と GID しかサポートしないファイルシステムもある。
2391 このようなファイルシステムが書き込みを許可してマウントされた場合、 65535 を超える UID と GID は、
2392 ディスクに書き込まれる前にオーバーフロー値に変換される。
2393 .TP 
2394 \fI/proc/sys/fs/pipe\-max\-size\fP (Linux 2.6.35 以降)
2395 このファイルの値により、 \fBfcntl\fP(2) の \fBF_SETPIPE_SZ\fP 操作で増やすことができるパイプ容量の上限値が定義される。
2396 この上限は非特権プロセスにのみ適用される。 このファイルのデフォルト値は 1,048,576 である。 このファイルに設定した値は切り上げられて、
2397 実装側で利用するのに都合のよい値に変更される場合がある。 切り上げられた値を確認するには、 値を設定した後でこのファイルの内容を表示すればよい。
2398 このファイルに設定できる最小値はシステムのページサイズである。
2399 .TP 
2400 \fI/proc/sys/fs/protected_hardlinks\fP (Linux 3.6 以降)
2401 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
2402 このファイルの値が 0 の場合、 ハードリンクの作成には何の制限も適用されない (すなわち、 Linux 3.6 より前の伝統的な動作である)。
2403 このファイルの値が 1 の場合、以下の条件のいずれか一つが成立する場合にのみ、 リンク先のファイルへのハードリンクが作成できる。
2404 .RS
2405 .IP * 3
2406 呼び出し元が \fBCAP_FOWNER\fP ケーパビリティを持っている。
2407 .IP *
2408 そのリンクを作成中のプロセスのファイルシステム UID が、 リンク先ファイルの所有者 (UID) と一致する (\fBcredentials\fP(7)
2409 に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。
2410 .IP *
2411 以下の条件が全て成立する。
2412 .RS 4
2413 .IP \(bu 3
2414 リンク先が通常のファイルである。
2415 .IP \(bu
2416 リンク先ファイルで set\-user\-ID 許可ビットが有効になっていない。
2417 .IP \(bu
2418 リンク先ファイルで、 許可ビット set\-group\-ID と group\-executable が同時に有効になっていない。
2419 .IP \(bu
2420 呼び出し元は、 リンク先ファイルの読み出し、書き込み許可を持っている
2421 (ファイルの許可マスクで許可されているか、適切なケーパビリティを持っているかは問わない)。
2422 .RE
2423 .RE
2424 .IP
2425 The default value in this file is 0.  Setting the value to 1 prevents a
2426 longstanding class of security issues caused by hard\-link\-based
2427 time\-of\-check, time\-of\-use races, most commonly seen in world\-writable
2428 directories such as \fI/tmp\fP.  The common method of exploiting this flaw is
2429 to cross privilege boundaries when following a given hard link (i.e., a root
2430 process follows a hard link created by another user).  Additionally, on
2431 systems without separated partitions, this stops unauthorized users from
2432 "pinning" vulnerable set\-user\-ID and set\-group\-ID files against being
2433 upgraded by the administrator, or linking to special files.
2434 .TP 
2435 \fI/proc/sys/fs/protected_symlinks\fP (Linux 3.6 以降)
2436 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
2437 このファイルの値が 0 の場合、 以下のシンボリックリンクを辿る際に何の制限も適用されない (すなわち、 Linux 3.6
2438 より前の伝統的な動作である)。 このファイルの値が 1 の場合、 以下の状況においてのみシンボリックリンクが辿られる。
2439 .RS
2440 .IP * 3
2441 そのリンクを辿っているプロセスのファイルシステム UID が、 シンボリックリンクの所有者 (UID) と一致する (\fBcredentials\fP(7)
2442 に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。
2443 .IP *
2444 そのリンクが world\-writable の sticky ビットがセットされたディレクトリではない。
2445 .IP *
2446 シンボリックリンクとその親ディレクトリが同じ所有者 (UID) である。
2447 .RE
2448 .IP
2449 システムコールが上記の制約によりシンボリックリンクを辿れなかった場合は、 \fIerrno\fP にエラー \fBEACCES\fP が設定される。
2450 .IP
2451 The default value in this file is 0.  Setting the value to 1 avoids a
2452 longstanding class of security issues based on time\-of\-check, time\-of\-use
2453 races when accessing symbolic links.
2454 .TP 
2455 \fI/proc/sys/fs/suid_dumpable\fP (Linux 2.6.13 以降)
2456 .\" The following is based on text from Documentation/sysctl/kernel.txt
2457 このファイルの値により、set\-user\-ID されたバイナリや、 保護がかかった (protected) バイナリ / tainted な
2458 (汚染された; ライセンスがカーネルと適合しない) バイナリに対して、コアダンプファイルを 生成するかどうかが決定される。 以下の
2459 3つの値を指定することができる:
2460 .RS
2461 .TP 
2462 \fI0\ (default)\fP
2463 この値を指定すると、以前と同じ (Linux 2.6.13 より前の) 動作をする。 (\fBseteuid\fP(2), \fBsetgid\fP(2)
2464 などを呼び出すことや、set\-user\-ID や set\-group\-ID されたプログラムを 実行することで) 資格情報 (credentials)
2465 が変更されているプロセスや、 プロセスの実行バイナリの読み出し許可がないプロセスに対して、 コアダンプを生成しない。
2466 .TP 
2467 \fI1\ ("debug")\fP
2468 すべてのプロセスで、可能であればコアダンプを行う。 コアダンプファイルの所有者は、ダンプを行うプロセスのファイルシステム UID
2469 となり、セキュリティ上の考慮は行われない。 この値は、システムデバッグの場面だけを想定して設けられている。 ptrace のチェックも行われない。
2470 .TP 
2471 \fI2\ ("suidsafe")\fP
2472 通常はダンプされないようなバイナリ (上記の "0" 参照) を root だけが読み出し可能な形でダンプする。
2473 この場合、ユーザはそのコアダンプファイルを削除することはできるが、 読むことはできない。 セキュリティ上の理由から、このモードのコアダンプでは、
2474 既存のダンプファイルや他のファイルを上書きすることはない。 このモードは、管理者が通常の環境で問題を解析しようとする際に 適している。
2475 .IP
2476 .\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709
2477 .\" 54b501992dd2a839e94e76aa392c392b55080ce8
2478 さらに、 Linux 3.6 以降では、 \fI/proc/sys/kernel/core_pattern\fP
2479 は絶対パス名かパイプコマンドでなければならない。 \fBcore\fP(5) に詳しい説明がある。 \fIcore_pattern\fP
2480 がこれらのルールに合致しない場合は、 警告がカーネルログに書き込まれ、 コアダンプは生成されない。
2481 .RE
2482 .TP 
2483 このファイルはスーパブロックの値を制御する。
2484 この値はカーネルがマウントできるファイルシステムの最大値になる。 現在、 \fIsuper\-max\fP で許可されているファイルシステム数以上に
2485 マウントする必要がある場合は、この値を増加させるだけでよい。
2486 .TP 
2487 \fI/proc/sys/fs/super\-nr\fP
2488 このファイルには現在マウントされているファイルシステム数が書かれている。
2489 .TP 
2490 \fI/proc/sys/kernel\fP
2491 このディレクトリには、以下で説明する様々なカーネルパラメータを 制御するためのファイルが配置されている。
2492 .TP 
2493 \fI/proc/sys/kernel/acct\fP
2494 このファイルには 3 つの値が含まれている: \fIhighwater\fP, \fIlowwater\fP, \fIfrequency\fP である。
2495 BSD\-style process accounting が有効になっている場合、 これら 3 つの値が動作を制御する。
2496 ログファイルのあるファイルシステムの空き領域が \fIlowwater\fP パーセント以下になった場合は、ログ記録を一時停止する。 空き領域が
2497 \fIhighwater\fP パーセント以上になった場合に、ログ記録を再開する。 \fIfrequency\fP はカーネルが空き領域のチェックをする頻度である
2498 (単位は秒)。 デフォルトの値は、4, 2, 30 である。 つまり、空き領域が 2% 以下になるとログ記録を一時停止し、 空き領域が 4%
2499 以上となったときに再開する。 空き領域についての情報は 30 秒間有効である点に注意すること。
2500 .TP 
2501 \fI/proc/sys/kernel/cap_last_cap\fP (Linux 3.2 以降)
2502 \fBcapabilities\fP(7) 参照。
2503 .TP 
2504 \fI/proc/sys/kernel/cap\-bound\fP (Linux 2.2 to 2.6.24 以降)
2505 \fI/proc/sys/kernel/cap\-bound\fP このファイルにはカーネルの \fIcapability bounding set\fP (符号付き
2506 10 進数表現) の値が書かれている。 \fBexecve\fP(2)  中は、このセットとプロセスに許可されている権限の AND がとられる。 Linux
2507 2.6.25 以降では、システム全体のケーパビリティバウンディングセットは なくなり、スレッド単位のバウンディングセットに置き換えられた。
2508 \fBcapabilities\fP(7)  を参照。
2509 .TP 
2510 \fI/proc/sys/kernel/core_pattern\fP
2511 \fBcore\fP(5)  参照。
2512 .TP 
2513 \fI/proc/sys/kernel/core_uses_pid\fP
2514 \fBcore\fP(5)  参照。
2515 .TP 
2516 \fI/proc/sys/kernel/ctrl\-alt\-del\fP
2517 このファイルはキーボードの Ctrl\-Alt\-Del の扱いを制御する。 このファイルにある値が 0 の場合、 Ctrl\-Alt\-Del が捕捉されると
2518 \fBinit\fP(1)  プログラムに送られて、正しく再起動される。 値が 0 より大きい場合、Vulcan Nerve Pinch (tm)
2519 に反応して、 Linux はダーティバッファを同期させることなく、すぐに再起動を行う。 注意: プログラム (dosemu など) に "raw"
2520 モードのキーボードがある場合、 ctrl\-alt\-del はカーネルの tty レイヤーに到達する前に プログラムに遮断され、
2521 プログラムに送られてどのように扱うかが決められる。
2522 .TP 
2523 \fI/proc/sys/kernel/dmesg_restrict\fP (Linux 2.6.37 以降)
2524 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
2525 このファイルの値により誰がカーネル syslog の内容を参照できるかが決定される。 このファイルの値が 0 であれば、制限はなくなる。 値が 1
2526 であれば、 特権ユーザーだけがカーネル syslog を読み出すことができる
2527 (詳細は \fBsyslog\fP(2) を参照)。 Linux 3.4 以降では \fBCAP_SYS_ADMIN\fP
2528 ケーパビリティを持ったユーザーだけがこのファイルの値を変更できる。
2529 .TP 
2530 \fI/proc/sys/kernel/domainname\fP と \fI/proc/sys/kernel/hostname\fP
2531 これらのファイルは、コマンド \fBdomainname\fP(1), \fBhostname\fP(1)  と全く同じ方法で、 マシンの NIS/YP
2532 ドメイン名とホスト名の設定に使える。 すなわち
2533
2534 .in +4n
2535 .nf
2536 #\fB echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname\fP
2537 #\fB echo \(aqmydomain\(aq > /proc/sys/kernel/domainname\fP
2538 .fi
2539 .in
2540
2541 は、以下と同じ効果がある。
2542
2543 .in +4n
2544 .nf
2545 #\fB hostname \(aqdarkstar\(aq\fP
2546 #\fB domainname \(aqmydomain\(aq\fP
2547 .fi
2548 .in
2549
2550 注意: 典型的な darkstar.frop.org という名前には、 ホスト名 "darkstar" と DNS (Internet Domain
2551 Name Server)  ドメイン名 "frop.org" が含まれているが、DNS ドメイン名と NIS (Network Information
2552 Service) または YP (Yellow Pages) のドメイン名を混同してはならない。 一般にこれら 2 つのドメイン名は異なる。
2553 詳細な議論は、 \fBhostname\fP(1)  の man ページを参照すること。
2554 .TP 
2555 \fI/proc/sys/kernel/hotplug\fP
2556 このファイルはホットプラグ・ポリシー・エージェントのパスが書かれている。 このファイルのデフォルト値は \fI/sbin/hotplug\fP である。
2557 .TP 
2558 \fI/proc/sys/kernel/htab\-reclaim\fP
2559 (PowerPC のみ) このファイルを 0 以外の値に設定すると、 PowerPC htab (カーネルソースファイル
2560 \fIDocumentation/powerpc/ppc_htab.txt\fP 参照) を、システムがアイドルループになるたびに切り詰める。
2561 .TP 
2562 \fI/proc/sys/kernel/kptr_restrict\fP (Linux 2.6.38 以降)
2563 .\" 455cd5ab305c90ffc422dd2e0fb634730942b257
2564 .\" commit 411f05f123cbd7f8aa1edcae86970755a6e2a9d9
2565 .\" commit 620f6e8e855d6d447688a5f67a4e176944a084e8
2566 The value in this file determines whether kernel addresses are exposed via
2567 \fI/proc\fP files and other interfaces.  A value of 0 in this file imposes no
2568 restrictions.  If the value is 1, kernel pointers printed using the \fI%pK\fP
2569 format specifier will be replaced with zeros unless the user has the
2570 \fBCAP_SYSLOG\fP capability.  If the value is 2, kernel pointers printed using
2571 the \fI%pK\fP format specifier will be replaced with zeros regardless of the
2572 user's capabilities.  The initial default value for this file was 1, but the
2573 default was changed to 0 in Linux 2.6.39.  Since Linux 3.4, only users with
2574 the \fBCAP_SYS_ADMIN\fP capability can change the value in this file.
2575 .TP 
2576 \fI/proc/sys/kernel/l2cr\fP
2577 (PowerPC のみ) このファイルには G3 プロセッサボードの L2 キャッシュを制御するフラグが含まれる。 0 の場合、キャッシュは無効になる。
2578 0 以外の場合は有効になる。
2579 .TP 
2580 \fI/proc/sys/kernel/modprobe\fP
2581 このファイルには、カーネルモジュールローダへのパスが含まれる。 デフォルトの値は \fI/sbin/modprobe\fP
2582 である。このファイルは、\fBCONFIG_MODULES\fP オプション (Linux 2.6.26 以前では \fBCONFIG_KMOD\fP)
2583 を有効にしてカーネルが作成されている場合にのみ存在する。 このファイルについては、Linux カーネルソースファイル
2584 \fIDocumentation/kmod.txt\fP (カーネル 2.4 以前のみに存在) に記述されている。
2585 .TP 
2586 \fI/proc/sys/kernel/modules_disabled\fP (Linux 2.6.31 以降)
2587 .\" 3d43321b7015387cfebbe26436d0e9d299162ea1
2588 .\" From Documentation/sysctl/kernel.txt
2589 他のモジュールが有効になったカーネルへのモジュールのロードが許可されるかを示すオン・オフ値である。 デフォルト値はオフ (0) だが、 オン (1)
2590 に設定することができる。 一度オンにすると、 モジュールをロードすることもアンロードすることもできなくなり、 この値をオフに戻すこともできない。
2591 このファイルが存在するのは、 カーネルが \fBCONFIG_MODULES\fP オプションを有効にしてコンパイルされている場合だけである。
2592 .TP 
2593 \fI/proc/sys/kernel/msgmax\fP (Linux 2.2 以降)
2594 このファイルは、System V メッセージキューに書き込まれる 1 つのメッセージの 最大バイト数を、システム全体で制限する。
2595 .TP 
2596 \fI/proc/sys/kernel/msgmni\fP (Linux 2.4 以降)
2597 このファイルはメッセージキュー識別子の最大数をシステム全体で制限する。
2598 .TP 
2599 \fI/proc/sys/kernel/msgmnb\fP (Linux 2.2 以降)
2600 このファイルは、 \fImsg_qbytes\fP の設定を初期化するシステム全体のパラメータで
2601 ある。 \fImsg_qbytes\fP は以降で作成されるメッセージキューで使われる。
2602 \fImsg_qbytes\fP 設定では、メッセージキューに書き込まれる最大バイト数を指定する。
2603 .TP 
2604 \fI/proc/sys/kernel/ngroups_max\fP (Linux 2.6.4 以降)
2605 このファイルは、プロセスグループのメンバー数の上限値を表示する読み出し専用のファイルである。
2606 .TP 
2607 \fI/proc/sys/kernel/ostype\fP と \fI/proc/sys/kernel/osrelease\fP
2608 これらのファイルは文字列 \fI/proc/version\fP の各部分を与える。
2609 .TP 
2610 \fI/proc/sys/kernel/overflowgid\fP と \fI/proc/sys/kernel/overflowuid\fP
2611 これらのファイルは \fI/proc/sys/fs/overflowgid\fP と \fI/proc/sys/fs/overflowuid\fP
2612 を複製したものである。
2613 .TP 
2614 \fI/proc/sys/kernel/panic\fP
2615 このファイルはカーネル変数 \fIpanic_timeout\fP への読み出しと書き込みのアクセスを与える。 この値が 0 ならば、パニック時にカーネルは
2616 (無限) ループに入る。 0 でなければ、その秒数だけ待ってから自動的に再起動する。 ソフトウェア watchdog ドライバを使っている場合、
2617 推奨される設定は 60 である。
2618 .TP 
2619 \fI/proc/sys/kernel/panic_on_oops\fP (Linux 2.5.68 以降)
2620 このファイルは、oops や BUG が起こった場合のカーネルの動作を制御する。 ファイルに 0 が書かれている場合、システムは操作を続行しようとする。
2621 1 が書かれている場合、システムは (klogd が oops 出力を記録する時間を与えるために) 数秒間遅延した後、 panic を起こす。
2622 \fI/proc/sys/kernel/panic\fP ファイルも 0 でない場合、マシンは再起動される。
2623 .TP 
2624 \fI/proc/sys/kernel/pid_max\fP (Linux 2.5.34 以降)
2625 .\" Prior to 2.6.10, pid_max could also be raised above 32768 on 32-bit
2626 .\" platforms, but this broke /proc/[pid]
2627 .\" See http://marc.theaimsgroup.com/?l=linux-kernel&m=109513010926152&w=2
2628 このファイルは、PID をいくつで終了にするかを指定する (すなわち、このファイルの値は最大 PID より 1 大きい)。 この値より大きな PID
2629 値は割り当てられない。 したがって、このファイルの値はプロセスやスレッドの全体数のシステム全体での上限としても機能する。 このファイルのデフォルト値は
2630 32768 であり、 その場合には以前のカーネルと同じ PID の範囲になる。 32ビットのプラットフォームでは、 \fIpid_max\fP の最大値は
2631 32768 である。 64ビットのプラットフォームでは、 2^22 (\fBPID_MAX_LIMIT\fP, 約 4,000,000)
2632 までの任意の値を設定できる。
2633 .TP 
2634 \fI/proc/sys/kernel/powersave\-nap\fP (PowerPC のみ)
2635 このファイルにはフラグが書かれている。 フラグが設定されると、Linux\-PPC は 省電力の "nap" モードを使う。
2636 設定されない場合は、"doze" モードが使われる。
2637 .TP 
2638 \fI/proc/sys/kernel/printk\fP
2639 \fBsyslog\fP(2) 参照。
2640 .TP 
2641 \fI/proc/sys/kernel/pty\fP (Linux 2.6.4 以降)
2642 このディレクトリは、UNIX 98 疑似端末 (\fBpts\fP(4) を参照) の数に関連する
2643 2 つのファイルを含む。
2644 .TP 
2645 \fI/proc/sys/kernel/pty/max\fP
2646 このファイルは疑似端末の最大数を定義する。
2647 .TP 
2648 \fI/proc/sys/kernel/pty/nr\fP
2649 この読み出し専用のファイルは、現在いくつの疑似端末が使われているかを表す。
2650 .TP 
2651 \fI/proc/sys/kernel/random\fP
2652 このディレクトリは、ファイル \fI/dev/random\fP の操作を制御する様々なパラメータが書かれている。 詳細は \fBrandom\fP(4)
2653 を参照。
2654 .TP 
2655 \fI/proc/sys/kernel/random/uuid\fP (Linux 2.4 以降)
2656 この読み出し専用のファイルから読み出しを行うごとに、 ランダムに生成した 128 ビットの UUID を、 標準の UUID 形式の文字列として返す。
2657 .TP 
2658 \fI/proc/sys/kernel/real\-root\-dev\fP
2659 このファイルは Linux カーネルソースファイル \fIDocumentation/initrd.txt\fP に記述されている。
2660 .TP 
2661 \fI/proc/sys/kernel/reboot\-cmd\fP (Sparc のみ) 
2662 このファイルは SPARC ROM/Flash ブートローダに引き数を渡す方法を 提供しているように思われる。
2663 再起動後に何をするかを指定しているのだろうか?
2664 .TP 
2665 \fI/proc/sys/kernel/rtsig\-max\fP
2666 (2.6.7 までのカーネルにのみ存在する。 \fBsetrlimit\fP(2)  を参照すること)  このファイルはシステムで発行される POSIX
2667 real\-time (queued) signal の 最大数を調整するのに使用される。
2668 .TP 
2669 \fI/proc/sys/kernel/rtsig\-nr\fP
2670 (2.6.7 までのカーネルにのみ存在する)  このファイルは現在キューに入っている POSIX real\-time signal の数を表す。
2671 .TP 
2672 \fI/proc/sys/kernel/sched_rr_timeslice_ms\fP (Linux 3.9 以降)
2673 \fBsched_rr_get_interval\fP(2) 参照。
2674 .TP 
2675 \fI/proc/sys/kernel/sched_rt_period_us\fP (Linux 2.6.25 以降)
2676 \fBsched\fP(7)  参照。
2677 .TP 
2678 \fI/proc/sys/kernel/sched_rt_runtime_us\fP (Linux 2.6.25 以降)
2679 \fBsched\fP(7)  参照。
2680 .TP 
2681 \fI/proc/sys/kernel/sem\fP (Linux 2.4 以降)
2682 このファイルには System V IPC セマフォを制限する 4 つの値が書かれている。 これらのフィールドは次の順番に並んでいる:
2683 .RS
2684 .IP SEMMSL 8
2685 セマフォ集合ごとのセマフォ数の最大値。
2686 .IP SEMMNS 8
2687 システム全体での、全てのセマフォ集合におけるセマフォ数の制限。
2688 .IP SEMOPM 8
2689 \fBsemop\fP(2)  コールに指定されるオペレーション数の最大値。
2690 .IP SEMMNI 8
2691 システム全体でのセマフォ識別子の最大値。
2692 .RE
2693 .TP 
2694 \fI/proc/sys/kernel/sg\-big\-buff\fP
2695 このファイルは、汎用 SCSI デバイス (sg) のバッファサイズの最大値を表す。 今はこれを変更することはできないが、 コンパイル時に
2696 \fIinclude/scsi/sg.h\fP を編集して \fBSG_BIG_BUFF\fP の値を変えれば変更できる。
2697 ただし、この値を変更する理由はないだろう。
2698 .TP 
2699 \fI/proc/sys/kernel/shm_rmid_forced\fP (Linux 3.1 以降)
2700 .\" commit b34a6b1da371ed8af1221459a18c67970f7e3d53
2701 .\" See also Documentation/sysctl/kernel.txt
2702 If this file is set to 1, all System V shared memory segments will be marked
2703 for destruction as soon as the number of attached processes falls to zero;
2704 in other words, it is no longer possible to create shared memory segments
2705 that exist independently of any attached process.
2706 .IP
2707 The effect is as though a \fBshmctl\fP(2)  \fBIPC_RMID\fP is performed on all
2708 existing segments as well as all segments created in the future (until this
2709 file is reset to 0).  Note that existing segments that are attached to no
2710 process will be immediately destroyed when this file is set to 1.  Setting
2711 this option will also destroy segments that were created, but never
2712 attached, upon termination of the process that created the segment with
2713 \fBshmget\fP(2).
2714 .IP
2715 Setting this file to 1 provides a way of ensuring that all System V shared
2716 memory segments are counted against the resource usage and resource limits
2717 (see the description of \fBRLIMIT_AS\fP in \fBgetrlimit\fP(2))  of at least one
2718 process.
2719 .IP
2720 Because setting this file to 1 produces behavior that is nonstandard and
2721 could also break existing applications, the default value in this file is
2722 0.  Only set this file to 1 if you have a good understanding of the
2723 semantics of the applications using System V shared memory on your system.
2724 .TP 
2725 \fI/proc/sys/kernel/shmall\fP (Linux 2.2 以降)
2726 このファイルには System V 共有メモリの総ページ数の システム全体での制限が書かれている。
2727 .TP 
2728 \fI/proc/sys/kernel/shmmax\fP (Linux 2.2 以降)
2729 このファイルを通じて、(System V IPC) 共有メモリセグメントを作成するときの 最大サイズの実行時上限 (run\-time limit)
2730 を取得または設定できる。 現在は 1GB までの共有メモリセグメントが カーネルでサポートされている。 この値のデフォルトは \fBSHMMAX\fP
2731 である。
2732 .TP 
2733 \fI/proc/sys/kernel/shmmni\fP (Linux 2.4 以降)
2734 このファイルは、システム全体で作成可能な System V 共有メモリセグメント数を指定する。
2735 .TP 
2736 \fI/proc/sys/kernel/sysrq\fP
2737 このファイルは、SysRq キーにより起動が許可されている関数群を制御する ものである。デフォルトでは、ファイルの内容は 1 であり、
2738 これは起こり得る全ての SysRq リクエストが許可されることを意味する (古いバージョンのカーネルでは、SysRq はデフォルトでは無効になっており、
2739 実行時に明示的に有効にする必要があったが、今はそうではない)。 このファイルで指定可能な値は以下の通り。
2740
2741    0 \- sysrq を完全に無効にする
2742    1 \- sysrq の全ての関数を有効にする
2743   >1 \- 許可する sysrq 関数のビットマスク。内訳は以下の通り。
2744           2 \- コンソールのログ・レベルの制御を有効にする
2745           4 \- キーボードの制御を有効にする (SAK, unraw)
2746           8 \- プロセスなどのデバッグ・ダンプを有効にする
2747          16 \- sync コマンドを有効にする
2748          32 \- 読み出し専用での再マウントを有効にする
2749          64 \- プロセスへのシグナル発行を有効にする (term, kill, oom\-kill)
2750         128 \- リブート/電源オフを許可する
2751         256 \- 全てのリアルタイム・タスクの nice 値の変更を許可する
2752
2753 カーネル設定オプション \fBCONFIG_MAGIC_SYSRQ\fP が有効な場合のみ、このファイルは存在する。 詳細は、Linux
2754 カーネルソースファイル \fIDocumentation/sysrq.txt\fP を参照のこと。
2755 .TP 
2756 \fI/proc/sys/kernel/version\fP
2757 このファイルには、以下のような文字列が書かれている:
2758
2759     #5 Wed Feb 25 21:49:24 MET 1998
2760
2761 \&"#5" はこのソースで構築された 5 番目のカーネルであることを意味する。 その後にある日付はカーネルが構築された時刻を表す。
2762 .TP 
2763 \fI/proc/sys/kernel/threads\-max\fP (Linux 2.3.11 以降)
2764 このファイルは、システム全体で作成可能なスレッド数 (タスク数) の上限を指定する。
2765 .TP 
2766 \fI/proc/sys/kernel/zero\-paged\fP (PowerPC のみ) 
2767 このファイルはフラグを含む。 (0 以外の値で) 有効された場合、Linux\-PPC はアイドルループで pre\-zero page
2768 を行うので、get_free_pages の速度が向上する可能性がある。
2769 .TP 
2770 \fI/proc/sys/net\fP
2771 このディレクトリにはネットワーク関係の情報が入っている。 このディレクトリにあるファイルのいくつかについては、 \fBtcp\fP(7)  や
2772 \fBip\fP(7)  に説明がある。
2773 .TP 
2774 \fI/proc/sys/net/core/somaxconn\fP
2775 このファイルは \fBlisten\fP(2)  の \fIbacklog\fP 引き数の上限値を規定する。 詳細は \fBlisten\fP(2)
2776 のマニュアルページを参照。
2777 .TP 
2778 \fI/proc/sys/proc\fP
2779 このディレクトリは空の場合もある。
2780 .TP 
2781 \fI/proc/sys/sunrpc\fP
2782 このディレクトリはネットワークファイルシステム (NFS) への Sun remote procedure call (遠隔手続き呼び出し)
2783 をサポートする。 これが存在しないシステムもある。
2784 .TP 
2785 \fI/proc/sys/vm\fP
2786 このディレクトリにはメモリ管理の調整、バッファやキャッシュ管理のための ファイルがある。
2787 .TP 
2788 \fI/proc/sys/vm/drop_caches\fP (Linux 2.6.16 以降)
2789 このファイルに書き込みを行うと、カーネルに、 クリーンなキャッシュ、 dentry、 inode をメモリから追い出して、
2790 メモリを解放させることができる。 この機能はメモリ管理のテストや再現可能なファイルシステムのベンチマークを行うのに役立つ。
2791 このファイルへの書き込みはキャッシュの利点を失うことになるので、システム全体の性能は低下する可能性がある。
2792
2793 ページキャッシュを解放するには、以下のようにする。
2794
2795     echo 1 > /proc/sys/vm/drop_caches
2796
2797 dentry と inode を解放するには、以下のようにする。
2798
2799     echo 2 > /proc/sys/vm/drop_caches
2800
2801 ページキャッシュ、 dentry、 inode を解放するには、以下のようにする。
2802
2803     echo 3 > /proc/sys/vm/drop_caches
2804
2805 このファイルへの書き込みは非破壊的な操作で、 ダーティな (dirty) オブジェクトは 解放されないので、 この操作を行う際は最初に
2806 \fBsync\fP(1) を実行しておくべきである。
2807 .TP 
2808 \fI/proc/sys/vm/legacy_va_layout\fP (Linux 2.6.9 以降)
2809 .\" The following is from Documentation/filesystems/proc.txt
2810 0 以外の場合、新しい 32ビットメモリマッピング配置が無効になり、 カーネルは全てのプロセスに対して従来の (カーネル 2.4 の) 配置方法を
2811 使用する。
2812 .TP 
2813 \fI/proc/sys/vm/memory_failure_early_kill\fP (Linux 2.6.32 以降)
2814 .\" The following is based on the text in Documentation/sysctl/vm.txt
2815 このファイルは、カーネルが処理できない訂正不能なメモリエラー (通常はメモリモジュールでの 2 ビットエラー)
2816 がバックグラウンドでハードウェアにより検出された際に、プロセスをどのように kill するかを制御する。
2817 (ページの有効なコピーがディスク上にも存在するなど)
2818 いくつかの場面では、カーネルはアプリケーションに影響を与えずに透過的に故障を処理する。しかし、データの最新のコピーが他にはない場合には、データ破壊が波及するのを防ぐため、カーネルはプロセスを
2819 kill する。
2820
2821 このファイルは以下のいずれかの値を持つ。
2822 .RS
2823 .IP 1: 4
2824 データ破壊が検出されるとすぐに、故障が検出され復元できないページ (corrupted\-and\-not\-reloadable page)
2825 をマップしている全てのプロセスを kill する。この機能は、(カーネル内部で割り当てられたデータやスワップのキャッシュなど)
2826 少数のいくつかのタイプのページではサポートされていないが、大半のユーザページではこの機能は働く。
2827 .IP 0: 4
2828 データ破壊が検出されたページの全てのプロセスからの unmap のみを行い、そのページにアクセスしようとしたプロセスのみを kill する。
2829 .RE
2830 .IP
2831 この kill は \fIsi_code\fP に \fBBUS_MCEERR_AO\fP を設定した \fBSIGBUS\fP
2832 シグナルを使って行われる。プロセス側では必要であればこのシグナルを処理することができる。詳細は \fBsigaction\fP(2) を参照。
2833
2834 この機能は、高度なマシンチェック機構を持ったアーキテクチャ/プラットフォームにおいてのみ有効であり、ハードウェア機能にも依存している。
2835
2836 アプリケーションは \fBprctl\fP(2) の \fBPR_MCE_KILL\fP 操作を使って個別に
2837 \fImemory_failure_early_kill\fP の設定を上書きすることができる。
2838 .IP
2839 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
2840 存在する。
2841 .TP 
2842 \fI/proc/sys/vm/memory_failure_recovery\fP (Linux 2.6.32 以降)
2843 .\" The following is based on the text in Documentation/sysctl/vm.txt
2844 メモリ故障回復 (memory failure recovery) を有効にする
2845  (プラットフォームがサポートしている場合)
2846 .RS
2847 .IP 1: 4
2848 回復を試みる。
2849 .IP 0: 4
2850 メモリ故障時には常に panic を起こす。
2851 .RE
2852 .IP
2853 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
2854 存在する。
2855 .TP 
2856 \fI/proc/sys/vm/oom_dump_tasks\fP (Linux 2.6.25 以降)
2857 .\" The following is from Documentation/sysctl/vm.txt
2858 カーネルが OOM\-killing を実行する際に、システム全体のタスク・ダンプ (カーネルスレッドを除く) を生成するかを制御する。
2859 ダンプには、タスク (スレッド、プロセス) 毎に以下の情報が出力される: スレッド ID、実ユーザ ID、スレッドグループ ID (プロセス ID)、
2860 仮想メモリサイズ、Resident Set Size (実メモリ上に存在するページサイズ)、 タスクがスケジューリングされた CPU、 oom_adj
2861 スコア (\fI/proc/[pid]/oom_adj\fP の説明を参照)、コマンド名。 このダンプ情報は、なぜ OOM\-killer
2862 が起動されたかを知り、 その原因となったならず者のタスクを特定するのに役に立つ。
2863
2864 このファイルの内容が値 0 の場合、ダンプ情報の出力は行われない。 タスクが何千もある非常に巨大なシステムでは、
2865 各々のタスクについてメモリ状態をダンプするのは適切でないかもしれない。 そのようなシステムでは、ダンプ情報が必要でもないときに メモリ不足 (OOM)
2866 の状況で性能面の不利益が起こらないようにすべきだろう。
2867
2868 このファイルの内容が 0 以外の場合、 OOM\-killer が実際にメモリを占有したタスクを kill する度に ダンプ情報が出力される。
2869
2870 デフォルト値は 0 である。
2871 .TP 
2872 \fI/proc/sys/vm/oom_kill_allocating_task\fP (Linux 2.6.24 以降)
2873 .\" The following is from Documentation/sysctl/vm.txt
2874 このファイルは、メモリ不足 (OOM) の状況が起こった際に、 メモリ不足のきっかけとなったタスクを kill するかどうかを制御する。
2875
2876 このファイルが 0 に設定された場合、 OOM\-killer はタスクリスト全体をスキャンし、経験則に基づき kill するタスクを選択する。
2877 通常は、kill した場合に多くのメモリが解放できる、 ならず者のメモリ占有タスクが選択される。
2878
2879 このファイルが 0 以外に設定された場合、 OOM\-killer はメモリ不足の状況が発生するきっかけとなったタスクを 単純に kill
2880 するだけである。 これにより、たいていは重い処理となるタスクリストのスキャンを回避できる。
2881
2882 \fI/proc/sys/vm/panic_on_oom\fP が 0 以外の場合、
2883 \fI/proc/sys/vm/oom_kill_allocating_task\fP にどのような値が入っていたとしても、
2884 \fI/proc/sys/vm/panic_on_oom\fP の方が優先される。
2885
2886 デフォルト値は 0 である。
2887 .TP 
2888 \fI/proc/sys/vm/overcommit_kbytes\fP (Linux 3.14 以降)
2889 .\" commit 49f0ce5f92321cdcf741e35f385669a421013cb7
2890 この書き込み可能なファイルは、 \fI/proc/sys/vm/overcommit_memory\fP が値 2 の際に、 \fICommitLimit\fP
2891 を制御する \fI/proc/sys/vm/overcommit_ratio\fP の別の設定手段を提供するものである。
2892 \fIovercommit_ratio\fP が割合をパーセントで指定するのに対し、 このファイルではオーバーコミットするメモリー量を絶対値 (kB 単位)
2893 で指定できる。 これにより、 メモリーサイズが非常に大きなシステムで \fICommitLimit\fP を極め細かく制御できる。
2894
2895 \fIovercommit_kbytes\fP と \fIovercommit_ratio\fP のいずれか一方だけが効果を持つ。
2896 \fIovercommit_kbytes\fP が 0 以外の値を持つ場合、 \fICommitLimit\fP を計算するのに
2897 \fIovercommit_kbytes\fP が使用され、 それ以外の場合 \fIovercommit_ratio\fP が使用される。
2898 これらのファイルのいずれかに値を書き込むと、 他のファイルの値は 0 に設定される。
2899 .TP 
2900 \fI/proc/sys/vm/overcommit_memory\fP
2901 このファイルにはカーネル仮想メモリのアカウントモードが書かれている。 値は以下の通り:
2902 .RS
2903 .IP
2904 0: 発見的なオーバーコミット (heuristic overcommit) (これがデフォルトである)
2905 .br
2906 1: 常にオーバーコミットし、チェックしない。
2907 .br
2908 2: 常にチェックし、オーバーコミットしない。
2909 .RE
2910 .IP
2911 モード 0 では、 \fBMAP_NORESERVE\fP を設定して呼び出された \fBmmap\fP(2)  はチェックされない。
2912 またデフォルトのチェックはとても脆弱で、 プロセスを "OOM\-kill" してしまうリスクを引き起こす。 Linux 2.4 では 0
2913 以外の値はモード 1 を意味する。
2914
2915 モード 2 (Linux 2.6 以降で利用可能) では、 割り当て可能な仮想アドレス空間 (\fI/proc/meminfo\fP の
2916 \fICommitLimit\fP) は以下で計算される。
2917
2918     CommitLimit = (total_RAM \- total_huge_TLB) *
2919                   overcommit_ratio / 100 + total_swap
2920
2921 個々の説明:
2922 .RS 12
2923 .IP * 3
2924 \fItotal_RAM\fP はシステム上の RAM の総量
2925 .IP *
2926 \fItotal_huge_TLB\fP はヒュージページ用に確保されたメモリ総量
2927 .IP *
2928 \fIovercommit_ratio\fP は \fI/proc/sys/vm/overcommit_ratio\fP の値
2929 .IP *
2930 \fItotal_swap\fP はスワップ空間の総量
2931 .RE
2932 .IP
2933 For example, on a system with 16GB of physical RAM, 16GB of swap, no space
2934 dedicated to huge pages, and an \fIovercommit_ratio\fP of 50, this formula
2935 yields a \fICommitLimit\fP of 24GB.
2936
2937 Linux 3.14 以降では、 \fI/proc/sys/vm/overcommit_kbytes\fP の値が 0 でない場合、
2938 \fICommitLimit\fP は代わりに以下のように計算される。
2939
2940     CommitLimit = overcommit_kbytes + total_swap
2941 .TP 
2942 \fI/proc/sys/vm/overcommit_ratio\fP (Linux 2.6.0 以降)
2943 この書き込み可能なファイルは、 オーバーコミットできるメモリーの割合をパーセントで定義する。 このファイルのデフォルト値は 50 である。
2944 \fI/proc/sys/vm/overcommit_memory\fP の説明を参照。
2945 .TP 
2946 \fI/proc/sys/vm/panic_on_oom\fP (Linux 2.6.18 以降)
2947 .\" The following is adapted from Documentation/sysctl/vm.txt
2948 このファイルは、メモリ不足時にカーネルパニックを 起こすか起こさないかを制御する。
2949
2950 このファイルに値 0 を設定すると、 カーネルの OOM\-killer がならず者のプロセスを kill する。 普通は、OOM\-killer
2951 がならず者のプロセスを kill することができ、 システムは何とか動き続けることができる。
2952
2953 このファイルに値 1 を設定すると、 メモリ不足の状況が発生すると、カーネルは普通はパニックする。 しかしながら、プロセスが メモリポリシー
2954 (\fBmbind\fP(2)  の \fBMPOL_BIND\fP)  や cpusets (\fBcpuset\fP(7))
2955 を使って特定のノードへのメモリ割り当てを制限していて、 それらのノードでメモリ枯渇状態に至った場合は、 一つのプロセスが OOM\-killer により
2956 kill されるだけかもしれない。 この場合には、カーネルパニックは発生しない。 なぜなら、他のノードのメモリには空きがあるかもしれず、
2957 したがって、システム全体としてはメモリ不足の状況にまだ達していないかも しれないからである。
2958
2959 このファイルに値 2 を設定すると、 メモリ不足の状況が発生するとカーネルは常にパニックを起こす。
2960
2961 デフォルト値は 0 である。 1 と 2 はクラスタリングのフェイルオーバー用である。 フェイルオーバーの方針に応じてどちらかの値を選択すること。
2962 .TP 
2963 \fI/proc/sys/vm/swappiness\fP
2964 .\" The following is from Documentation/sysctl/vm.txt
2965 このファイルの値により、カーネルがどの程度激しくメモリページの スワップを行う
2966 かが制御される。 大きな値ほどスワップが激しくなり、小さい値ほど激しくなくなる。
2967 デフォルト値は 60 である。
2968 .TP 
2969 \fI/proc/sysrq\-trigger\fP (Linux 2.4.21 以降)
2970 このファイルに文字 character を書き込むと、 キーボードから ALT\-SysRq\-<character> を入力した場合と
2971 同じ SysRq 関数が起動される (\fI/proc/sys/kernel/sysrq\fP の説明を参照)。 通常、このファイルへ書き込みができるのは
2972 \fIroot\fP だけである。詳細については、Linux カーネルソースファイルの \fIDocumentation/sysrq.txt\fP を参照のこと。
2973 .TP 
2974 \fI/proc/sysvipc\fP
2975 疑似ファイル \fImsg\fP, \fIsem\fP, \fIshm\fP を含むサブディレクトリ。 これらのファイルは、現在システム上に存在する System V
2976 プロセス間通信 (Interprocess Communication, IPC) オブジェクト (それぞれ: メッセージキュー、セマフォ、共有メモリ)
2977 のリストであり、 \fBipcs\fP(1)  で取得できる情報と同じものを提供する。 これらのファイルにはヘッダがあり、理解しやすいように (1 行につき
2978 1 個の IPC オブジェクトの形式で) フォーマットされている。 \fBsvipc\fP(7)
2979 にはこれらのファイルから分かる情報の詳細な背景が書かれている。
2980 .TP 
2981 \fI/proc/thread\-self\fP (Linux 3.17 以降)
2982 .\" commit 0097875bd41528922fb3bb5f348c53f17e00e2fd
2983 このディレクトリは、\fI/proc\fP ファイルシステムにアクセスしたスレッドを参照している。 これは、同じスレッドのプロセススレッド ID
2984 (\fI[tid]\fP) の名前の \fI/proc/self/task/[tid]\fP ディレクトリと同一である。
2985 .TP 
2986 \fI/proc/timer_list\fP (Linux 2.6.21 以降)
2987 .\" commit 289f480af87e45f7a6de6ba9b4c061c2e259fe98
2988 This read\-only file exposes a list of all currently pending
2989 (high\-resolution) timers, all clock\-event sources, and their parameters in a
2990 human\-readable form.
2991 .TP 
2992 \fI/proc/timer_stats\fP (Linux 2.6.21 以降)
2993 .\" commit 82f67cd9fca8c8762c15ba7ed0d5747588c1e221
2994 .\"     Date:   Fri Feb 16 01:28:13 2007 -0800
2995 .\" Text largely derived from Documentation/timers/timer_stats.txt
2996 This is a debugging facility to make timer (ab)use in a Linux system visible
2997 to kernel and user\-space developers.  It can be used by kernel and
2998 user\-space developers to verify that their code does not make undue use of
2999 timers.  The goal is to avoid unnecessary wakeups, thereby optimizing power
3000 consumption.
3001
3002 If enabled in the kernel (\fBCONFIG_TIMER_STATS\fP), but not used, it has
3003 almost zero runtime overhead and a relatively small data\-structure
3004 overhead.  Even if collection is enabled at runtime, overhead is low: all
3005 the locking is per\-CPU and lookup is hashed.
3006
3007 The \fI/proc/timer_stats\fP file is used both to control sampling facility and
3008 to read out the sampled information.
3009
3010 The timer_stats functionality is inactive on bootup.  A sampling period can
3011 be started using the following command:
3012
3013     # echo 1 > /proc/timer_stats
3014
3015 The following command stops a sampling period:
3016
3017     # echo 0 > /proc/timer_stats
3018
3019 The statistics can be retrieved by:
3020
3021     $ cat /proc/timer_stats
3022
3023 While sampling is enabled, each readout from \fI/proc/timer_stats\fP will see
3024 newly updated statistics.  Once sampling is disabled, the sampled
3025 information is kept until a new sample period is started.  This allows
3026 multiple readouts.
3027
3028 \fI/proc/timer_stats\fP のサンプル出力。
3029
3030 .nf
3031 .RS -4
3032 $\fB cat /proc/timer_stats\fP
3033 Timer Stats Version: v0.3
3034 Sample period: 1.764 s
3035 Collection: active
3036   255,     0 swapper/3        hrtimer_start_range_ns (tick_sched_timer)
3037    71,     0 swapper/1        hrtimer_start_range_ns (tick_sched_timer)
3038    58,     0 swapper/0        hrtimer_start_range_ns (tick_sched_timer)
3039     4,  1694 gnome\-shell      mod_delayed_work_on (delayed_work_timer_fn)
3040    17,     7 rcu_sched        rcu_gp_kthread (process_timeout)
3041 \&...
3042     1,  4911 kworker/u16:0    mod_delayed_work_on (delayed_work_timer_fn)
3043    1D,  2522 kworker/0:0      queue_delayed_work_on (delayed_work_timer_fn)
3044 1029 total events, 583.333 events/sec
3045
3046 .fi
3047 .RE
3048 .IP
3049 The output columns are:
3050 .RS
3051 .IP * 3
3052 .\" commit c5c061b8f9726bc2c25e19dec227933a13d1e6b7 deferrable timers
3053 a count of the number of events, optionally (since Linux 2.6.23) followed by
3054 the letter \(aqD\(aq if this is a deferrable timer;
3055 .IP *
3056 the PID of the process that initialized the timer;
3057 .IP *
3058 the name of the process that initialized the timer;
3059 .IP *
3060 the function where the timer was initialized; and
3061 .IP *
3062 (in parentheses)  the callback function that is associated with the timer.
3063 .RE
3064 .TP 
3065 \fI/proc/tty\fP
3066 疑似ファイルを含むサブディレクトリ。 tty ドライバとライン設定 (line discipline) の書かれた サブディレクトリも含まれる。
3067 .TP 
3068 \fI/proc/uptime\fP
3069 このファイルは システム起動時から経過した時間 (秒) と アイドル (idle) しているプロセスが消費した時間 (秒) の 2 つの数を含む。
3070 .TP 
3071 \fI/proc/version\fP
3072 現在稼働しているカーネルのバージョン識別子である文字列。 これには \fI/proc/sys/ostype\fP,
3073 \fI/proc/sys/osrelease\fP, \fI/proc/sys/version\fP の内容が含まれる。 たとえばこのように:
3074 .nf
3075 .in -2
3076 \f(CWLinux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994\fP
3077 .in +2
3078 .fi
3079 .\" FIXME 2.6.13 seems to have /proc/vmcore implemented; document this
3080 .\"     See Documentation/kdump/kdump.txt
3081 .\"     commit 666bfddbe8b8fd4fd44617d6c55193d5ac7edb29
3082 .\"     Needs CONFIG_VMCORE
3083 .\"
3084 .TP 
3085 \fI/proc/vmstat\fP (Linux 2.6 以降)
3086 このファイルは仮想メモリの様々な統計情報を表示する。
3087 .TP 
3088 \fI/proc/zoneinfo\fP (Linux 2.6.13 以降)
3089 .\" FIXME more should be said about /proc/zoneinfo
3090 このファイルはメモリのゾーン (memory zone) に関する情報を表示する。 仮想メモリの振舞いを分析するのに役立つ。
3091 .SH 注意
3092 ほとんどの文字列 (たとえば環境変数やコマンド行) は内部表現のままなので、
3093 各フィールドはヌルバイト (\(aq\e0\(aq) で区切られている。だから、
3094 \fIod \-c\fP や \fItr "\e000" "\en"\fP を使えば、それらはより読みやすくなる。
3095 また \fIecho \`cat <file>\`\fP でもよい。
3096
3097 .\" .SH ACKNOWLEDGEMENTS
3098 .\" The material on /proc/sys/fs and /proc/sys/kernel is closely based on
3099 .\" kernel source documentation files written by Rik van Riel.
3100 このマニュアルは不完全であり、たぶん不正確で、しばしば更新される必要がある。
3101 .SH 関連項目
3102 \fBcat\fP(1), \fBdmesg\fP(1), \fBfind\fP(1), \fBfree\fP(1), \fBps\fP(1), \fBtr\fP(1),
3103 \fBuptime\fP(1), \fBchroot\fP(2), \fBmmap\fP(2), \fBreadlink\fP(2), \fBsyslog\fP(2),
3104 \fBslabinfo\fP(5), \fBhier\fP(7), \fBnamespaces\fP(7), \fBtime\fP(7), \fBarp\fP(8),
3105 \fBhdparm\fP(8), \fBifconfig\fP(8), \fBinit\fP(1), \fBlsmod\fP(8), \fBlspci\fP(8),
3106 \fBmount\fP(8), \fBnetstat\fP(8), \fBprocinfo\fP(8), \fBroute\fP(8), \fBsysctl\fP(8)
3107
3108 Linux カーネルのソースファイル: \fIDocumentation/filesystems/proc.txt\fP
3109 \fIDocumentation/sysctl/fs.txt\fP, \fIDocumentation/sysctl/kernel.txt\fP,
3110 \fIDocumentation/sysctl/net.txt\fP, and \fIDocumentation/sysctl/vm.txt\fP.
3111 .SH この文書について
3112 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.77 の一部
3113 である。プロジェクトの説明とバグ報告に関する情報は
3114 http://www.kernel.org/doc/man\-pages/ に書かれている。