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>
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.
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.
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.
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/>.
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
51 .\" FIXME . cross check against Documentation/filesystems/proc.txt
52 .\" to see what information could be imported from that file
55 .\"*******************************************************************
57 .\" This file was generated with po4a. Translate the source file.
59 .\"*******************************************************************
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
99 .TH PROC 5 2014\-12\-31 Linux "Linux Programmer's Manual"
101 proc \- プロセスの情報を含む擬似ファイルシステム
103 \fIproc\fP ファイルシステムは擬似的なファイルシステムであり、 カーネル内のデータへのインターフェースとして使用される。 一般的には
104 \fI/proc\fP にマウントされる。 大部分のファイルは読み出し専用 (read\-only) であるが、 いくつかのファイルは書き込み可能であり、
105 そのファイルに書き込めばカーネルの内部変数を変更できる。
107 以下のリストでは \fI/proc\fP 階層以下のファイルやディレクトリの多くについて説明している。
111 .\" FIXME Describe /proc/[pid]/attr and
112 .\" /proc/[pid]/task/[tid]/attr
113 .\" This is a directory
116 .\" https://lwn.net/Articles/28222/
117 .\" http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml
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
126 .\" FIXME Describe /proc/[pid]/autogroup
128 .\" commit 5091faa449ee0b7d73bc296a93bca9540fc51d0a
129 .\" CONFIG_SCHED_AUTOGROUP
131 実行中のプロセスについてのサブディレクトリ。 サブディレクトリ名は (そのプロセスの) プロセス ID である。
132 各サブディレクトリは、以下の擬似ファイルとディレクトリを含む。
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) も参照。
139 \fI/proc/[pid]/cgroup\fP (Linux 2.6.24 以降)
140 .\" Info in Documentation/cgroups/cgroups.txt
141 このファイルは、プロセスやタスクが所属するコントロールグループを示す。
142 cgroup の各階層についてエントリーが 1 つあり、
143 各エントリーは以下の形式のコロン区切りのフィールドで構成される。
146 \f(CW 5:cpuacct,cpu,cpuset:/daemons\fP
149 コロン区切りの各フィールドは、左から右の順で、以下の意味を持つ。
156 プロセスが所属する階層内のコントロールグループ
159 このファイルが存在するのは、カーネルのコンフィギュレーション・オプショ
160 ン \fBCONFIG_CGROUPS\fP を有効にした場合だけである。
162 \fI/proc/[pid]/clear_refs\fP (Linux 2.6.22 以降)
164 .\" commit b813e931b4c8235bb42e301096ea97dbdee3e8fe (2.6.22)
165 .\" commit 398499d5f3613c47f2143b8c54a04efb5d7a6da9 (2.6.32)
166 .\" commit 040fa02077de01c7e08fa75be6125e4ca5636011 (3.11)
168 .\" "Clears page referenced bits shown in smaps output"
169 .\" write-only, writable only by the owner of the process
170 このファイルは書き込み専用ファイルで、書き込めるのはプロセスの所有者だけである。
172 このファイルには以下の値を書き込むことができる。
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.)
182 .\" Internally: CLEAR_REFS_ANON
183 Reset the PG_Referenced and ACCESSED/YOUNG bits for all anonymous pages
184 associated with the process.
187 .\" Internally: CLEAR_REFS_MAPPED
188 Reset the PG_Referenced and ACCESSED/YOUNG bits for all file\-mapped pages
189 associated with the process.
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.
202 A further value can be written to affect a different bit:
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.
213 Writing any value to \fI/proc/[pid]/clear_refs\fP other than those listed above
216 \fI/proc/[pid]/clear_refs\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
217 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
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 で区切られた文字列として書かれており、 最後の文字列の後にヌルバイトが一つ置かれる。
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.
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.
239 \fI/proc/[pid]/coredump_filter\fP (Linux 2.6.23 以降)
242 \fI/proc/[pid]/cpuset\fP (Linux 2.6.12 以降)
243 .\" and/proc/[pid]/task/[tid]/cpuset
246 \fI/proc/[pid]/cwd\fP
247 プロセスのカレントワーキングディレクトリへのシンボリックリンク。 例えば、プロセス 20 のカレントワーキングディレクトリを見つけるためには、
252 $\fB cd /proc/20/cwd; /bin/pwd\fP
256 \fIpwd\fP コマンドはシェルの内部コマンドのことがよくあり、
258 \fBbash\fP(1) では \fIpwd\ \-P\fP を使ってもよい。
260 .\" The following was still true as at kernel 2.6.13
261 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
262 \fBpthread_exit\fP(3) を呼び出しにより行われる)。
264 \fI/proc/[pid]/environ\fP
265 このファイルはプロセスの環境変数を含んでいる。 各エントリはヌルバイト (\(aq\e0\(aq) で区切られていて、
266 末尾にヌルバイトがあるかもしれない。 したがって、プロセス 1 の環境変数を表示するためには 次のようにすればよい。
270 $\fB strings /proc/1/environ\fP
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) を呼び出しにより行われる)。
282 Linux 2.0 以前では、 \fI/proc/[pid]/exe\fP は実行されたバイナリへのポインタで、シンボリックリンクのように見える。 Linux
283 2.0 以前では、このファイルに対して \fBreadlink\fP(2) を実行すると、次のフォーマットの文字列が返る。
287 たとえば、[0301]:1502 はメジャーデバイス番号 03 (IDE, MFM などのドライブ) マイナーデバイス番号 01
288 (最初のドライブの最初のパーティション) の デバイス上の iノード番号 1502 である。
290 \fI\-inum\fP オプションをつけて \fBfind\fP(1) を使うと、
293 \fI/proc/[pid]/fd/\fP
294 プロセスがオープンしたファイル各々に対するエントリを含むサブディレクトリ。 ファイルディスクリプタがファイル名で、
295 実際のファイルへのシンボリックリンクになっている。 したがって 0 は標準入力、1 は標準出力、2 は標準エラー出力、などとなる。
297 パイプやソケットのファイルディスクリプタでは、 エントリーはファイル種別が inode という内容を持つシンボリックリンクとなる。 このファイルに対して
298 \fBreadlink\fP(2) を呼び出すと以下の形式の文字列が返る。
302 例えば、 \fIsocket:[2248868]\fP は inode が 2248868 のソケットである。 ソケットの場合、 その inode を元に
303 \fI/proc/net/\fP 以下のファイルを参照し詳しい情報を得ることができる。
305 対応する inode がないファイルディスクリプタ (例えば \fBepoll_create\fP(2), \fBeventfd\fP(2),
306 \fBinotify_init\fP(2), \fBsignalfd\fP(2), \fBtimerfd\fP(2) により生成されたファイルディスクリプタ) では、
307 エントリーはその内容が以下の形式のシンボリックリンクとなる。
309 anon_inode:<file\-type>
311 \fIfile\-type\fP は角括弧で囲まれる場合がある。
313 例えば、 epoll ファイルディスクリプタは、 内容が文字列 \fIanon_inode:[eventpoll]\fP
316 .\"The following was still true as at kernel 2.6.13
317 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このディレクトリの内容は参照できない (スレッドの終了は通常
318 \fBpthread_exit\fP(3) を呼び出しにより行われる)。
320 コマンドライン引き数としてファイル名を受け取るが、引き数が 渡されなかった場合
321 に標準入力から入力を受け取らないようなプログラムや、 コマンドライン引き数とし
322 て書き込みファイルを受け取るが、引き数が 渡されなかった場合に標準出力に出力を
323 行わないようなプログラムであっても、 \fI/proc/[pid]/fd\fP を使うことで標準入力や
324 標準出力を使用できるようになる。 例えば、 \fI\-i\fP を入力ファイルを指定するフラ
325 グ、 \fI\-o\fP を出力ファイルを指定するフラグと仮定すると、
329 $\fB foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ...\fP
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 を実行することにより、フィルタとして動作させることができる。
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 へのシンボリックリンクにしている。
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 したがって、上述のサンプルコマンドは次のようにも書くことができる。
349 $\fB foobar \-i /dev/stdin \-o /dev/stdout ...\fP
352 .\" FIXME Describe /proc/[pid]/loginuid
353 .\" Added in 2.6.11; updating requires CAP_AUDIT_CONTROL
354 .\" CONFIG_AUDITSYSCALL
356 \fI/proc/[pid]/fdinfo/\fP (Linux 2.6.22 以降)
357 このサブディレクトリには、そのプロセスがオープンしているファイル毎の エントリが入っており、ファイルディスクリプタがファイル名となっている。
358 各ファイルの内容を読み出すことで、対応するファイルディスクリプタに関する 情報を得ることができる。以下に例を示す。
362 $\fB cat /proc/12015/fdinfo/4\fP
368 \fIpos\fP フィールドは 10 進数で、現在のファイルオフセットを示す。 \fIflags\fP フィールドは 8 進数で、
369 ファイルのアクセスモードとファイル状態フラグを示す (\fBopen\fP(2) 参照)。
372 .\" Certain file types include additional info; see
373 .\" Documentation/filesystems/proc.txt
375 .\" Especially interesting is this:
377 .\" commit ab49bdecc3ebb46ab661f5f05d5c5ea9606406c6
378 .\" Author: Cyrill Gorcunov <gorcunov@openvz.org>
379 .\" Date: Mon Dec 17 16:05:06 2012 -0800
381 .\" Basically, the /proc/PID/fdinfo/ entry for an inotify FD
382 .\" includes the file handles for all watched FDs
384 このディレクトリのファイルは、プロセスの所有者だけが読み出すことができる。
386 \fI/proc/[pid]/io\fP (kernel 2.6.20 以降)
387 .\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2
388 このファイルは、 プロセスの I/O 統計情報を表示する。 以下に例を挙げる。
392 #\fB cat /proc/3828/io\fP
398 write_bytes: 323932160
399 cancelled_write_bytes: 0
407 このタスクがきっかけでストレージから読み出されたバイト数。 この値は、単純に \fBread\fP(2)
408 や同様のシステムコールからこのプロセスに渡されたバイト数の合計である。 この値には、 端末入出力なども含まれ、 実際に物理ディスク I/O
409 が必要であったか (読み出しがページキャッシュからの読み出しで十分であったか) どうかは関係ない。
412 このタスクがきっかけで行われたか行われるはずのディスクへの書き込みバイト数。 \fIrchar\fP と同じ注意があてはまる。
414 \fIsyscr\fP: 読み出しシステムコール数
415 読み出し I/O 操作\(em\fBread\fP(2) や \fBpread\fP(29 などのシステムコール\(emを試みた回数。
417 \fIsyscw\fP: 書き込みシステムコール数
418 書き込み I/O 操作\(em\fBwrite\fP(2) や \fBpwrite\fP(29 などのシステムコール\(emを試みた回数。
420 \fIread_bytes\fP: 読み出しバイト数
421 このプロセスが実際にストレージ層から取得しようとしたバイト数。 ブロックデバイス上のファイルシステムでは正確な値となる。
423 \fIwrite_bytes\fP: 書き込みバイト数
424 このプロセスが実際にストレージ層に転送しようとしたバイト数。
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.
436 \fI注意\fP: 現在の実装では 32 ビットシステムでは少しいやらしい点がある。 プロセス B が 64
437 ビットカウンターの一つを更新している途中に、プロセス A がプロセス B の \fI/proc/[pid]/io\fP を読んだ場合、 プロセス A
440 \fI/proc/[pid]/gid_map\fP (Linux 3.5 以降)
441 \fI/proc/[pid]/uid_map\fP の説明を参照すること。
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 以降では、 システム上のすべてのユーザがこのファイルを読み出すことができる。
450 \fI/proc/[pid]/map_files/\fP (kernel 3.3 以降)
451 .\" commit 640708a2cff7f81e246243b0073c66e6ece7e53e
452 このサブディレクトリには、 メモリマップされたファイルに対応するエントリーが置かれる (\fBmmap\fP(2) 参照)。 エントリーの名前がメモリ領域の
453 (16 進数表現の) 開始アドレスと終了アドレスの組で、 エントリーはマップされているファイルへのシンボリックリンクである。 以下に例を示す。 なお、
454 出力は幅が 80 文字のディスプレイに合うように折り返して整形されている。
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
465 これらのエントリーが存在するのは \fBMAP_FILE\fP フラグでマッピングされたメモリ領域についてであるが、 Linux での無名の共有メモリ
466 (\fBMAP_ANON | MAP_SHARED\fP で作成された領域) の実装方法では、
467 このディレクトリに無名の共有メモリに関するエントリーも存在する。 以下は、 マッピング元のファイルが削除された \fI/dev/zero\fP
473 lrw\-\-\-\-\-\-\-. 1 root root 64 Apr 16 21:33
474 7fc075d2f000\-7fc075e6f000 \-> /dev/zero (deleted)
478 このディレクトリが存在するのは、 カーネルのコンフィギュレーション・オプション \fBCONFIG_CHECKPOINT_RESTORE\fP
481 \fI/proc/[pid]/maps\fP
482 現在マッピングされているメモリ領域とそのアクセスパーミッションを含む。 メモリマッピングについての詳しい情報は \fBmmap\fP(2) を参照。
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]
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
504 f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0 [stack:986]
506 7fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0 [stack]
507 7fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0 [vdso]
511 \fIaddress\fP フィールドは、 そのマッピングが占めているプロセスのアドレス空間である。 \fIperms\fP
512 フィールドはパーミッションのセットである。
520 p = private (copy on write)
524 \fIoffset\fP はファイル (などの) 中でのオフセット、 \fIdev\fP はデバイス (メジャーデバイス番号:マイナーデバイス番号)、
525 \fIinode\fP はそのデバイスの i ノード番号である。 0 は、BSS (初期化されていないデータ領域) の場合のように、 このメモリ領域はどの i
526 ノードとも関連付けられていないことを意味する。
528 \fIpathname\fP フィールドは、 通常そのマッピングに対応するファイルである。 ELF ファイルの場合、 ELF プログラムヘッダの Offset
529 フィールドを見ることで (\fIreadelf\ \-l\fP))、 簡単に \fIoffset\fP との対応付けをすることができる。
535 初期プロセスのスタック (初期プロセスはメインスレッドとも呼ばれる)。
537 \fI[stack:<tid>]\fP (Linux 3.4 以降)
538 .\" commit b76437579d1344b612cf1851ae610c636cec7db0
539 スレッドのスタック (\fI<tid>\fP はスレッド ID である)。 パス \fI/proc/[pid]/task/[tid]/\fP
543 動的にリンクされる仮想共有オブジェクト (virtual dynamically linked shared object)。
550 \fIpathname\fP が空の場合、 その領域は \fBmmap\fP(2) を使って確保された無名マッピングである。 \fBgdb\fP(1),
551 \fBstrace\fP(1) などを使ってプロセスを実行しない限り、 この領域をプロセスのソースと対応付ける簡単な方法はない。
553 Linux 2.0 ではパス名を書いたフィールドがない。
555 \fI/proc/[pid]/mem\fP
556 このファイルは、 \fBopen\fP(2), \fBread\fP(2), \fBlseek\fP(2)
557 を通して、プロセスのメモリのページにアクセスするために使われる。
559 \fI/proc/[pid]/mountinfo\fP (Linux 2.6.26 以降)
560 .\" This info adapted from Documentation/filesystems/proc.txt
561 このファイルには、マウントポイントについての情報が入っている。 以下のような形式の行から構成される。
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
568 括弧付きの数字は、以下の説明のためのものである。
572 マウント ID: マウントの一意な識別子 (\fBumount\fP(2) の後は再利用されるかもしれない)。
575 parent ID: 親マウントの ID (マウントツリーの最上位の場合は自分自身の ID となる)。
578 major:minor: ファイルシステム上のファイルの \fIst_dev\fP の値 (\fBstat\fP(2) 参照)。
581 ルート: そのファイルシステム内のマウントのルート。
584 マウントポイント: マウントポイントのそのプロセスのルートからの相対パス。
587 マウントオプション: 各マウントのオプション。
590 オプションフィールド: "tag[:value]" 形式のフィールドが 0 個以上並ぶ。
593 セパレータ: オプションフィールドの終わりを示す。
596 ファイルシステム種別: ファイルシステムの名前。 "type[.subtype]" という形式となる。
599 マウント元: ファイルシステム固有の情報。ない場合は "none" となる。
602 super options: スーパーブロック単位のオプション。
605 解釈する側は認識できないオプションフィールドは全て無視すべきである。 現在のところ、オプションフィールドとしては以下のようなものがある。
609 マウントはピアグループ (peer group) X で共有されている。
612 マウントはピアグループ (peer group) X のスレーブである。
615 マウントはスレーブであり、ピアグループ X (*) から mount propagation を受信する。
621 (*) X は、プロセスの root で直近の dominant peer group である。 X がマウントの直接のマスターである場合や、 同じ
622 root に dominant peer group がない場合は、 "master:X" フィールドだけが存在し、
623 "propagate_from:X" フィールドは存在しない。
625 mount propagation の詳細については、 Linux カーネルソースツリー内の
626 \fIDocumentation/filesystems/sharedsubtree.txt\fP を参照。
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) を参照。
635 \fI/proc/[pid]/mountstats\fP (Linux 2.6.17 以降)
636 このファイルを通じて、そのプロセスのマウント名前空間内のマウントポイントに関する 各種情報 (統計、設定情報) を参照できる。
637 ファイルの各行は以下のフォーマットである。
640 device /dev/sda7 mounted on /home with fstype ext3 [statistics]
648 マウントされているデバイス名 (対応するデバイスがない場合は "nodevice" となる)。
651 マウントポイントのファイルシステムツリーにおけるパス名。
657 追加の統計や設定情報。 現在のところ (Linux 2.6.26 時点では)、 このフィールドで情報が提供されているのは NFS
661 このファイルはプロセスの所有者だけが読み出すことができる。
663 詳しい情報は \fBnamespaces\fP(7) を参照。
665 \fI/proc/[pid]/ns/\fP (Linux 3.0 以降)
666 .\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
667 このサブディレクトリには、名前空間毎に 1 エントリが置かれる。
668 各エントリは \fBsetns\fP(2) による操作をサポートしている。
669 詳細な情報は \fBnamespaces\fP(7) を参照。
672 \fI/proc/[pid]/numa_maps\fP (Linux 2.6.14 以降)
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 により殺される可能性が高くなり、負の値ほど可能性が低くなる。
683 このファイルのデフォルト値は 0 である。 新しいプロセスは親プロセスの \fIoom_adj\fP の設定を継承する。
684 このファイルを変更するためには、プロセスは特権 (\fBCAP_SYS_RESOURCE\fP) を持っていなければならない。
686 Linux 2.6.36 以降では、 このファイルの使用は非推奨とされ、 代わりに \fI/proc/[pid]/oom_score_adj\fP
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 そのプロセスが使用しているメモリ量であり、 以下の要因により加算 (+) 減算 (\-)
699 そのプロセスが多くの子プロセスを \fBfork\fP(2) を使って作成しているか (+)。
702 もしくは 多くの CPU 時間を使用しているか (\-)。
704 そのプロセスが低い nice 値 (> 0) を持っているか (+)。
706 .\" More precisely, if it has CAP_SYS_ADMIN or CAP_SYS_RESOURCE
707 そのプロセスが特権を持っているか (\-)。
709 .\" More precisely, if it has CAP_SYS_RAWIO
710 そのプロセスが direct hardware access を行っているか (\-)。
713 \fIoom_score\fP は、そのプロセスの \fIoom_score_adj\fP や \fIoom_adj\fP 設定で規定される調整にも影響を与える。
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.
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
728 There is an additional factor included in the badness score: root processes
729 are given 3% extra memory over other tasks.
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.
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.
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.
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
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.
764 \fI/proc/[pid]/pagemap\fP (Linux 2.6.25 以降)
765 このファイルは、 プロセスの各仮想ページの物理ページフレームやスワップ領域へのマッピングを表示する。
766 各仮想ページに 64 ビットの値 1 つが対応し、 各ビットは以下のとおりである。
770 セットされている場合、 このページは RAM に存在する。
773 セットされている場合、 このページはスワップ領域に存在する。
776 このページはファイルマップされたページか共有無名ページである。
778 60\-56 (Linux 3.11 以降)
779 .\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f
783 PTE が soft\-dirty である (カーネルのソースファイル \fIDocumentation/vm/soft\-dirty.txt\fP を参照)。
786 このページが RAM に存在する場合 (ビット 63)、 これらのビットはページフレーム番号を示す。 このページフレーム番号は
787 \fI/proc/kpageflags\fP と \fI/proc/kpagecount\fP のインデックスに使用できる。 このページがスワップに存在する場合
788 (ビット 62)、 ビット 4\-0 はスワップ種別を示し、 ビット 54\-5 はスワップオフセットを示す。
791 Linux 3.11 より前では、 ビット 60\-55 はページサイズの基数 2 の log を示すのに使われていた。
793 \fI/proc/[pid]/pagemap\fP を効率的に活用するには、 \fI/proc/[pid]/maps\fP
794 を使ってメモリーのどの領域が実際にマップされているかを判断し、 seek でマップされていない領域をスキップするのがよい。
796 \fI/proc/[pid]/pagemap\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
797 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
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.
804 \fI/proc/[pid]/root\fP
805 UNIX と Linux では、 ファイルシステムのルート (/) をプロセスごとに別々にできる。 これはシステムコール \fBchroot\fP(2)
806 によって設定する。 このファイルはプロセスのルートディレクトリを指すシンボリックリンクで、 \fIexe\fP や \fIfd/*\fP
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
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
820 .\" FIXME Describe /proc/[pid]/sched
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
829 .\" FIXME Describe /proc/[pid]/schedstats and
830 .\" /proc/[pid]/task/[tid]/schedstats
832 .\" CONFIG_SCHEDSTATS
833 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 このシンボリックリンクの内容は参照できない (スレッドの終了は通常
834 \fBpthread_exit\fP(3) を呼び出しにより行われる)。
836 \fI/proc/[pid]/smaps\fP (Linux 2.6.14 以降)
837 このファイルは、そのプロセスの各マッピングのメモリ消費量を表示する (\fBpmap\fP(1) コマンドは解析しやすいであろう形式で同様の情報を表示する)。
838 マッピングのそれぞれについて、以下のような内容が表示される。
842 00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
860 最初の行には、 \fI/proc/[pid]/maps\fP で表示されるマッピングと同じ情報が表示される。 残りの行には、マッピングのサイズ、現在 RAM
861 上に存在するマッピングの量 ("Rss")、 このマッピングのこのプロセスの proportional share ("Pss")、
862 マッピング内の共有ページのうちクリーンなページ数とダーティページ数、
863 マッピング内のプライベートページのうちクリーンなページ数とダーティページ数、を示す。 "Referenced" は参照された (referenced)
864 かアクセスされたと現在印が付いているメモリ量を示す。 "Anonymous" はどのファイルにも属していないメモリ量を示す。 "Swap"
865 は使用中だがスワップされている無名メモリ (would\-be\-anonymous memory) の量を示す。
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.
874 The "Locked" indicates whether the mapping is locked in memory or not.
876 "VmFlags" field represents the kernel flags associated with the particular
877 virtual memory area in two letter encoded manner. The codes are the
888 gd \- stack segment grows down
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
905 hg \- huge page advise flag
906 nh \- no\-huge page advise flag
907 mg \- mergeable advise flag
909 \fI/proc/[pid]/smaps\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
910 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
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.
918 \fI/proc/[pid]/stat\fP
919 プロセスの状態についての情報。 これは \fBps\fP(1) で使われ、 カーネルのソースファイル \fIfs/proc/array.c\fP
922 各フィールドを順番に、 \fBscanf\fP(3) のフォーマット指定子付きで以下に示す。
930 括弧でくくられた実行形式のファイル名。 実行形式がスワップアウトされているかどうかによらず、 見ることができる。
933 プロセスの状態を示す、以下のいずれか 1 文字。
938 Sleeping in an interruptible wait
940 Waiting in uninterruptible disk sleep
944 (シグナルでの) 停止、または (Linux 2.6.33 より前では) トレースによる停止
946 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
947 トレースによる停止 (Tracing stop) (Linux 2.6.33 以降)
949 ページング中 (Linux 2.6.0 より前のみ)
951 死亡 (Dead) (Linux 2.6.0 以降)
953 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
954 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
955 死亡 (Dead) (Linux 2.6.33 から 3.13 までのみ)
957 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
958 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
959 Wakekill (Linux 2.6.33 から 3.13 までのみ)
961 .\" commit 44d90df6b757c59651ddd55f1a84f28132b50d29
962 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
963 Waking (Linux 2.6.33 から 3.13 までのみ)
965 .\" commit f2530dc71cf0822f90bb63ea4600caaef33a66bb
966 .\" commit 74e37200de8e9c4e09b70c21c3f13c2071e77457
967 Parked (Linux 3.9 から 3.13 までのみ)
976 (6) \fIsession\fP \ %d
979 (7) \fItty_nr\fP \ %d
980 プロセスの制御端末 (マイナー・デバイス番号はビット 31〜20 と 7〜0 にまたがって格納され、 メジャー・デバイス番号はビット 15〜8
984 .\" This field and following, up to and including wchan added 0.99.1
985 プロセスの制御端末のフォアグランド・プロセス・グループの ID。
988 プロセスのカーネルフラグワード。 ビットの意味は、 \fI<linux/sched.h>\fP で定義されている PF_* を参照すること。
991 このフィールドのフォーマットは Linux 2.6 より前では %lu であった。
993 (10) \fIminflt\fP \ %lu
994 プロセスが引き起こしたマイナーフォールト (minor fault、ディスクから メモリページへのロードを必要としないフォールト) の回数。
996 (11) \fIcminflt\fP \ %lu
997 (そのプロセスが終了を待っている) 子プロセスが引き起こしたマイナーフォールトの回数。
999 (12) \fImajflt\fP \ %lu
1000 プロセスが引き起こしたメジャーフォールト (major fault、ディスクからメモリページへのロードを必要とするフォールト) の回数。
1002 (13) \fIcmajflt\fP \ %lu
1003 (そのプロセスが終了を待っている) 子プロセスが引き起こしたメジャーフォールトの回数。
1005 (14) \fIutime\fP \ %lu
1006 このプロセスがユーザーモードでスケジューリングされた時間の合計。 clock tick 単位で計測される
1007 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 この値にはゲスト時間 \fIguest_time\fP (仮想 CPU
1009 も含まれる。これは、ゲスト時間のフィールドを認識しないアプリケーションにおいて、ゲスト時間分を計算に入れ損ねないようにするためである。
1011 (15) \fIstime\fP \ %lu
1012 プロセスのカーネルモードでの実行時間 (単位 jiffies)。 このプロセスがカーネルモードでスケジューリングされた時間の合計。 clock tick
1013 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1015 (16) \fIcutime\fP \ %ld
1016 このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、 ユーザモードでスケジューリングされた時間の合計。 clock tick
1017 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。 (\fBtimes\fP(2) も参照すること。)
1018 この値にはゲスト時間 \fIcguest_time\fP (仮想 CPU を実行するのに消費した時間、下記参照) も含まれる。
1020 (17) \fIcstime\fP \ %ld
1021 このプロセスの子プロセスで、終了待ち (waited\-for) のプロセスが、カーネルモードでスケジューリングされた時間の合計。 clock tick
1022 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
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 に対応
1035 .\" And back in kernel 1.2 days things were different again.
1036 Linux 2.6 より前では、このプロセスに割り当てられたスケジューリング 重みを変換した値が表示されていた。
1038 (19) \fInice\fP \ %ld
1039 .\" Back in kernel 1.2 days things were different.
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.
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 (最高優先)
1052 (20) \fInum_threads\fP \ %ld
1053 このプロセスのスレッド数 (Linux 2.6 以降)。 カーネル 2.6 より前では、このフィールドは削除されたフィールドの 場所埋めとして 0
1056 (21) \fIitrealvalue\fP \ %ld
1057 インターバルタイマによって、次に \fBSIGALRM\fP がプロセスへ送られるまでの時間 (単位 jiffies)。 カーネル 2.6.17
1058 以降では、このフィールドはメンテナンスされなくなり、 0 にハードコードされている。
1060 (22) \fIstarttime\fP \ %llu
1061 プロセスの起動時刻。システムが起動した時刻が起点である。 Linux 2.6 より前のカーネルでは、 この値の単位は jiffies であった。
1062 Linux 2.6 以降では、 値の単位はクロック tick である (\fIsysconf(_SC_CLK_TCK)\fP で割った値となる)。
1064 このフィールドのフォーマットは Linux 2.6 より前では %lu であった。
1066 (23) \fIvsize\fP \ %lu
1069 (24) \fIrss\fP \ %ld
1070 Resident Set Size。プロセスが持っている実メモリ上のページ数。
1071 これはちょうどテキスト、データ、スタック空間に使われているページ数である。 デマンドロードされていないページや
1072 スワップアウトされたページの数は含んでいない。
1074 (25) \fIrsslim\fP \ %lu
1075 このプロセスの rss の現在のソフト・リミット (バイト単位)。 \fBgetrlimit\fP(2) の \fBRLIMIT_RSS\fP の説明を参照。
1077 (26) \fIstartcode\fP \ %lu
1078 プログラムテキストが実行可能であるような領域の先頭アドレス。
1080 (27) \fIendcode\fP \ %lu
1081 プログラムテキストが実行可能であるような領域の末尾アドレス。
1083 (28) \fIstartstack\fP \ %lu
1084 スタックの開始アドレス (すなわち、スタックの底)。
1086 (29) \fIkstkesp\fP \ %lu
1087 現在の ESP (スタックポインタ) の値。 プロセスのカーネルスタックページにある。
1089 (30) \fIkstkeip\fP \ %lu
1090 現在の EIP (インストラクションポインタ) の値。
1092 (31) \fIsignal\fP \ %lu
1093 処理待ちのシグナルのビットマップ。 10
1094 進数で表示される。このフィールドは廃止予定である。リアルタイム・シグナルに関する情報は表示されないからである。代わりに
1095 \fI/proc/[pid]/status\fP を使うこと。
1097 (32) \fIblocked\fP \ %lu
1098 ブロックされた (blocked) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1099 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
1101 (33) \fIsigignore\fP \ %lu
1102 無視された (ignored) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1103 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
1105 (34) \fIsigcatch\fP \ %lu
1106 捕捉された (caught) シグナルのビットマップ。 10 進数で表示される。 このフィールドは廃止予定である。
1107 リアルタイム・シグナルに関する情報は表示されないからである。 代わりに \fI/proc/[pid]/status\fP を使うこと。
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.
1114 (36) \fInswap\fP \ %lu
1115 .\" nswap was added in 2.0
1116 スワップされたページ数 (メンテナンスされていない)。
1118 (37) \fIcnswap\fP \ %lu
1119 .\" cnswap was added in 2.0
1120 子プロセスの \fInswap\fP の累計 (メンテナンスされていない)。
1122 (38) \fIexit_signal\fP \ %d \ (Linux 2.1.22 以降)
1123 プロセスが死んだときに親プロセスに送られるシグナル。
1125 (39) \fIprocessor\fP \ %d \ (Linux 2.2.8 以降)
1126 このプロセスを最後に実行した CPU の番号。
1128 (40) \fIrt_priority\fP \ %u \ (Linux 2.5.19 以降)
1129 リアルタイム・スケジューリングの優先度。 リアルタイム・ポリシーの元でスケジューリングされるプロセスでは 1 から 99 の範囲の値となり、
1130 リアルタイム以外のスケジューリングポリシーのプロセスでは 0 となる (\fBsched_setscheduler\fP(2) 参照)。
1132 (41) \fIpolicy\fP \ %u \ (Linux 2.5.19 以降)
1133 スケジューリング・ポリシー (\fBsched_setscheduler\fP(2) 参照)。 値は、 \fIlinux/sched.h\fP の SCHED_*
1136 このフィールドのフォーマットは Linux 2.6.22 より前は %lu であった。
1138 (42) \fIdelayacct_blkio_ticks\fP \ %llu \ (Linux 2.6.18 以降)
1139 (clock tick (100分の1秒) 単位での) ブロック I/O の総遅延量。
1141 (43) \fIguest_time\fP \ %lu \ (Linux 2.6.24 以降)
1142 プロセスのゲスト時間 (ゲスト OS の仮想 CPU を実行するのに消費された時間)。 clock tick 単位で計測される
1143 (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1145 (44) \fIcguest_time\fP \ %ld \ (Linux 2.6.24 以降)
1146 プロセスの子プロセスのゲスト時間。 clock tick 単位で計測される (\fIsysconf(_SC_CLK_TCK)\fP で割った値が表示される)。
1148 (45) \fIstart_data\fP \ %lu \ (Linux 3.3 以降)
1149 .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
1150 Address above which program initialized and uninitialized (BSS) data are
1153 (46) \fIend_data\fP \ %lu \ (Linux 3.3 以降)
1154 .\" commit b3f7f573a20081910e34e99cbc91831f4f02f1ff
1155 Address below which program initialized and uninitialized (BSS) data are
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).
1162 (48) \fIarg_start\fP \ %lu \ (Linux 3.5 以降)
1163 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1164 プログラムのコマンドライン引き数 (\fIargv\fP) が置かれる開始アドレス。
1166 (49) \fIarg_end\fP \ %lu \ (Linux 3.5 以降)
1167 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1168 プログラムのコマンドライン引き数 (\fIargv\fP) が置かれる終了アドレス。
1170 (50) \fIenv_start\fP \ %lu \ (Linux 3.5 以降)
1171 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1172 プログラムの環境 (environment) が置かれる開始アドレス。
1174 (51) \fIenv_end\fP \ %lu \ (Linux 3.5 以降)
1175 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1176 プログラムの環境 (environment) が置かれる終了アドレス。
1178 (52) \fIexit_code\fP \ %d \ (Linux 3.5 以降)
1179 .\" commit 5b172087f99189416d5f47fd7ab5e6fb762a9ba3
1180 \fBwaitpid\fP(2) が報告する形式のスレッドの終了ステータス。
1183 \fI/proc/[pid]/statm\fP
1184 (ページ単位で計測した) メモリ使用量についての情報を提供する。 各列は以下の通りである。
1188 .\" (not including libs; broken, includes data segment)
1189 .\" (including libs; broken, includes library text)
1191 (\fI/proc/[pid]/status\fP の VmSize と同じ)
1192 resident 実メモリ上に存在するページ
1193 (\fI/proc/[pid]/status\fP の VmRSS と同じ)
1194 share 共有ページ (ファイルと関連付けられているページ)
1196 lib ライブラリ (Linux 2.6 では未使用)
1198 dt ダーティページ (Linux 2.6 では未使用)
1202 \fI/proc/[pid]/status\fP
1203 \fI/proc/[pid]/stat\fP と \fI/proc/[pid]/statm\fP にある多くの情報を、人間が解析しやすい形式で提供する。
1208 $\fB cat /proc/$$/status\fP
1215 Uid: 1000 1000 1000 1000
1216 Gid: 100 100 100 100
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
1242 Cpus_allowed: 00000001
1243 Cpus_allowed_list: 0
1245 Mems_allowed_list: 0
1246 voluntary_ctxt_switches: 150
1247 nonvoluntary_ctxt_switches: 545
1254 \fIName\fP: このプロセスにより実行されたコマンド。
1256 \fIState\fP: プロセスの現在の状態。 "R (running; 実行中)", "S (sleeping; 休眠状態)", "D (disk
1257 sleep; ディスク待ちの休眠状態)", "T (stopped; 停止状態)", "T (tracing stop; トレースによる停止)", "Z
1258 (zombie; ゾンビ状態)", "X (dead; 死亡)" のいずれかである。
1260 \fITgid\fP: スレッドグループ ID (すなわち、プロセス ID)。
1262 \fIPid\fP: スレッド ID (\fBgettid\fP(2) 参照)。
1264 \fIPPid\fP: 親プロセスの PID。
1266 \fITracerPid\fP: このプロセスをトレースしているプロセスの PID (トレースされていない場合は 0)。
1268 \fIUid\fP, \fIGid\fP: 実 UID/GID、実効 UID/GID、保存 set\-UID/GID、ファイルシステム UID/GID。
1270 \fIFDSize\fP: 現在割り当てられているファイルディスクリプタのスロット数。
1272 \fIGroups\fP: 補助グループのリスト。
1274 \fIVmPeak\fP: 仮想メモリサイズのピーク値。
1276 \fIVmSize\fP: 仮想メモリサイズ。
1278 \fIVmLck\fP: ロックされているメモリサイズ (\fBmlock\fP(3) 参照)。
1280 \fIVmHWM\fP: 実メモリ上に存在するページサイズ (resident set size) のピーク値 ("high water mark")。
1282 \fIVmRSS\fP: 実メモリ上に存在するページサイズ。
1284 \fIVmData\fP, \fIVmStk\fP, \fIVmExe\fP: データ、スタック、テキストセグメントのサイズ。
1286 \fIVmLib\fP: 共有ライブラリ・コードのサイズ。
1288 \fIVmPTE\fP: ページ・テーブル・エントリのサイズ (Linux 2.6.10 以降)。
1290 .\" commit b084d4353ff99d824d3bc5a5c2c22c70b1fba722
1291 \fIVmSwap\fP: スワップアウトされた仮想メモリサイズ (Linux 2.6.34 以降).
1293 \fIThreads\fP: このスレッドが属するプロセスのスレッド数。
1295 \fISigQ\fP: このフィールドにはスラッシュで区切られた 2 つの数字が入っている。この数字はこのプロセスの実ユーザ ID
1296 宛にキューイングされたシグナルに関するものである。一つ目の数字は、この実ユーザ ID
1297 宛に現在キューイングされているシグナル数である。二つ目の数字は、このプロセス宛にキューイングされたシグナル数に関するリソース上限値である
1298 (\fBgetrlimit\fP(2) の \fBRLIMIT_SIGPENDING\fP の説明を参照)。
1300 \fISigPnd\fP, \fIShdPnd\fP: スレッド宛およびプロセス全体宛の処理待ちシグナルの数 (\fBpthreads\fP(7),
1301 \fBsignal\fP(7) 参照)。
1303 \fISigBlk\fP, \fISigIgn\fP, \fISigCgt\fP: ブロックされるシグナル、無視されるシグナル、捕捉待ちのシグナルを 示すマスク値
1306 \fICapInh\fP, \fICapPrm\fP, \fICapEff\fP: 継承可能 (inheritable)、許可 (permitted)、実効
1307 (effective) の各ケーパビリティセットで有効になっているケーパビリティのマスク値 (\fBcapabilities\fP(7) 参照)。
1309 \fICapBnd\fP: ケーパビリティ・バウンディングセット (Linux 2.6.26 以降、 \fBcapabilities\fP(7) 参照)。
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.
1318 \fICpus_allowed\fP: このプロセスが実行を許可されている CPU のマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
1321 \fICpus_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
1324 \fIMems_allowed\fP: このプロセスが使用できるメモリノードのマスク値 (Linux 2.6.24 以降、 \fBcpuset\fP(7)
1327 \fIMems_allowed_list\fP: 前項と同じだが、「リスト形式」での表示 (Linux 2.6.26 以降、 \fBcpuset\fP(7)
1330 \fIvoluntary_ctxt_switches\fP, \fInonvoluntary_ctxt_switches\fP:
1331 自発的/非自発的なコンテキストスイッチの回数 (Linux 2.6.23 以降)。
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
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".
1347 カーネルの設定で \fBCONFIG_HAVE_ARCH_TRACEHOOK\fP が有効になっている場合にのみ、このファイルは存在する。
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 はスレッド毎に異なる値を持つ可能性がある)。
1360 .\" The following was still true as at kernel 2.6.13
1361 マルチスレッドプロセスでは、メインスレッドがすでに終了している場合、 \fI/proc/[pid]/task\fP ディレクトリの内容は参照できない
1362 (スレッドの終了は通常 \fBpthread_exit\fP(3) を呼び出しにより行われる)。
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".
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.
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
1387 The start of the range of user IDs in the user namespace of the process
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
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.
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
1410 The length of the range of user IDs that is mapped between the two user
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
1419 The lines written to \fIuid_map\fP must conform to the following rules:
1422 The three fields must be valid numbers, and the last field must be greater
1425 Lines are terminated by newline characters.
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.
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.
1437 Writes that violate the above rules fail with the error \fBEINVAL\fP.
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:
1443 The process must have the \fBCAP_SETUID\fP (\fBCAP_SETGID\fP) capability in the
1444 user namespace of the process \fIpid\fP.
1446 The process must have the \fBCAP_SETUID\fP (\fBCAP_SETGID\fP) capability in the
1447 parent user namespace.
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.
1452 For further details, see \fBnamespaces\fP(7).
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.
1459 Advanced Power Management のバージョンとバッテリ情報。 カーネルのコンパイル時に \fBCONFIG_APM\fP
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
1470 (2^order)\ *\ PAGE_SIZE
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
1479 For example on a x86_64 system:
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
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)
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.
1498 Further information about the zones can be found in \fI/proc/zoneinfo\fP.
1501 インストールされている各バス用にサブディレクトリがある。
1503 \fI/proc/bus/pccard\fP
1504 PCMCIA デバイスの情報が書かれるサブディレクトリ。 カーネルのコンパイル時に \fBCONFIG_PCMCIA\fP を定義したときに存在する。
1506 \fI/proc/[pid]/timers\fP (Linux 3.10 以降)
1507 .\" commit 5ed67f05f66c41e39880a6d61358438a25f9fee5
1508 .\" commit 48f6a7a511ef8823fdff39afee0320092d43a8a0
1509 このプロセスの POSIX タイマーのリスト。 各タイマーは文字列 "ID:" で始まる行に表示される。 例:
1514 signal: 60/00007fff86e452a8
1515 notify: signal/pid.2634
1518 signal: 60/00007fff86e452a8
1519 notify: signal/pid.2634
1524 各タイマーに表示される行の意味は次の通りである。
1528 このタイマーの ID。 この ID は \fBtimer_create\fP(2) が返すタイマー ID と同じではない。 \fIsiginfo_t\fP 構造化の
1529 \fIsi_timerid\fP フィールドで参照できるカーネル内部での ID と同じである (\fBsigaction\fP(2) 参照)。
1532 このタイマーが通知の配送に使用するシグナル番号である。 スラッシュの後ろは、シグナルハンドラーに渡される
1533 \fIsigev_value.sival_ptr\fP 値である。 シグナルで通知されるタイマーでのみ有効である。
1536 スラッシュの前の部分は、このタイマーが使用する通知の配送方法であり、「スレッド」「シグナル」「なし」のいずれかである。 スラッシュのすぐ後には、
1537 \fBSIGEV_THREAD_ID\fP 通知を行うタイマーでは文字列の "tid" が、 もしくは他の方法で通知するタイマーでは "pid"
1538 が表示される。 "." の後ろは、 そのタイマーがシングルで通知を配送する場合にはシグナルの配送対象となるプロセスの PID である。
1541 このフィールドはタイマーが時間を計測するのに使用するクロックを示す。 ほとんどのクロックでは、このフィールドは \fI<time.h>\fP
1542 で公開されるユーザー空間の \fBCLOCK_*\fP 定数のいずれかの数字である。 \fBCLOCK_PROCESS_CPUTIME_ID\fP
1543 タイマーでは、このフィールドに \-6 が表示される。 \fBCLOCK_THREAD_CPUTIME_ID\fP タイマーでは \-2 が表示される。
1546 \fI/proc/bus/pccard/drivers\fP
1549 いくつかのサブディレクトリがあり、 PCI バス・インストールされているデバイス・ デバイスドライバの情報が書かれた仮想ファイルがある。
1550 これらのファイルのうちいくつかは ASCII フォーマットではない。
1552 \fI/proc/bus/pci/devices\fP
1553 PCI デバイスの情報。 \fBlspci\fP(8) や \fBsetpci\fP(8) でアクセスすることができる。
1556 ブート時に Linux カーネルに渡された引き数。 引き数の受け渡しは、たいてい \fBlilo\fP(8) や \fBgrub\fP(8)
1557 といったブートマネージャを使って行われる。
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 の内容は次のコマンドで得られる内容と同じである。
1567 cat /lib/modules/$(uname \-r)/build/.config
1571 \fI/proc/config.gz\fP が提供されるのは、カーネルの設定で \fBCONFIG_IKCONFIG_PROC\fP
1575 このファイルは、CPU およびシステムアーキテクチャに依存する項目を 集めたもので、リストの内容はサポートされているアーキテクチャ毎に異なる。 2
1576 つだけ共通の項目がある。 \fIprocessor\fP はプロセッサ番号で、 \fIbogomips\fP はカーネルの初期化時に計算されるシステム定数である。
1577 SMP マシンでは各 CPU についての情報が書かれている。 \fBlscpu\fP(1) コマンドはこのファイルから情報を収集する。
1580 メジャーデバイス番号とデバイスグループのテキスト形式のリスト。 MAKEDEV スクリプトはこのファイルを使って、
1583 \fI/proc/diskstats\fP (Linux 2.5.69 以降)
1584 このファイルには各ディスクデバイスのディスク I/O 統計情報が書かれている。 更に詳しい情報は、Linux カーネルソースファイル
1585 \fIDocumentation/iostats.txt\fP を参照すること。
1588 登録されている \fIISA\fP DMA (direct memory access) チャネルのリスト。
1593 \fI/proc/execdomains\fP
1594 実行ドメインのリスト (ABI パーソナリティ)。
1597 カーネルのコンパイル時に \fBCONFIG_FB\fP が定義されている場合、フレームバッファの情報が書かれる。
1599 \fI/proc/filesystems\fP
1600 カーネルが対応しているファイルシステムのテキスト形式のリスト。 カーネルに組み込まれてコンパイルされたファイルシステムと、
1601 カーネルモジュールが現在ロードされているファイルシステムが列挙される (\fBfilesystems\fP(5) 参照)。 ファイルシステムに
1602 "nodev" という印が付いている場合、 そのファイルシステムがマウントするためのブロックデバイスを 必要としないことを意味する (例えば、
1603 仮想ファイルシステム、ネットワークファイルシステムなど)。
1605 ちなみに、マウント時にファイルシステムが指定されず、 どうやってもファイルシステムの種類を判定できなかった際に、 このファイルを \fBmount\fP(8)
1606 が使用するかもしれない。 その場合、このファイルに含まれるファイルシステムが試される (ただし、"nodev" の印がついたものは除く)。
1609 .\" FIXME Much more needs to be said about /proc/fs
1611 マウントされているファイルシステムに関する情報を提供するファイルが入ったサブディレクトリが入っている。
1614 このディレクトリは IDE バスをもつシステムに存在する。 各 IDE チャネルとそれに取り付けられている各デバイスごとにディレクトリがあり、
1622 geometry 物理ジオメトリと論理ジオメトリ
1627 smart_thresholds 16 進数表記
1628 smart_values 16 進数表記
1632 \fBhdparm\fP(8) ユーティリティは、分かりやすい形式で この情報にアクセスするための手段を提供する。
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 で表記されている。
1642 Linux 2.4 における I/O メモリマップ。
1645 現在登録され使われている I/O ポート領域のリスト。
1647 \fI/proc/kallsyms\fP (Linux 2.5.71 以降)
1648 カーネルの外部シンボル定義を保持する。 \fBmodules\fP(X) 関係のツールがローダブルモジュールを動的にリンクしたり バインド (bind)
1649 するのに使われる。 Linux 2.5.47 以前では、微妙に異なる書式の似たようなファイルが \fIksyms\fP という名前であった。
1652 このファイルはシステムの物理メモリを表現しており、 ELF コアファイル形式 (core file format) で保持されている。
1653 この擬似ファイルと strip されていないカーネルのバイナリ (\fI/usr/src/linux/vmlinux\fP) [訳注:
1654 パッケージに依存する]) があれば、 GDB はカーネル内の任意のデータ構造の現在の状態を調べられる。
1656 このファイルの大きさは物理メモリ (RAM) のサイズに 4KB を加えた値である。
1659 このファイルは \fBsyslog\fP(2) システムコールでカーネルメッセージを読み出す代りに使える。
1660 プロセスがこのファイルを読むためにはスーパーユーザー権限が必要であり、 ファイルを読み出すのは 1 つのプロセスのみに限るべきである。
1661 カーネルメッセージを記録するために、 \fBsyslog\fP(2) システムコールの機能を使う syslog プロセスが稼働している場合、
1664 このファイルの中の情報は \fBdmesg\fP(1) によって表示される。
1666 \fI/proc/kpagecount\fP (Linux 2.6.25 以降)
1667 このファイルには、 各物理ページフレームがマッピングされた回数が 64 ビットカウンターとして入っている。 インデックスはページフレーム番号である
1668 (\fI/proc/[pid]/pagemap\fP の議論を参照)。
1670 \fI/proc/kpagecount\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
1671 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
1673 \fI/proc/kpageflags\fP (Linux 2.6.25 以降)
1674 このファイルには、 各物理ページフレームに対応する 64 ビットマスクが入っている。 インデックスはページフレーム番号である
1675 (\fI/proc/[pid]/pagemap\fP の議論を参照)。 各ビットは以下のとおりである。
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 以降)
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
1707 \fI/proc/kpageflags\fP ファイルが存在するのは、カーネルのコンフィギュレーション・オプション
1708 \fBCONFIG_PROC_PAGE_MONITOR\fP を有効にした場合だけである。
1710 \fI/proc/ksyms\fP (Linux 1.1.23\-2.5.47)
1711 \fI/proc/kallsyms\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 である。
1724 このファイルは現在のファイルロック (\fBflock\fP(2) と \fBfcntl\fP(2)) とリース (\fBfcntl\fP(2)) を表示する。
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 が定義されているときのみ、このファイルは存在する。
1731 このファイルはシステムのメモリ使用状況の統計情報を表示する。 \fBfree\fP(1) はこのファイルを使って、 そのシステムの
1732 (物理メモリとスワップの両方の) 未使用と使用中のメモリ量と、 カーネルが使用している共有メモリとバッファの使用量を表示する。
1733 このファイルの各行は、パラメータ名の後に、 コロン、 パラメータ値が続く。 最後に ("kB" などの) 計測単位がある場合もある。 以下のリストでは、
1734 フィールド名と、フィールド値を読み込むのに必要なフォーマット指定子 (format specifier) について説明する。
1735 特に注記がある場合を除くと、すべてのフィールドが少なくとも Linux 2.6.0 以降では存在する。
1736 いくつかのフィールドは、カーネルでオプションが有効になっている場合にのみ表示される。 こうした依存関係についてはリスト内に注記がある。
1740 使用可能な RAM の総量 (つまり、 物理 RAM サイズからいくつかの予約ビットとカーネルのバイナリコードの分を引いた値)。
1743 \fILowFree\fP+\fIHighFree\fP の合計値。
1746 Relatively temporary storage for raw disk blocks that shouldn't get
1747 tremendously large (20MB or so).
1750 ディスクから読み出したファイルのインメモリキャッシュ (ページキャッシュ)。 \fISwapCached\fP は含まれない。
1752 \fISwapCached\fP %lu
1753 一度スワップアウトされ、その後スワップインされたが、まだスワップファイルにも存在するメモリ。 (メモリが残り少ない場合、
1754 これらのページは、すでにスワップファイルに存在するので、もう一度スワップアウトする必要がない。 これにより I/O が節約できる。)
1757 最近使用されたメモリで、通常は本当に必要にならない限り回収されないメモリ。
1760 最近あまり使用されていないメモリ。 他の使用するために優先して回収すべきメモリ。
1762 \fIActive(anon)\fP %lu (Linux 2.6.28 以降)
1765 \fIInactive(anon)\fP %lu (Linux 2.6.28 以降)
1768 \fIActive(file)\fP %lu (Linux 2.6.28 以降)
1771 \fIInactive(file)\fP %lu (Linux 2.6.28 以降)
1774 \fIUnevictable\fP %lu (Linux 2.6.28 以降)
1775 (Linux 2.6.28 から 2.6.30 まででは \fBCONFIG_UNEVICTABLE_LRU\fP が必要であった。) [後で記載する]
1777 \fIMlocked\fP %lu (Linux 2.6.28 以降)
1778 (Linux 2.6.28 から 2.6.30 まででは \fBCONFIG_UNEVICTABLE_LRU\fP が必要であった。) [後で記載する]
1781 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) highmem の総量。 highmem は物理メモリの 860MB
1782 付近よりも上の部分のメモリ領域全体のことである。 highmem 領域はユーザー空間プログラムとページキャッシュで使用される。
1783 カーネルはこのメモリにアクセスするのに小技を使っており、 lowmem よりもアクセスが遅くなる。
1786 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) 未使用の highmem 量。
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.
1796 (Linux 2.6.19 以降では \fBCONFIG_HIGHMEM\fP が必要) 未使用の lowmem 量。
1798 \fIMmapCopy\fP %lu (Linux 2.6.29 以降)
1799 (\fBCONFIG_MMU\fP が必要) [後で記載する]
1808 ディスクに書き戻されるのを待っているメモリ。
1813 \fIAnonPages\fP %lu (Linux 2.6.18 以降)
1814 ユーザー空間ページテーブルにマッピングされているファイルと関連付けられていないページ。
1817 (\fBmmap\fP(2) で) メモリにマッピングされているファイル。 ライブラリなど。
1819 \fIShmem\fP %lu (Linux 2.6.32 以降)
1825 \fISReclaimable\fP %lu (Linux 2.6.19 以降)
1826 回収可能な \fISlab\fP。 キャッシュなど。
1828 \fISUnreclaim\fP %lu (Linux 2.6.19 以降)
1829 メモリ消費が激しい際でも回収できない \fISlab\fP。
1831 \fIKernelStack\fP %lu (Linux 2.6.32 以降)
1832 カーネルスタックに割り宛てられているメモリ量。
1834 \fIPageTables\fP %lu (Linux 2.6.18 以降)
1835 Amount of memory dedicated to the lowest level of page tables.
1837 \fIQuicklists\fP %lu (Linux 2.6.27 以降)
1838 (\fBCONFIG_QUICKLIST\fP が必要) [後で記載する]
1840 \fINFS_Unstable\fP %lu (Linux 2.6.18 以降)
1841 サーバに送信されたが、まだ永続的なストレージには書き込まれていない NFS ページ。
1843 \fIBounce\fP %lu (Linux 2.6.18 以降)
1844 Memory used for block device "bounce buffers".
1846 \fIWritebackTmp\fP %lu (Linux 2.6.26 以降)
1847 FUSE で一時的なライトバックバッファに使われているメモリ。
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.
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.
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.
1873 \fIVmallocTotal\fP %lu
1876 \fIVmallocUsed\fP %lu
1879 \fIVmallocChunk\fP %lu
1880 vmalloc 領域の未使用の連続するブロックの最大サイズ。
1882 \fIHardwareCorrupted\fP %lu (Linux 2.6.32 以降)
1883 (\fBCONFIG_MEMORY_FAILURE\fP が必要) [後で記載する]
1885 \fIAnonHugePages\fP %lu (Linux 2.6.38 以降)
1886 (\fBCONFIG_TRANSPARENT_HUGEPAGE\fP が必要)
1887 ユーザー空間ページテーブルにマッピングされているファイルと関連付けられていないヒュージページ。
1889 \fIHugePages_Total\fP %lu
1890 (\fBCONFIG_HUGETLB_PAGE\fP が必要) ヒュージページのプールサイズ。
1892 \fIHugePages_Free\fP %lu
1893 (\fBCONFIG_HUGETLB_PAGE\fP が必要) プール内の割り当てられていないヒュージページ数。
1895 \fIHugePages_Rsvd\fP %lu (Linux 2.6.17 以降)
1896 (\fBCONFIG_HUGETLB_PAGE\fP が必要) プールから割り当てが宣言されたが、まだ割り当てが行われていないヒュージページ数。
1897 これらの予約ヒュージページにより、 アプリケーションがメモリフォールト時にヒュージページのプールからヒュージページが割り当てられることが保証される。
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.
1905 \fIHugepagesize\fP %lu
1906 (\fBCONFIG_HUGETLB_PAGE\fP が必要) ヒュージページのサイズ。
1910 現在システムにロードされているモジュールのテキスト形式のリスト。 \fBlsmod\fP(8) も参照。
1913 カーネル 2.4.19 より前では、このファイルは現在システムにマウントされている 全てのファイルシステムのリストであった。 Linux 2.4.19
1914 でプロセス単位のマウント名前空間が導入されたことに伴い、 このファイルは \fI/proc/self/mounts\fP へのリンクとなった。
1915 \fI/proc/self/mounts\fP はそのプロセス自身のマウント名前空間のマウントポイントのリストである。 このファイルのフォーマットは
1916 \fBfstab\fP(5) に記述されている。
1919 Memory Type Range Registers。 詳細は、Linux カーネルソースファイル \fIDocumentation/mtrr.txt\fP
1923 さまざまなネットワークについての擬似ファイルで、 それぞれがネットワーク層の各種の状態を与える。 これらのファイルの内容は ASCII 形式なので、
1924 \fBcat\fP(1) で読み出せる。 とはいえ基本コマンドの \fBnetstat\fP(8) はこれらのファイルの内容のよりすっきりとした表示を提供する。
1927 アドレス解決に使われるカーネルの ARP テーブルの ASCII 可読なダンプを保持している。 動的結合されたものと固定 (preprogrammed)
1928 の両方の APP エントリを見ることができる。フォーマットは以下のとおり:
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
1938 ここで IP address はマシンの IPv4 アドレス、 HW type はそのアドレスの RFC\ 826 で定められているハードウェアの形式、
1939 Flags は ARP 構造体 (\fI/usr/include/linux/if_arp.h\fP 内で定義されている) の内部フラグ、 HW
1940 address はその IP アドレスにマップされているデータリンク層のアドレス (もしわかっていれば) である。
1943 擬似ファイル dev はネットワークデバイスの状態情報を含んでいる。 これは送受信したパケット数、エラーとコリジョン (collision) の回数、
1944 その他の基本的な統計を与える。 これらは \fBifconfig\fP(8) がデバイスの状態を報告するのに使われる。 フォーマットは以下のとおり:
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
1957 .\" .I /proc/net/ipx
1960 .\" .I /proc/net/ipx_route
1963 \fI/proc/net/dev_mcast\fP
1964 \fI/usr/src/linux/net/core/dev_mcast.c\fP で定義されており、以下の形式である。
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
1974 \fI/proc/net/igmp\fP
1975 Internet Group Management Protocol (インターネットグループ管理プロトコル)。
1976 \fI/usr/src/linux/net/core/igmp.c\fP で定義されている。
1978 \fI/proc/net/rarp\fP
1979 このファイルは \fIarp\fP と同じフォーマットで 逆アドレス解決サービス (reverse address lookup services)
1980 \fBrarp\fP(8) に提供するために使われる現在の逆マップデータベースの内容を含んでいる。 RARP
1981 がカーネルコンフィグレーションに設定されていなければ、 このファイルは存在しない。
1985 .\" .I /proc/net/route
1986 .\" No information, but looks similar to
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 を保持している。
1997 \fI/proc/net/snmp\fP
1998 このファイルは SNMP エージェントが必要とする IP, ICMP, TCP, UDP 管理情報を ASCII データとして保持している。
2001 TCP ソケットテーブルのダンプを保持している。 大部分の情報はデバッグ以外には
2002 使われない。 sl はソケットのカーネルハッシュスロットの値、 \&"local_address"
2003 はローカルアドレスとポート番号のペアである。 (ソケットが接続している場合は)
2004 \&"rem_address" はリモートアドレスとポート番号の対である。 \&"st" はソケット
2005 の内部状態である。 \&"tx_queue" と "rx_queue" はカーネルメモリを消費している
2006 送信/受信データキューのサイズ。 \&"tr" と "tm\->when" と "rexmits"
2007 フィールドはソケット状態のカーネル 内部情報を保持しているが、
2008 これらはデバッグのときにしか役に立たない。 \&"uid" フィールドはソケット
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 を保持している。 フォーマットは以下のとおり:
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
2030 \fI/proc/net/unix\fP
2031 UNIX ドメインソケットのリスト。 フォーマットは以下のとおり:
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
2040 ここで、Num はカーネルのテーブルスロット数、 RefCount はソケットを使用して
2041 いるユーザー数、 Protocol はいまのところいつも 0 で、Flags はソケットの状態
2042 を保持している カーネル内部のフラグである。 Type はいまのところいつも 1
2043 (UNIX ドメインのデータグラムソケットは、現在のカーネルではサポートされていない
2044 [訳注: 2.0.34 ではサポートされているようだ])。
2045 St はソケットの内部状態で、Path は(もしあれば) ソケットのパス名である。
2047 \fI/proc/net/netfilter/nfnetlink_queue\fP
2048 このファイルは netfilter ユーザー空間キューイングが使用されている場合 netfilter ユーザー空間キューイングの情報を表示する。
2049 各行が各キューの情報を表示する。 ユーザー空間で購読されていないキューは表示されない。
2052 1 4207 0 2 65535 0 0 0 1
2053 (1) (2) (3)(4) (5) (6) (7) (8)
2060 キューの ID。 これは \fBiptables\fP(8) NFQUEUE ターゲットの \fB\-\-queue\-num\fP や
2061 \fB\-\-queue\-balance\fP オプションで指定された値と一致する。 詳しい情報は \fBiptables\-extensions\fP(8) を参照。
2064 キューを購読している netlink ポート ID。
2067 現在キューに入っていてアプリケーションが処理するのを待っているパケット数。
2070 キューのコピーモード。 値は 1 (メタデータのみ) か 2 (ペイロードデータもユーザー空間にコピーする) のいずれかである。
2073 コピーする範囲。 つまり、 最大で何バイトのパケットペイロードをユーザー空間にコピーする必要があるかを示す。
2076 キューでの破棄数。 すでに多数のパケットがユーザー空間が必ず必要な受け入れ/破棄の判定を送り返すのを待っていたため、
2077 カーネルがドロップする必要があったパケット数。
2080 キューのユーザーでのドロップ数。 netlink サブシステム内で破棄されたパケット数。 このようなパケットの破棄が通常起こるのは、
2081 対応するソケットバッファが一杯の場合、 つまり、 ユーザー空間がメッセージを十分な速度で読み出せない場合である。
2084 シーケンス番号。 キューに入ったすべてのパケットには 32 ビットの単調増加のシーケンス番号が関連付けられる。 これは一番最近キューに入ったパケットの
2088 最後の数字は互換性のためだけに存在し、 常に 1 である。
2090 \fI/proc/partitions\fP
2091 各パーティションのメジャー番号とマイナー番号が書かれている。 さらに、 1024 バイトブロック数とパーティション名も書かれている。
2094 カーネルの初期化時に見つかったすべての PCI デバイスのリストと その設定。
2096 .\" FIXME Document /proc/sched_debug
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
2107 \fI/proc/profile\fP (Linux 2.4 以降)
2108 このファイルは、 カーネルが \fIprofile=1\fP コマンドラインオプションで起動された場合にのみ存在する。 このファイルは、
2109 カーネルのプロファイリング情報を \fBreadprofile\fP(1) を使って読み込めるバイナリ形式で公開する。 このファイルに
2110 (例えば、空の文字列を) 書き込むと、プロファイリングカウンターがリセットされる。 いくつかのアーキテクチャでは、 サイズ \fIsizeof(int)\fP
2111 のバイナリ整数である「プロファイリング倍率」を書き込むとプロファイリングの割り込み頻度を設定できる。
2114 \fIscsi\fP 中間レベル擬似ファイルといくつかの SCSI 低レベルドライバの ディレクトリを含むディレクトリ。 これらのファイルは ASCII
2115 で表現されているので \fBcat\fP(1) で読める。
2117 いくつかのファイルは書き込み可能で、サブシステムの設定を変更したり、 特定の機能をオン/オフすることができる。
2119 \fI/proc/scsi/scsi\fP
2120 カーネルが知っているすべての SCSI デバイスのリスト。 このリストは起動時に (コンソールで) 見られるものとほぼ同じである。 scsi
2121 は現在のところ \fIadd\-single\-device\fP コマンドのみをサポートしている。 これによりルート (root)
2122 は既知のデバイスリストへ活線挿抜 (hotplugged) デバイスを加えることができる。
2128 echo \(aqscsi add\-single\-device 1 0 5 0\(aq > /proc/scsi/scsi
2132 ホストアダプタ scsi1 は SCSI チャネル 0 で ID 5 LUN 0 のデバイスを探す。 もしこのアドレスに既知のデバイスがあるか、
2133 不正なアドレスであったならばエラーが返る。
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 登録されたホストアダプタに対応してファイルが作られる。 このファイルの名前は、システムの初期化の際に ホストアダプタに割り当てられた番号になる。
2142 これらのファイルを読めばドライバとホストアダプタの設定や 統計などを見ることができる。
2144 これらのファイルへの書き込みはホストアダプタごとに異なる動作を引き起こす。 たとえば \fIlatency\fP と \fInolatency\fP
2145 コマンドを用いると、 ルート (root、スーパーユーザー) は eata_dma ドライバの隠し測定コードの オン/オフを切り替えることができる。
2146 また \fI lockup\fP と \fIunlock\fP コマンドを用いると、ルートは scsi_debug ドライバがシミュレートするバスロックアップ
2147 (bus lockup) を 制御することができる。
2150 このディレクトリはプロセスに (プロセス自身の) \fI/proc\fP ファイルシステムへのアクセスを参照させる。 これは \fI/proc\fP 内の
2151 (このプロセスの) プロセス ID が名前となっている ディレクトリと全く同一である。
2153 \fI/proc/slabinfo\fP
2154 Linux 2.6.16 以降では、 カーネル設定オプション \fBCONFIG_SLAB\fP が有効の場合にのみ、このファイルは存在する。
2155 カーネルキャッシュの情報。 \fI/proc/slabinfo\fP のフィールドは以下のとおり。
2165 num\-pages\-per\-slab
2169 詳細は \fBslabinfo\fP(5) を参照すること。
2172 カーネル/システムの統計。 アーキテクチャによって異なる。 共通エントリには以下のものが含まれる。
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 を使って取得できる)。
2185 (2) 低い優先度 (nice) のユーザーモードで消費した時間。
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 倍した値になるはずである。
2197 \fIiowait\fP (Linux 2.5.41 以降)
2200 \fIirq\fP (Linux 2.6.0\-test4 以降)
2203 \fIsoftirq\fP (Linux 2.6.0\-test4 以降)
2204 (7) ソフト割り込みの処理に使った時間。
2206 \fIsteal\fP (Linux 2.6.11 以降)
2207 (8) 盗まれた時間 (stolen time)。仮想化環境での動作時に他のオペレーティングシステムにより消費された時間である。
2209 \fIguest\fP (Linux 2.6.24 以降)
2210 .\" See Changelog entry for 5e84cfde51cf303d368fcb48f22059f37b3872de
2211 (9) Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU の 実行に消費された時間。
2213 \fIguest_nice\fP (Linux 2.6.33 以降)
2214 .\" commit ce0e7b28fb75cb003cfc8d0238613aaf1c55e797
2215 (10) nice が適用されたゲスト (Linux カーネルの制御下のゲストオペレーティングシステムの仮想 CPU) の 実行に消費された時間。
2218 \fIpage 5741 1808\fP
2219 システムが (ディスクから) ページイン/ページアウトしたページ数。
2222 スワップイン/スワップアウトされたページ数。
2224 .\" FIXME . The following is not the full picture for the 'intr' of
2225 .\" /proc/stat on 2.6:
2227 この行はシステム起動時以降に処理された割り込みの回数を示す。 最初の欄は処理された割り込み全ての合計であり、
2228 これには番号が割り振られていないアーキテクチャー固有の割り込みも含まれる。 それ以降の欄はそれぞれ番号が割り振られた割り込みについての合計である。
2229 番号が割り振られていない割り込みは表示されず、 全体の合計にのみ加算される。
2231 \fIdisk_io: (2,0):(31,30,5764,1,2) (3,0):\fP...
2232 (メジャー番号, ディスクインデックス番号):(情報なし (noinfo), 読み込み回数, 読み込みブロック数, 書き出し回数, 書き出しブロック数)
2239 \fIbtime 769041601\fP
2240 起動時刻、紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) からの秒数。
2242 \fIprocesses 86031\fP
2243 システム起動時からの延べフォーク (fork) 数。
2245 \fIprocs_running 6\fP
2246 実行中状態のプロセス数 (Linux 2.5.45 以降)。
2248 \fIprocs_blocked 2\fP
2249 I/O 完了待ちで停止 (blocked) しているプロセス数 (Linux 2.5.45 以降)。
2253 使用中のスワップ領域。 \fBswapon\fP(8) も参照すること。
2256 このディレクトリ (1.3.57 以降に存在) はカーネル変数に対応するいくつかの
2257 ファイルとサブディレクトリを含む。 これらの変数は読み出し可能である。
2258 また場合によっては \fI/proc\fP ファイルシステムや、 (非推奨の) システムコール
2259 \fBsysctl\fP(2) を用いて書き換えることもできる。
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 を参照すること。
2266 \fI/proc/sys/debug\fP
2270 このディレクトリにはデバイス特有の情報 (たとえば \fIdev/cdrom/info\fP) が含まれる。
2271 このディレクトリが空になっているシステムもある。
2274 このディレクトリには、ファイルシステムに関連するカーネル変数用の
2275 ディレクトリとサブディレクトリが含まれる。
2277 \fI/proc/sys/fs/binfmt_misc\fP
2278 このディレクトリ以下のファイルについてのドキュメントは、 Linux カーネルソースの \fIDocumentation/binfmt_misc.txt\fP
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 つの数字が書かれている。
2287 \fInr_dentry\fP は割り当てられた dentry (dcache エントリ) の数である。 このフィールドは Linux 2.2
2290 \fInr_unused\fP は未使用の dentry 数である。
2292 .\" looks like this is unused in kernels 2.2 to 2.6
2293 \fIage_limit\fP は、メモリが不足している場合に次に dcache entry を再要求できるように なるまでの残り時間 (秒数) である。
2295 .\" looks like this is unused in kernels 2.2 to 2.6
2296 \fIwant_pages\fP は、カーネルが shrink_dcache_pages() を呼び出したが dcache がまだ縮小されていない場合に、0
2300 \fI/proc/sys/fs/dir\-notify\-enable\fP
2301 このファイルは \fBfcntl\fP(2) に記述されている \fIdnotify\fP インターフェースをシステム全体で無効にしたり有効にしたりする。
2302 このファイルに値 0 が書かれている場合はインターフェースが無効になり、 値 1 の場合は有効になる。
2304 \fI/proc/sys/fs/dquot\-max\fP
2305 このファイルにはキャッシュされるディスク quota エントリの最大数が書かれている。 (2.4 系の)
2306 システムの中には、このファイルが存在しないものもある。 キャッシュされるディスク quota エントリの空きが非常に少なく、
2307 とても多くのシステムユーザーが同時に存在する場合、 この制限を上げるといいかもしれない。
2309 \fI/proc/sys/fs/dquot\-nr\fP
2310 このファイルには割り当てられているディスク quota のエントリ数と、 空いているディスク quota のエントリ数が書かれている。
2312 \fI/proc/sys/fs/epoll\fP (Linux 2.6.28 以降)
2313 このディレクトリには、ファイル \fImax_user_watches\fP がある。 これらは、 \fIepoll\fP
2314 インタフェースが消費するカーネルメモリ量を制限するのに使用できる。 詳細は \fBepoll\fP(7) を参照。
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 を探すとよい) がカーネルログに大量に出る場合は、以下のようにこの値を増加させてみるとよい。
2325 \f(CW echo 100000 > /proc/sys/fs/file\-max\fP
2328 \fIfile\-max\fP に書かれている値は、カーネル定数 \fBNR_OPEN\fP に制限される。
2330 特権プロセス (\fBCAP_SYS_ADMIN\fP) は \fIfile\-max\fP 上限を上書きできる。
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
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 を使い果たしている場合は、この値を増やす必要がある。
2351 Linux 2.4 以降では、 inode 数の静的な上限はなくなり、 このファイルは削除された。
2353 \fI/proc/sys/fs/inode\-nr\fP
2354 このファイルには、 \fIinode\-state\fP の最初の 2 つの値が書かれている。
2356 \fI/proc/sys/fs/inode\-state\fP
2357 このファイルには 7 つの数字が入っている。 \fInr_inodes\fP, \fInr_free_inodes\fP, \fIpreshrink\fP と 4
2360 .\" This can be slightly more than
2362 .\" because Linux allocates them one page full at a time.
2363 \fInr_inodes\fP はシステムが割り当て済みの inode 数である。 \fInr_free_inodes\fP は未使用の inode 数である。
2365 \fIpreshrink\fP は、 \fInr_inodes\fP > \fIinode\-max\fP で、 システムがさらに inode
2366 を割り当てるのではなく inode リストを刈り取る (余分なものを回収する) 必要がある場合に、 0 以外になる。 Linux 2.4 以降では、
2367 このフィールドはダミーの値 (常に 0) である。
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) を参照。
2374 \fI/proc/sys/fs/lease\-break\-time\fP
2375 このファイルは、ファイルを保持しているプロセスに対して カーネルがシグナルを送り、
2376 他のプロセスがそのファイルをオープンするのを待っていることを通知してから、 そのプロセスに対してカーネルがファイルのリース (lease, 貸し出し)
2377 (\fBfcntl\fP(2) を参照) を許す猶予期間を指定する。 リースホルダ (lease holder: ファイルの貸し出しを受けているプロセス)
2378 が 猶予期間中にリースを削除するか階級を低くしない場合、 カーネルはファイルのリースを強制的に止める。
2380 \fI/proc/sys/fs/leases\-enable\fP
2381 このファイルはシステム全体でのファイルリース (\fBfcntl\fP(2) を参照) を有効または無効にする。 ファイルに値 0
2382 が書き込まれている場合、リースは無効である。 0 以外の場合にはリースは有効である。
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) を参照。
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 ディスクに書き込まれる前にオーバーフロー値に変換される。
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 このファイルに設定できる最小値はシステムのページサイズである。
2400 \fI/proc/sys/fs/protected_hardlinks\fP (Linux 3.6 以降)
2401 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
2402 このファイルの値が 0 の場合、 ハードリンクの作成には何の制限も適用されない (すなわち、 Linux 3.6 より前の伝統的な動作である)。
2403 このファイルの値が 1 の場合、以下の条件のいずれか一つが成立する場合にのみ、 リンク先のファイルへのハードリンクが作成できる。
2406 呼び出し元が \fBCAP_FOWNER\fP ケーパビリティを持っている。
2408 そのリンクを作成中のプロセスのファイルシステム UID が、 リンク先ファイルの所有者 (UID) と一致する (\fBcredentials\fP(7)
2409 に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。
2416 リンク先ファイルで set\-user\-ID 許可ビットが有効になっていない。
2418 リンク先ファイルで、 許可ビット set\-group\-ID と group\-executable が同時に有効になっていない。
2420 呼び出し元は、 リンク先ファイルの読み出し、書き込み許可を持っている
2421 (ファイルの許可マスクで許可されているか、適切なケーパビリティを持っているかは問わない)。
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.
2435 \fI/proc/sys/fs/protected_symlinks\fP (Linux 3.6 以降)
2436 .\" commit 800179c9b8a1e796e441674776d11cd4c05d61d7
2437 このファイルの値が 0 の場合、 以下のシンボリックリンクを辿る際に何の制限も適用されない (すなわち、 Linux 3.6
2438 より前の伝統的な動作である)。 このファイルの値が 1 の場合、 以下の状況においてのみシンボリックリンクが辿られる。
2441 そのリンクを辿っているプロセスのファイルシステム UID が、 シンボリックリンクの所有者 (UID) と一致する (\fBcredentials\fP(7)
2442 に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。
2444 そのリンクが world\-writable の sticky ビットがセットされたディレクトリではない。
2446 シンボリックリンクとその親ディレクトリが同じ所有者 (UID) である。
2449 システムコールが上記の制約によりシンボリックリンクを辿れなかった場合は、 \fIerrno\fP にエラー \fBEACCES\fP が設定される。
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.
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 (汚染された; ライセンスがカーネルと適合しない) バイナリに対して、コアダンプファイルを 生成するかどうかが決定される。 以下の
2463 この値を指定すると、以前と同じ (Linux 2.6.13 より前の) 動作をする。 (\fBseteuid\fP(2), \fBsetgid\fP(2)
2464 などを呼び出すことや、set\-user\-ID や set\-group\-ID されたプログラムを 実行することで) 資格情報 (credentials)
2465 が変更されているプロセスや、 プロセスの実行バイナリの読み出し許可がないプロセスに対して、 コアダンプを生成しない。
2468 すべてのプロセスで、可能であればコアダンプを行う。 コアダンプファイルの所有者は、ダンプを行うプロセスのファイルシステム UID
2469 となり、セキュリティ上の考慮は行われない。 この値は、システムデバッグの場面だけを想定して設けられている。 ptrace のチェックも行われない。
2471 \fI2\ ("suidsafe")\fP
2472 通常はダンプされないようなバイナリ (上記の "0" 参照) を root だけが読み出し可能な形でダンプする。
2473 この場合、ユーザはそのコアダンプファイルを削除することはできるが、 読むことはできない。 セキュリティ上の理由から、このモードのコアダンプでは、
2474 既存のダンプファイルや他のファイルを上書きすることはない。 このモードは、管理者が通常の環境で問題を解析しようとする際に 適している。
2476 .\" 9520628e8ceb69fa9a4aee6b57f22675d9e1b709
2477 .\" 54b501992dd2a839e94e76aa392c392b55080ce8
2478 さらに、 Linux 3.6 以降では、 \fI/proc/sys/kernel/core_pattern\fP
2479 は絶対パス名かパイプコマンドでなければならない。 \fBcore\fP(5) に詳しい説明がある。 \fIcore_pattern\fP
2480 がこれらのルールに合致しない場合は、 警告がカーネルログに書き込まれ、 コアダンプは生成されない。
2483 このファイルはスーパブロックの値を制御する。
2484 この値はカーネルがマウントできるファイルシステムの最大値になる。 現在、 \fIsuper\-max\fP で許可されているファイルシステム数以上に
2485 マウントする必要がある場合は、この値を増加させるだけでよい。
2487 \fI/proc/sys/fs/super\-nr\fP
2488 このファイルには現在マウントされているファイルシステム数が書かれている。
2490 \fI/proc/sys/kernel\fP
2491 このディレクトリには、以下で説明する様々なカーネルパラメータを 制御するためのファイルが配置されている。
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 秒間有効である点に注意すること。
2501 \fI/proc/sys/kernel/cap_last_cap\fP (Linux 3.2 以降)
2502 \fBcapabilities\fP(7) 参照。
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) を参照。
2510 \fI/proc/sys/kernel/core_pattern\fP
2513 \fI/proc/sys/kernel/core_uses_pid\fP
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 プログラムに送られてどのように扱うかが決められる。
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 ケーパビリティを持ったユーザーだけがこのファイルの値を変更できる。
2530 \fI/proc/sys/kernel/domainname\fP と \fI/proc/sys/kernel/hostname\fP
2531 これらのファイルは、コマンド \fBdomainname\fP(1), \fBhostname\fP(1) と全く同じ方法で、 マシンの NIS/YP
2532 ドメイン名とホスト名の設定に使える。 すなわち
2536 #\fB echo \(aqdarkstar\(aq > /proc/sys/kernel/hostname\fP
2537 #\fB echo \(aqmydomain\(aq > /proc/sys/kernel/domainname\fP
2545 #\fB hostname \(aqdarkstar\(aq\fP
2546 #\fB domainname \(aqmydomain\(aq\fP
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 ページを参照すること。
2555 \fI/proc/sys/kernel/hotplug\fP
2556 このファイルはホットプラグ・ポリシー・エージェントのパスが書かれている。 このファイルのデフォルト値は \fI/sbin/hotplug\fP である。
2558 \fI/proc/sys/kernel/htab\-reclaim\fP
2559 (PowerPC のみ) このファイルを 0 以外の値に設定すると、 PowerPC htab (カーネルソースファイル
2560 \fIDocumentation/powerpc/ppc_htab.txt\fP 参照) を、システムがアイドルループになるたびに切り詰める。
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.
2576 \fI/proc/sys/kernel/l2cr\fP
2577 (PowerPC のみ) このファイルには G3 プロセッサボードの L2 キャッシュを制御するフラグが含まれる。 0 の場合、キャッシュは無効になる。
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 以前のみに存在) に記述されている。
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 オプションを有効にしてコンパイルされている場合だけである。
2593 \fI/proc/sys/kernel/msgmax\fP (Linux 2.2 以降)
2594 このファイルは、System V メッセージキューに書き込まれる 1 つのメッセージの 最大バイト数を、システム全体で制限する。
2596 \fI/proc/sys/kernel/msgmni\fP (Linux 2.4 以降)
2597 このファイルはメッセージキュー識別子の最大数をシステム全体で制限する。
2599 \fI/proc/sys/kernel/msgmnb\fP (Linux 2.2 以降)
2600 このファイルは、 \fImsg_qbytes\fP の設定を初期化するシステム全体のパラメータで
2601 ある。 \fImsg_qbytes\fP は以降で作成されるメッセージキューで使われる。
2602 \fImsg_qbytes\fP 設定では、メッセージキューに書き込まれる最大バイト数を指定する。
2604 \fI/proc/sys/kernel/ngroups_max\fP (Linux 2.6.4 以降)
2605 このファイルは、プロセスグループのメンバー数の上限値を表示する読み出し専用のファイルである。
2607 \fI/proc/sys/kernel/ostype\fP と \fI/proc/sys/kernel/osrelease\fP
2608 これらのファイルは文字列 \fI/proc/version\fP の各部分を与える。
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
2614 \fI/proc/sys/kernel/panic\fP
2615 このファイルはカーネル変数 \fIpanic_timeout\fP への読み出しと書き込みのアクセスを与える。 この値が 0 ならば、パニック時にカーネルは
2616 (無限) ループに入る。 0 でなければ、その秒数だけ待ってから自動的に再起動する。 ソフトウェア watchdog ドライバを使っている場合、
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 でない場合、マシンは再起動される。
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)
2634 \fI/proc/sys/kernel/powersave\-nap\fP (PowerPC のみ)
2635 このファイルにはフラグが書かれている。 フラグが設定されると、Linux\-PPC は 省電力の "nap" モードを使う。
2636 設定されない場合は、"doze" モードが使われる。
2638 \fI/proc/sys/kernel/printk\fP
2641 \fI/proc/sys/kernel/pty\fP (Linux 2.6.4 以降)
2642 このディレクトリは、UNIX 98 疑似端末 (\fBpts\fP(4) を参照) の数に関連する
2645 \fI/proc/sys/kernel/pty/max\fP
2646 このファイルは疑似端末の最大数を定義する。
2648 \fI/proc/sys/kernel/pty/nr\fP
2649 この読み出し専用のファイルは、現在いくつの疑似端末が使われているかを表す。
2651 \fI/proc/sys/kernel/random\fP
2652 このディレクトリは、ファイル \fI/dev/random\fP の操作を制御する様々なパラメータが書かれている。 詳細は \fBrandom\fP(4)
2655 \fI/proc/sys/kernel/random/uuid\fP (Linux 2.4 以降)
2656 この読み出し専用のファイルから読み出しを行うごとに、 ランダムに生成した 128 ビットの UUID を、 標準の UUID 形式の文字列として返す。
2658 \fI/proc/sys/kernel/real\-root\-dev\fP
2659 このファイルは Linux カーネルソースファイル \fIDocumentation/initrd.txt\fP に記述されている。
2661 \fI/proc/sys/kernel/reboot\-cmd\fP (Sparc のみ)
2662 このファイルは SPARC ROM/Flash ブートローダに引き数を渡す方法を 提供しているように思われる。
2663 再起動後に何をするかを指定しているのだろうか?
2665 \fI/proc/sys/kernel/rtsig\-max\fP
2666 (2.6.7 までのカーネルにのみ存在する。 \fBsetrlimit\fP(2) を参照すること) このファイルはシステムで発行される POSIX
2667 real\-time (queued) signal の 最大数を調整するのに使用される。
2669 \fI/proc/sys/kernel/rtsig\-nr\fP
2670 (2.6.7 までのカーネルにのみ存在する) このファイルは現在キューに入っている POSIX real\-time signal の数を表す。
2672 \fI/proc/sys/kernel/sched_rr_timeslice_ms\fP (Linux 3.9 以降)
2673 \fBsched_rr_get_interval\fP(2) 参照。
2675 \fI/proc/sys/kernel/sched_rt_period_us\fP (Linux 2.6.25 以降)
2678 \fI/proc/sys/kernel/sched_rt_runtime_us\fP (Linux 2.6.25 以降)
2681 \fI/proc/sys/kernel/sem\fP (Linux 2.4 以降)
2682 このファイルには System V IPC セマフォを制限する 4 つの値が書かれている。 これらのフィールドは次の順番に並んでいる:
2687 システム全体での、全てのセマフォ集合におけるセマフォ数の制限。
2689 \fBsemop\fP(2) コールに指定されるオペレーション数の最大値。
2691 システム全体でのセマフォ識別子の最大値。
2694 \fI/proc/sys/kernel/sg\-big\-buff\fP
2695 このファイルは、汎用 SCSI デバイス (sg) のバッファサイズの最大値を表す。 今はこれを変更することはできないが、 コンパイル時に
2696 \fIinclude/scsi/sg.h\fP を編集して \fBSG_BIG_BUFF\fP の値を変えれば変更できる。
2697 ただし、この値を変更する理由はないだろう。
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.
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
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
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.
2725 \fI/proc/sys/kernel/shmall\fP (Linux 2.2 以降)
2726 このファイルには System V 共有メモリの総ページ数の システム全体での制限が書かれている。
2728 \fI/proc/sys/kernel/shmmax\fP (Linux 2.2 以降)
2729 このファイルを通じて、(System V IPC) 共有メモリセグメントを作成するときの 最大サイズの実行時上限 (run\-time limit)
2730 を取得または設定できる。 現在は 1GB までの共有メモリセグメントが カーネルでサポートされている。 この値のデフォルトは \fBSHMMAX\fP
2733 \fI/proc/sys/kernel/shmmni\fP (Linux 2.4 以降)
2734 このファイルは、システム全体で作成可能な System V 共有メモリセグメント数を指定する。
2736 \fI/proc/sys/kernel/sysrq\fP
2737 このファイルは、SysRq キーにより起動が許可されている関数群を制御する ものである。デフォルトでは、ファイルの内容は 1 であり、
2738 これは起こり得る全ての SysRq リクエストが許可されることを意味する (古いバージョンのカーネルでは、SysRq はデフォルトでは無効になっており、
2739 実行時に明示的に有効にする必要があったが、今はそうではない)。 このファイルで指定可能な値は以下の通り。
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 値の変更を許可する
2753 カーネル設定オプション \fBCONFIG_MAGIC_SYSRQ\fP が有効な場合のみ、このファイルは存在する。 詳細は、Linux
2754 カーネルソースファイル \fIDocumentation/sysrq.txt\fP を参照のこと。
2756 \fI/proc/sys/kernel/version\fP
2757 このファイルには、以下のような文字列が書かれている:
2759 #5 Wed Feb 25 21:49:24 MET 1998
2761 \&"#5" はこのソースで構築された 5 番目のカーネルであることを意味する。 その後にある日付はカーネルが構築された時刻を表す。
2763 \fI/proc/sys/kernel/threads\-max\fP (Linux 2.3.11 以降)
2764 このファイルは、システム全体で作成可能なスレッド数 (タスク数) の上限を指定する。
2766 \fI/proc/sys/kernel/zero\-paged\fP (PowerPC のみ)
2767 このファイルはフラグを含む。 (0 以外の値で) 有効された場合、Linux\-PPC はアイドルループで pre\-zero page
2768 を行うので、get_free_pages の速度が向上する可能性がある。
2771 このディレクトリにはネットワーク関係の情報が入っている。 このディレクトリにあるファイルのいくつかについては、 \fBtcp\fP(7) や
2774 \fI/proc/sys/net/core/somaxconn\fP
2775 このファイルは \fBlisten\fP(2) の \fIbacklog\fP 引き数の上限値を規定する。 詳細は \fBlisten\fP(2)
2778 \fI/proc/sys/proc\fP
2781 \fI/proc/sys/sunrpc\fP
2782 このディレクトリはネットワークファイルシステム (NFS) への Sun remote procedure call (遠隔手続き呼び出し)
2783 をサポートする。 これが存在しないシステムもある。
2786 このディレクトリにはメモリ管理の調整、バッファやキャッシュ管理のための ファイルがある。
2788 \fI/proc/sys/vm/drop_caches\fP (Linux 2.6.16 以降)
2789 このファイルに書き込みを行うと、カーネルに、 クリーンなキャッシュ、 dentry、 inode をメモリから追い出して、
2790 メモリを解放させることができる。 この機能はメモリ管理のテストや再現可能なファイルシステムのベンチマークを行うのに役立つ。
2791 このファイルへの書き込みはキャッシュの利点を失うことになるので、システム全体の性能は低下する可能性がある。
2793 ページキャッシュを解放するには、以下のようにする。
2795 echo 1 > /proc/sys/vm/drop_caches
2797 dentry と inode を解放するには、以下のようにする。
2799 echo 2 > /proc/sys/vm/drop_caches
2801 ページキャッシュ、 dentry、 inode を解放するには、以下のようにする。
2803 echo 3 > /proc/sys/vm/drop_caches
2805 このファイルへの書き込みは非破壊的な操作で、 ダーティな (dirty) オブジェクトは 解放されないので、 この操作を行う際は最初に
2806 \fBsync\fP(1) を実行しておくべきである。
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 の) 配置方法を
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 いくつかの場面では、カーネルはアプリケーションに影響を与えずに透過的に故障を処理する。しかし、データの最新のコピーが他にはない場合には、データ破壊が波及するのを防ぐため、カーネルはプロセスを
2821 このファイルは以下のいずれかの値を持つ。
2824 データ破壊が検出されるとすぐに、故障が検出され復元できないページ (corrupted\-and\-not\-reloadable page)
2825 をマップしている全てのプロセスを kill する。この機能は、(カーネル内部で割り当てられたデータやスワップのキャッシュなど)
2826 少数のいくつかのタイプのページではサポートされていないが、大半のユーザページではこの機能は働く。
2828 データ破壊が検出されたページの全てのプロセスからの unmap のみを行い、そのページにアクセスしようとしたプロセスのみを kill する。
2831 この kill は \fIsi_code\fP に \fBBUS_MCEERR_AO\fP を設定した \fBSIGBUS\fP
2832 シグナルを使って行われる。プロセス側では必要であればこのシグナルを処理することができる。詳細は \fBsigaction\fP(2) を参照。
2834 この機能は、高度なマシンチェック機構を持ったアーキテクチャ/プラットフォームにおいてのみ有効であり、ハードウェア機能にも依存している。
2836 アプリケーションは \fBprctl\fP(2) の \fBPR_MCE_KILL\fP 操作を使って個別に
2837 \fImemory_failure_early_kill\fP の設定を上書きすることができる。
2839 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
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 (プラットフォームがサポートしている場合)
2850 メモリ故障時には常に panic を起こす。
2853 カーネルの設定で \fBCONFIG_MEMORY_FAILURE\fP が有効になっている場合にのみ
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 が起動されたかを知り、 その原因となったならず者のタスクを特定するのに役に立つ。
2864 このファイルの内容が値 0 の場合、ダンプ情報の出力は行われない。 タスクが何千もある非常に巨大なシステムでは、
2865 各々のタスクについてメモリ状態をダンプするのは適切でないかもしれない。 そのようなシステムでは、ダンプ情報が必要でもないときに メモリ不足 (OOM)
2866 の状況で性能面の不利益が起こらないようにすべきだろう。
2868 このファイルの内容が 0 以外の場合、 OOM\-killer が実際にメモリを占有したタスクを kill する度に ダンプ情報が出力される。
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 するかどうかを制御する。
2876 このファイルが 0 に設定された場合、 OOM\-killer はタスクリスト全体をスキャンし、経験則に基づき kill するタスクを選択する。
2877 通常は、kill した場合に多くのメモリが解放できる、 ならず者のメモリ占有タスクが選択される。
2879 このファイルが 0 以外に設定された場合、 OOM\-killer はメモリ不足の状況が発生するきっかけとなったタスクを 単純に kill
2880 するだけである。 これにより、たいていは重い処理となるタスクリストのスキャンを回避できる。
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 の方が優先される。
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 を極め細かく制御できる。
2895 \fIovercommit_kbytes\fP と \fIovercommit_ratio\fP のいずれか一方だけが効果を持つ。
2896 \fIovercommit_kbytes\fP が 0 以外の値を持つ場合、 \fICommitLimit\fP を計算するのに
2897 \fIovercommit_kbytes\fP が使用され、 それ以外の場合 \fIovercommit_ratio\fP が使用される。
2898 これらのファイルのいずれかに値を書き込むと、 他のファイルの値は 0 に設定される。
2900 \fI/proc/sys/vm/overcommit_memory\fP
2901 このファイルにはカーネル仮想メモリのアカウントモードが書かれている。 値は以下の通り:
2904 0: 発見的なオーバーコミット (heuristic overcommit) (これがデフォルトである)
2906 1: 常にオーバーコミットし、チェックしない。
2908 2: 常にチェックし、オーバーコミットしない。
2911 モード 0 では、 \fBMAP_NORESERVE\fP を設定して呼び出された \fBmmap\fP(2) はチェックされない。
2912 またデフォルトのチェックはとても脆弱で、 プロセスを "OOM\-kill" してしまうリスクを引き起こす。 Linux 2.4 では 0
2915 モード 2 (Linux 2.6 以降で利用可能) では、 割り当て可能な仮想アドレス空間 (\fI/proc/meminfo\fP の
2916 \fICommitLimit\fP) は以下で計算される。
2918 CommitLimit = (total_RAM \- total_huge_TLB) *
2919 overcommit_ratio / 100 + total_swap
2924 \fItotal_RAM\fP はシステム上の RAM の総量
2926 \fItotal_huge_TLB\fP はヒュージページ用に確保されたメモリ総量
2928 \fIovercommit_ratio\fP は \fI/proc/sys/vm/overcommit_ratio\fP の値
2930 \fItotal_swap\fP はスワップ空間の総量
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.
2937 Linux 3.14 以降では、 \fI/proc/sys/vm/overcommit_kbytes\fP の値が 0 でない場合、
2938 \fICommitLimit\fP は代わりに以下のように計算される。
2940 CommitLimit = overcommit_kbytes + total_swap
2942 \fI/proc/sys/vm/overcommit_ratio\fP (Linux 2.6.0 以降)
2943 この書き込み可能なファイルは、 オーバーコミットできるメモリーの割合をパーセントで定義する。 このファイルのデフォルト値は 50 である。
2944 \fI/proc/sys/vm/overcommit_memory\fP の説明を参照。
2946 \fI/proc/sys/vm/panic_on_oom\fP (Linux 2.6.18 以降)
2947 .\" The following is adapted from Documentation/sysctl/vm.txt
2948 このファイルは、メモリ不足時にカーネルパニックを 起こすか起こさないかを制御する。
2950 このファイルに値 0 を設定すると、 カーネルの OOM\-killer がならず者のプロセスを kill する。 普通は、OOM\-killer
2951 がならず者のプロセスを kill することができ、 システムは何とか動き続けることができる。
2953 このファイルに値 1 を設定すると、 メモリ不足の状況が発生すると、カーネルは普通はパニックする。 しかしながら、プロセスが メモリポリシー
2954 (\fBmbind\fP(2) の \fBMPOL_BIND\fP) や cpusets (\fBcpuset\fP(7))
2955 を使って特定のノードへのメモリ割り当てを制限していて、 それらのノードでメモリ枯渇状態に至った場合は、 一つのプロセスが OOM\-killer により
2956 kill されるだけかもしれない。 この場合には、カーネルパニックは発生しない。 なぜなら、他のノードのメモリには空きがあるかもしれず、
2957 したがって、システム全体としてはメモリ不足の状況にまだ達していないかも しれないからである。
2959 このファイルに値 2 を設定すると、 メモリ不足の状況が発生するとカーネルは常にパニックを起こす。
2961 デフォルト値は 0 である。 1 と 2 はクラスタリングのフェイルオーバー用である。 フェイルオーバーの方針に応じてどちらかの値を選択すること。
2963 \fI/proc/sys/vm/swappiness\fP
2964 .\" The following is from Documentation/sysctl/vm.txt
2965 このファイルの値により、カーネルがどの程度激しくメモリページの スワップを行う
2966 かが制御される。 大きな値ほどスワップが激しくなり、小さい値ほど激しくなくなる。
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 を参照のこと。
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 にはこれらのファイルから分かる情報の詳細な背景が書かれている。
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 ディレクトリと同一である。
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.
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
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.
3007 The \fI/proc/timer_stats\fP file is used both to control sampling facility and
3008 to read out the sampled information.
3010 The timer_stats functionality is inactive on bootup. A sampling period can
3011 be started using the following command:
3013 # echo 1 > /proc/timer_stats
3015 The following command stops a sampling period:
3017 # echo 0 > /proc/timer_stats
3019 The statistics can be retrieved by:
3021 $ cat /proc/timer_stats
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
3028 \fI/proc/timer_stats\fP のサンプル出力。
3032 $\fB cat /proc/timer_stats\fP
3033 Timer Stats Version: v0.3
3034 Sample period: 1.764 s
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)
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
3049 The output columns are:
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;
3056 the PID of the process that initialized the timer;
3058 the name of the process that initialized the timer;
3060 the function where the timer was initialized; and
3062 (in parentheses) the callback function that is associated with the timer.
3066 疑似ファイルを含むサブディレクトリ。 tty ドライバとライン設定 (line discipline) の書かれた サブディレクトリも含まれる。
3069 このファイルは システム起動時から経過した時間 (秒) と アイドル (idle) しているプロセスが消費した時間 (秒) の 2 つの数を含む。
3072 現在稼働しているカーネルのバージョン識別子である文字列。 これには \fI/proc/sys/ostype\fP,
3073 \fI/proc/sys/osrelease\fP, \fI/proc/sys/version\fP の内容が含まれる。 たとえばこのように:
3076 \f(CWLinux version 1.0.9 (quinlan@phaze) #1 Sat May 14 01:51:54 EDT 1994\fP
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
3085 \fI/proc/vmstat\fP (Linux 2.6 以降)
3086 このファイルは仮想メモリの様々な統計情報を表示する。
3088 \fI/proc/zoneinfo\fP (Linux 2.6.13 以降)
3089 .\" FIXME more should be said about /proc/zoneinfo
3090 このファイルはメモリのゾーン (memory zone) に関する情報を表示する。 仮想メモリの振舞いを分析するのに役立つ。
3092 ほとんどの文字列 (たとえば環境変数やコマンド行) は内部表現のままなので、
3093 各フィールドはヌルバイト (\(aq\e0\(aq) で区切られている。だから、
3094 \fIod \-c\fP や \fItr "\e000" "\en"\fP を使えば、それらはより読みやすくなる。
3095 また \fIecho \`cat <file>\`\fP でもよい。
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 このマニュアルは不完全であり、たぶん不正確で、しばしば更新される必要がある。
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)
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.
3112 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.77 の一部
3113 である。プロジェクトの説明とバグ報告に関する情報は
3114 http://www.kernel.org/doc/man\-pages/ に書かれている。