OSDN Git Service

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