diff options
author | Stefani Seibold <stefani@seibold.net> | 2009-06-17 19:26:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-18 16:03:41 -0400 |
commit | 349888ee7b2c1ffb44c806adf6f4289ca4a6fd42 (patch) | |
tree | 841552b3ed0c3140be1904c82ffc0149f32491b1 /Documentation | |
parent | 2f6d311080c36e30a5fa87adca550dc6b51dbfdc (diff) |
proc.txt: update kernel filesystem/proc.txt documentation
An update for the "Process-Specific Subdirectories" section to reflect the
changes till kernel 2.6.30.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/proc.txt | 242 |
1 files changed, 190 insertions, 52 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index fb7d649437af..fad18f9456e4 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -5,11 +5,12 @@ | |||
5 | Bodo Bauer <bb@ricochet.net> | 5 | Bodo Bauer <bb@ricochet.net> |
6 | 6 | ||
7 | 2.4.x update Jorge Nerin <comandante@zaralinux.com> November 14 2000 | 7 | 2.4.x update Jorge Nerin <comandante@zaralinux.com> November 14 2000 |
8 | move /proc/sys Shen Feng <shen@cn.fujitsu.com> April 1 2009 | 8 | move /proc/sys Shen Feng <shen@cn.fujitsu.com> April 1 2009 |
9 | ------------------------------------------------------------------------------ | 9 | ------------------------------------------------------------------------------ |
10 | Version 1.3 Kernel version 2.2.12 | 10 | Version 1.3 Kernel version 2.2.12 |
11 | Kernel version 2.4.0-test11-pre4 | 11 | Kernel version 2.4.0-test11-pre4 |
12 | ------------------------------------------------------------------------------ | 12 | ------------------------------------------------------------------------------ |
13 | fixes/update part 1.1 Stefani Seibold <stefani@seibold.net> June 9 2009 | ||
13 | 14 | ||
14 | Table of Contents | 15 | Table of Contents |
15 | ----------------- | 16 | ----------------- |
@@ -116,7 +117,7 @@ The link self points to the process reading the file system. Each process | |||
116 | subdirectory has the entries listed in Table 1-1. | 117 | subdirectory has the entries listed in Table 1-1. |
117 | 118 | ||
118 | 119 | ||
119 | Table 1-1: Process specific entries in /proc | 120 | Table 1-1: Process specific entries in /proc |
120 | .............................................................................. | 121 | .............................................................................. |
121 | File Content | 122 | File Content |
122 | clear_refs Clears page referenced bits shown in smaps output | 123 | clear_refs Clears page referenced bits shown in smaps output |
@@ -134,46 +135,103 @@ Table 1-1: Process specific entries in /proc | |||
134 | status Process status in human readable form | 135 | status Process status in human readable form |
135 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan | 136 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan |
136 | stack Report full stack trace, enable via CONFIG_STACKTRACE | 137 | stack Report full stack trace, enable via CONFIG_STACKTRACE |
137 | smaps Extension based on maps, the rss size for each mapped file | 138 | smaps a extension based on maps, showing the memory consumption of |
139 | each mapping | ||
138 | .............................................................................. | 140 | .............................................................................. |
139 | 141 | ||
140 | For example, to get the status information of a process, all you have to do is | 142 | For example, to get the status information of a process, all you have to do is |
141 | read the file /proc/PID/status: | 143 | read the file /proc/PID/status: |
142 | 144 | ||
143 | >cat /proc/self/status | 145 | >cat /proc/self/status |
144 | Name: cat | 146 | Name: cat |
145 | State: R (running) | 147 | State: R (running) |
146 | Pid: 5452 | 148 | Tgid: 5452 |
147 | PPid: 743 | 149 | Pid: 5452 |
150 | PPid: 743 | ||
148 | TracerPid: 0 (2.4) | 151 | TracerPid: 0 (2.4) |
149 | Uid: 501 501 501 501 | 152 | Uid: 501 501 501 501 |
150 | Gid: 100 100 100 100 | 153 | Gid: 100 100 100 100 |
151 | Groups: 100 14 16 | 154 | FDSize: 256 |
152 | VmSize: 1112 kB | 155 | Groups: 100 14 16 |
153 | VmLck: 0 kB | 156 | VmPeak: 5004 kB |
154 | VmRSS: 348 kB | 157 | VmSize: 5004 kB |
155 | VmData: 24 kB | 158 | VmLck: 0 kB |
156 | VmStk: 12 kB | 159 | VmHWM: 476 kB |
157 | VmExe: 8 kB | 160 | VmRSS: 476 kB |
158 | VmLib: 1044 kB | 161 | VmData: 156 kB |
159 | SigPnd: 0000000000000000 | 162 | VmStk: 88 kB |
160 | SigBlk: 0000000000000000 | 163 | VmExe: 68 kB |
161 | SigIgn: 0000000000000000 | 164 | VmLib: 1412 kB |
162 | SigCgt: 0000000000000000 | 165 | VmPTE: 20 kb |
163 | CapInh: 00000000fffffeff | 166 | Threads: 1 |
164 | CapPrm: 0000000000000000 | 167 | SigQ: 0/28578 |
165 | CapEff: 0000000000000000 | 168 | SigPnd: 0000000000000000 |
166 | 169 | ShdPnd: 0000000000000000 | |
170 | SigBlk: 0000000000000000 | ||
171 | SigIgn: 0000000000000000 | ||
172 | SigCgt: 0000000000000000 | ||
173 | CapInh: 00000000fffffeff | ||
174 | CapPrm: 0000000000000000 | ||
175 | CapEff: 0000000000000000 | ||
176 | CapBnd: ffffffffffffffff | ||
177 | voluntary_ctxt_switches: 0 | ||
178 | nonvoluntary_ctxt_switches: 1 | ||
167 | 179 | ||
168 | This shows you nearly the same information you would get if you viewed it with | 180 | This shows you nearly the same information you would get if you viewed it with |
169 | the ps command. In fact, ps uses the proc file system to obtain its | 181 | the ps command. In fact, ps uses the proc file system to obtain its |
170 | information. The statm file contains more detailed information about the | 182 | information. But you get a more detailed view of the process by reading the |
171 | process memory usage. Its seven fields are explained in Table 1-2. The stat | 183 | file /proc/PID/status. It fields are described in table 1-2. |
172 | file contains details information about the process itself. Its fields are | 184 | |
173 | explained in Table 1-3. | 185 | The statm file contains more detailed information about the process |
186 | memory usage. Its seven fields are explained in Table 1-3. The stat file | ||
187 | contains details information about the process itself. Its fields are | ||
188 | explained in Table 1-4. | ||
174 | 189 | ||
190 | Table 1-2: Contents of the statm files (as of 2.6.30-rc7) | ||
191 | .............................................................................. | ||
192 | Field Content | ||
193 | Name filename of the executable | ||
194 | State state (R is running, S is sleeping, D is sleeping | ||
195 | in an uninterruptible wait, Z is zombie, | ||
196 | T is traced or stopped) | ||
197 | Tgid thread group ID | ||
198 | Pid process id | ||
199 | PPid process id of the parent process | ||
200 | TracerPid PID of process tracing this process (0 if not) | ||
201 | Uid Real, effective, saved set, and file system UIDs | ||
202 | Gid Real, effective, saved set, and file system GIDs | ||
203 | FDSize number of file descriptor slots currently allocated | ||
204 | Groups supplementary group list | ||
205 | VmPeak peak virtual memory size | ||
206 | VmSize total program size | ||
207 | VmLck locked memory size | ||
208 | VmHWM peak resident set size ("high water mark") | ||
209 | VmRSS size of memory portions | ||
210 | VmData size of data, stack, and text segments | ||
211 | VmStk size of data, stack, and text segments | ||
212 | VmExe size of text segment | ||
213 | VmLib size of shared library code | ||
214 | VmPTE size of page table entries | ||
215 | Threads number of threads | ||
216 | SigQ number of signals queued/max. number for queue | ||
217 | SigPnd bitmap of pending signals for the thread | ||
218 | ShdPnd bitmap of shared pending signals for the process | ||
219 | SigBlk bitmap of blocked signals | ||
220 | SigIgn bitmap of ignored signals | ||
221 | SigCgt bitmap of catched signals | ||
222 | CapInh bitmap of inheritable capabilities | ||
223 | CapPrm bitmap of permitted capabilities | ||
224 | CapEff bitmap of effective capabilities | ||
225 | CapBnd bitmap of capabilities bounding set | ||
226 | Cpus_allowed mask of CPUs on which this process may run | ||
227 | Cpus_allowed_list Same as previous, but in "list format" | ||
228 | Mems_allowed mask of memory nodes allowed to this process | ||
229 | Mems_allowed_list Same as previous, but in "list format" | ||
230 | voluntary_ctxt_switches number of voluntary context switches | ||
231 | nonvoluntary_ctxt_switches number of non voluntary context switches | ||
232 | .............................................................................. | ||
175 | 233 | ||
176 | Table 1-2: Contents of the statm files (as of 2.6.8-rc3) | 234 | Table 1-3: Contents of the statm files (as of 2.6.8-rc3) |
177 | .............................................................................. | 235 | .............................................................................. |
178 | Field Content | 236 | Field Content |
179 | size total program size (pages) (same as VmSize in status) | 237 | size total program size (pages) (same as VmSize in status) |
@@ -188,7 +246,7 @@ Table 1-2: Contents of the statm files (as of 2.6.8-rc3) | |||
188 | .............................................................................. | 246 | .............................................................................. |
189 | 247 | ||
190 | 248 | ||
191 | Table 1-3: Contents of the stat files (as of 2.6.22-rc3) | 249 | Table 1-4: Contents of the stat files (as of 2.6.30-rc7) |
192 | .............................................................................. | 250 | .............................................................................. |
193 | Field Content | 251 | Field Content |
194 | pid process id | 252 | pid process id |
@@ -222,10 +280,10 @@ Table 1-3: Contents of the stat files (as of 2.6.22-rc3) | |||
222 | start_stack address of the start of the stack | 280 | start_stack address of the start of the stack |
223 | esp current value of ESP | 281 | esp current value of ESP |
224 | eip current value of EIP | 282 | eip current value of EIP |
225 | pending bitmap of pending signals (obsolete) | 283 | pending bitmap of pending signals |
226 | blocked bitmap of blocked signals (obsolete) | 284 | blocked bitmap of blocked signals |
227 | sigign bitmap of ignored signals (obsolete) | 285 | sigign bitmap of ignored signals |
228 | sigcatch bitmap of catched signals (obsolete) | 286 | sigcatch bitmap of catched signals |
229 | wchan address where process went to sleep | 287 | wchan address where process went to sleep |
230 | 0 (place holder) | 288 | 0 (place holder) |
231 | 0 (place holder) | 289 | 0 (place holder) |
@@ -234,19 +292,99 @@ Table 1-3: Contents of the stat files (as of 2.6.22-rc3) | |||
234 | rt_priority realtime priority | 292 | rt_priority realtime priority |
235 | policy scheduling policy (man sched_setscheduler) | 293 | policy scheduling policy (man sched_setscheduler) |
236 | blkio_ticks time spent waiting for block IO | 294 | blkio_ticks time spent waiting for block IO |
295 | gtime guest time of the task in jiffies | ||
296 | cgtime guest time of the task children in jiffies | ||
237 | .............................................................................. | 297 | .............................................................................. |
238 | 298 | ||
299 | The /proc/PID/map file containing the currently mapped memory regions and | ||
300 | their access permissions. | ||
301 | |||
302 | The format is: | ||
303 | |||
304 | address perms offset dev inode pathname | ||
305 | |||
306 | 08048000-08049000 r-xp 00000000 03:00 8312 /opt/test | ||
307 | 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test | ||
308 | 0804a000-0806b000 rw-p 00000000 00:00 0 [heap] | ||
309 | a7cb1000-a7cb2000 ---p 00000000 00:00 0 | ||
310 | a7cb2000-a7eb2000 rw-p 00000000 00:00 0 | ||
311 | a7eb2000-a7eb3000 ---p 00000000 00:00 0 | ||
312 | a7eb3000-a7ed5000 rw-p 00000000 00:00 0 | ||
313 | a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6 | ||
314 | a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6 | ||
315 | a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6 | ||
316 | a800b000-a800e000 rw-p 00000000 00:00 0 | ||
317 | a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0 | ||
318 | a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0 | ||
319 | a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0 | ||
320 | a8024000-a8027000 rw-p 00000000 00:00 0 | ||
321 | a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2 | ||
322 | a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2 | ||
323 | a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2 | ||
324 | aff35000-aff4a000 rw-p 00000000 00:00 0 [stack] | ||
325 | ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] | ||
326 | |||
327 | where "address" is the address space in the process that it occupies, "perms" | ||
328 | is a set of permissions: | ||
329 | |||
330 | r = read | ||
331 | w = write | ||
332 | x = execute | ||
333 | s = shared | ||
334 | p = private (copy on write) | ||
335 | |||
336 | "offset" is the offset into the mapping, "dev" is the device (major:minor), and | ||
337 | "inode" is the inode on that device. 0 indicates that no inode is associated | ||
338 | with the memory region, as the case would be with BSS (uninitialized data). | ||
339 | The "pathname" shows the name associated file for this mapping. If the mapping | ||
340 | is not associated with a file: | ||
341 | |||
342 | [heap] = the heap of the program | ||
343 | [stack] = the stack of the main process | ||
344 | [vdso] = the "virtual dynamic shared object", | ||
345 | the kernel system call handler | ||
346 | |||
347 | or if empty, the mapping is anonymous. | ||
348 | |||
349 | |||
350 | The /proc/PID/smaps is an extension based on maps, showing the memory | ||
351 | consumption for each of the process's mappings. For each of mappings there | ||
352 | is a series of lines such as the following: | ||
353 | |||
354 | 08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash | ||
355 | Size: 1084 kB | ||
356 | Rss: 892 kB | ||
357 | Pss: 374 kB | ||
358 | Shared_Clean: 892 kB | ||
359 | Shared_Dirty: 0 kB | ||
360 | Private_Clean: 0 kB | ||
361 | Private_Dirty: 0 kB | ||
362 | Referenced: 892 kB | ||
363 | Swap: 0 kB | ||
364 | KernelPageSize: 4 kB | ||
365 | MMUPageSize: 4 kB | ||
366 | |||
367 | The first of these lines shows the same information as is displayed for the | ||
368 | mapping in /proc/PID/maps. The remaining lines show the size of the mapping, | ||
369 | the amount of the mapping that is currently resident in RAM, the "proportional | ||
370 | set size” (divide each shared page by the number of processes sharing it), the | ||
371 | number of clean and dirty shared pages in the mapping, and the number of clean | ||
372 | and dirty private pages in the mapping. The "Referenced" indicates the amount | ||
373 | of memory currently marked as referenced or accessed. | ||
374 | |||
375 | This file is only present if the CONFIG_MMU kernel configuration option is | ||
376 | enabled. | ||
239 | 377 | ||
240 | 1.2 Kernel data | 378 | 1.2 Kernel data |
241 | --------------- | 379 | --------------- |
242 | 380 | ||
243 | Similar to the process entries, the kernel data files give information about | 381 | Similar to the process entries, the kernel data files give information about |
244 | the running kernel. The files used to obtain this information are contained in | 382 | the running kernel. The files used to obtain this information are contained in |
245 | /proc and are listed in Table 1-4. Not all of these will be present in your | 383 | /proc and are listed in Table 1-5. Not all of these will be present in your |
246 | system. It depends on the kernel configuration and the loaded modules, which | 384 | system. It depends on the kernel configuration and the loaded modules, which |
247 | files are there, and which are missing. | 385 | files are there, and which are missing. |
248 | 386 | ||
249 | Table 1-4: Kernel info in /proc | 387 | Table 1-5: Kernel info in /proc |
250 | .............................................................................. | 388 | .............................................................................. |
251 | File Content | 389 | File Content |
252 | apm Advanced power management info | 390 | apm Advanced power management info |
@@ -634,10 +772,10 @@ IDE devices: | |||
634 | 772 | ||
635 | More detailed information can be found in the controller specific | 773 | More detailed information can be found in the controller specific |
636 | subdirectories. These are named ide0, ide1 and so on. Each of these | 774 | subdirectories. These are named ide0, ide1 and so on. Each of these |
637 | directories contains the files shown in table 1-5. | 775 | directories contains the files shown in table 1-6. |
638 | 776 | ||
639 | 777 | ||
640 | Table 1-5: IDE controller info in /proc/ide/ide? | 778 | Table 1-6: IDE controller info in /proc/ide/ide? |
641 | .............................................................................. | 779 | .............................................................................. |
642 | File Content | 780 | File Content |
643 | channel IDE channel (0 or 1) | 781 | channel IDE channel (0 or 1) |
@@ -647,11 +785,11 @@ Table 1-5: IDE controller info in /proc/ide/ide? | |||
647 | .............................................................................. | 785 | .............................................................................. |
648 | 786 | ||
649 | Each device connected to a controller has a separate subdirectory in the | 787 | Each device connected to a controller has a separate subdirectory in the |
650 | controllers directory. The files listed in table 1-6 are contained in these | 788 | controllers directory. The files listed in table 1-7 are contained in these |
651 | directories. | 789 | directories. |
652 | 790 | ||
653 | 791 | ||
654 | Table 1-6: IDE device information | 792 | Table 1-7: IDE device information |
655 | .............................................................................. | 793 | .............................................................................. |
656 | File Content | 794 | File Content |
657 | cache The cache | 795 | cache The cache |
@@ -693,12 +831,12 @@ the drive parameters: | |||
693 | 1.4 Networking info in /proc/net | 831 | 1.4 Networking info in /proc/net |
694 | -------------------------------- | 832 | -------------------------------- |
695 | 833 | ||
696 | The subdirectory /proc/net follows the usual pattern. Table 1-6 shows the | 834 | The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the |
697 | additional values you get for IP version 6 if you configure the kernel to | 835 | additional values you get for IP version 6 if you configure the kernel to |
698 | support this. Table 1-7 lists the files and their meaning. | 836 | support this. Table 1-9 lists the files and their meaning. |
699 | 837 | ||
700 | 838 | ||
701 | Table 1-6: IPv6 info in /proc/net | 839 | Table 1-8: IPv6 info in /proc/net |
702 | .............................................................................. | 840 | .............................................................................. |
703 | File Content | 841 | File Content |
704 | udp6 UDP sockets (IPv6) | 842 | udp6 UDP sockets (IPv6) |
@@ -713,7 +851,7 @@ Table 1-6: IPv6 info in /proc/net | |||
713 | .............................................................................. | 851 | .............................................................................. |
714 | 852 | ||
715 | 853 | ||
716 | Table 1-7: Network info in /proc/net | 854 | Table 1-9: Network info in /proc/net |
717 | .............................................................................. | 855 | .............................................................................. |
718 | File Content | 856 | File Content |
719 | arp Kernel ARP table | 857 | arp Kernel ARP table |
@@ -837,10 +975,10 @@ The directory /proc/parport contains information about the parallel ports of | |||
837 | your system. It has one subdirectory for each port, named after the port | 975 | your system. It has one subdirectory for each port, named after the port |
838 | number (0,1,2,...). | 976 | number (0,1,2,...). |
839 | 977 | ||
840 | These directories contain the four files shown in Table 1-8. | 978 | These directories contain the four files shown in Table 1-10. |
841 | 979 | ||
842 | 980 | ||
843 | Table 1-8: Files in /proc/parport | 981 | Table 1-10: Files in /proc/parport |
844 | .............................................................................. | 982 | .............................................................................. |
845 | File Content | 983 | File Content |
846 | autoprobe Any IEEE-1284 device ID information that has been acquired. | 984 | autoprobe Any IEEE-1284 device ID information that has been acquired. |
@@ -858,10 +996,10 @@ Table 1-8: Files in /proc/parport | |||
858 | 996 | ||
859 | Information about the available and actually used tty's can be found in the | 997 | Information about the available and actually used tty's can be found in the |
860 | directory /proc/tty.You'll find entries for drivers and line disciplines in | 998 | directory /proc/tty.You'll find entries for drivers and line disciplines in |
861 | this directory, as shown in Table 1-9. | 999 | this directory, as shown in Table 1-11. |
862 | 1000 | ||
863 | 1001 | ||
864 | Table 1-9: Files in /proc/tty | 1002 | Table 1-11: Files in /proc/tty |
865 | .............................................................................. | 1003 | .............................................................................. |
866 | File Content | 1004 | File Content |
867 | drivers list of drivers and their usage | 1005 | drivers list of drivers and their usage |
@@ -952,9 +1090,9 @@ Information about mounted ext4 file systems can be found in | |||
952 | /proc/fs/ext4. Each mounted filesystem will have a directory in | 1090 | /proc/fs/ext4. Each mounted filesystem will have a directory in |
953 | /proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or | 1091 | /proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or |
954 | /proc/fs/ext4/dm-0). The files in each per-device directory are shown | 1092 | /proc/fs/ext4/dm-0). The files in each per-device directory are shown |
955 | in Table 1-10, below. | 1093 | in Table 1-12, below. |
956 | 1094 | ||
957 | Table 1-10: Files in /proc/fs/ext4/<devname> | 1095 | Table 1-12: Files in /proc/fs/ext4/<devname> |
958 | .............................................................................. | 1096 | .............................................................................. |
959 | File Content | 1097 | File Content |
960 | mb_groups details of multiblock allocator buddy cache of free blocks | 1098 | mb_groups details of multiblock allocator buddy cache of free blocks |