Lines Matching refs:of
15 Table of Contents
57 This documentation is part of a soon (or so we hope) to be released book on
70 We'd like to thank Alan Cox, Rik van Riel, and Alexey Kuznetsov and a lot of
75 and helped create a great piece of software... :)
81 The latest version of this document is available online at
91 We don't guarantee the correctness of this document, and if you come to us
92 complaining about how you screwed up your system because of incorrect
102 * Investigating the properties of the pseudo file system /proc and its
114 First, we'll take a look at the read-only parts of /proc. In Chapter 2, we
134 environ Values of environment variables
135 exe Link to the executable of this process
139 root Link to the root directory of this process
147 smaps a extension based on maps, showing the memory consumption of
150 binding policy as well as mem usage (in pages) of each mapping.
153 For example, to get the status information of a process, all you have to do is
195 information. But you get a more detailed view of the process by reading the
206 snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table.
209 Table 1-2: Contents of the status files (as of 3.20.0)
212 Name filename of the executable
219 PPid process id of the parent process
220 TracerPid PID of process tracing this process (0 if not)
223 FDSize number of file descriptor slots currently allocated
233 VmRSS size of memory portions
234 VmData size of data, stack, and text segments
235 VmStk size of data, stack, and text segments
236 VmExe size of text segment
237 VmLib size of shared library code
238 VmPTE size of page table entries
239 VmSwap size of swap usage (the number of referred swapents)
240 Threads number of threads
241 SigQ number of signals queued/max. number for queue
242 SigPnd bitmap of pending signals for the thread
243 ShdPnd bitmap of shared pending signals for the process
244 SigBlk bitmap of blocked signals
245 SigIgn bitmap of ignored signals
246 SigCgt bitmap of caught signals
247 CapInh bitmap of inheritable capabilities
248 CapPrm bitmap of permitted capabilities
249 CapEff bitmap of effective capabilities
250 CapBnd bitmap of capabilities bounding set
252 Cpus_allowed mask of CPUs on which this process may run
254 Mems_allowed mask of memory nodes allowed to this process
256 voluntary_ctxt_switches number of voluntary context switches
257 nonvoluntary_ctxt_switches number of non voluntary context switches
260 Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
264 resident size of memory portions (pages) (same as VmRSS in status)
265 shared number of pages that are shared (i.e. backed by a file)
266 trs number of pages that are 'code' (not including libs; broken,
268 lrs number of pages of library (always 0 on 2.6)
269 drs number of pages of data/stack (including libs; broken,
271 dt number of dirty pages (always 0 on 2.6)
275 Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
279 tcomm filename of the executable
282 ppid process id of the parent process
283 pgrp pgrp of the process
286 tty_pgrp pgrp of the tty
288 min_flt number of minor faults
289 cmin_flt number of minor faults with child's
290 maj_flt number of major faults
291 cmaj_flt number of major faults with child's
298 num_threads number of threads
306 start_stack address of the start of the main process stack
307 esp current value of ESP
308 eip current value of EIP
309 pending bitmap of pending signals
310 blocked bitmap of blocked signals
311 sigign bitmap of ignored signals
312 sigcatch bitmap of caught signals
321 gtime guest time of the task in jiffies
322 cgtime guest time of the task children in jiffies
362 is a set of permissions:
376 [heap] = the heap of the program
377 [stack] = the stack of the main process
378 [stack:1001] = the stack of the thread with tid 1001
384 The /proc/PID/task/TID/maps is a view of the virtual memory from the viewpoint
385 of the individual tasks of a process. In this file you will see a mapping marked
387 content of /proc/PID/maps, where you will see all mappings that are being used
388 as stack by all of those tasks. Hence, for the example above, the task-level
413 consumption for each of the process's mappings. For each of mappings there
414 is a series of lines such as the following:
432 the first of these lines shows the same information as is displayed for the
433 mapping in /proc/PID/maps. The remaining lines show the size of the mapping
434 (size), the amount of the mapping that is currently resident in RAM (RSS), the
435 process' proportional share of this mapping (PSS), the number of clean and
436 dirty private pages in the mapping. Note that even a page which is part of a
439 indicates the amount of memory currently marked as referenced or accessed.
440 "Anonymous" shows the amount of memory that does not belong to any file. Even
507 using /proc/kpageflags and number of times a page is mapped using
511 locality and binding policy, as well as the memory usage (in pages) of
546 /proc and are listed in Table 1-5. Not all of these will be present in your
574 loadavg Load average of last 1, 5 & 15 minutes
578 modules List of loaded modules
582 partitions Table of partitions known to the system
583 pci Deprecated info of PCI bus (new way -> /proc/bus/pci/,
592 sysvipc Info of SysVIPC Resources (msg, sem, shm) (2.4)
593 tty Info of tty drivers
594 uptime Wall clock since boot, combined idle time of all cpus
596 video bttv info of video resources (2.4)
619 In 2.4.* a couple of lines where added to this file LOC & ERR (this time is the
620 output of a SMP machine):
644 LOC is the local interrupt counter of the internal APIC of every CPU.
646 ERR is incremented in the case of errors in the IO-APIC bus (the bus that
656 (typically counting ECC corrected errors of memory or cache) exceeds
667 of 0xff. This might also be generated by chipset bugs.
670 sent from one CPU to another per the needs of the OS. Typically,
672 determine the occurrence of interrupts of the given type.
676 suppressed when the system is a uniprocessor. As of this writing, only
679 Of some interest is the introduction of the /proc/irq directory to 2.4.
681 IRQ to only one CPU, or to exclude a CPU of handling IRQs. The contents of the
700 The contents of each smp_affinity file is the same by default:
706 a cpu range instead of a bitmask:
720 profiler. Default value is ffffffff (all cpus if there are only 32 of them).
729 The general rule is that the contents, or even the existence of these
752 Each column represents the number of pages of a certain order which are
753 available. In this case, there are 0 chunks of 2^0*PAGE_SIZE available in
754 ZONE_DMA, 4 chunks of 2^1*PAGE_SIZE in ZONE_DMA, 101 chunks of 2^4*PAGE_SIZE
776 Number of blocks type Unmovable Reclaimable Movable Reserve Isolate
780 Fragmentation avoidance in the kernel works by grouping pages of different
781 migrate types into the same contiguous regions of memory called page blocks.
782 A page block is typically the size of the default hugepage size e.g. 2MB on
786 The pagetypinfo begins with information on the size of a page block. It
787 then gives the same type of information as buddyinfo except broken down
788 by migrate-type and finishes with details on how many page blocks of each
793 make an estimate of the likely number of huge pages that can be allocated
795 unless memory has been mlock()'d. Some of the Reclaimable blocks should
796 also be allocatable although a lot of filesystem metadata may have to be
803 Provides information about distribution and utilization of memory. This
805 16GB PIII, which has highmem enabled. You may not have all of these fields.
846 MemFree: The sum of LowFree+HighFree
847 MemAvailable: An estimate of how much memory is available for starting new
849 SReclaimable, the size of the file LRU lists, and the low
854 impact of those factors will vary from system to system.
868 HighFree: Highmem is all memory above ~860MB of physical memory
877 allocated. Bad things happen when you're out of lowmem.
878 SwapTotal: total amount of swap space available
887 SReclaimable: Part of Slab, that might be reclaimed, such as caches
888 SUnreclaim: Part of Slab, that cannot be reclaimed on memory pressure
889 PageTables: amount of memory dedicated to the lowest level of page
896 this is the total amount of memory currently available to
903 For example, on a system with 1G of physical RAM and 7G
904 of swap with a `vm.overcommit_ratio` of 30 it would
905 yield a CommitLimit of 7.3G.
908 Committed_AS: The amount of memory presently allocated on the system.
909 The committed memory is a sum of all of the memory which
911 "used" by them as of yet. A process which malloc()'s 1G
912 of memory, but only touches 300M of it will show up as
919 not fail due to lack of memory once that memory has been
921 VmallocTotal: total size of vmalloc memory area
922 VmallocUsed: amount of vmalloc area which is used
923 VmallocChunk: largest contiguous block of vmalloc area which is free
930 containing the virtual address range of the area, size in bytes,
931 caller information of the creator, and optional information depending
932 on the kind of area :
934 pages=nr number of pages
942 Number of pages allocated on memory node <node>
973 Provides counts of softirq handlers serviced since boot time, for each cpu.
991 The subdirectory /proc/ide contains information about all IDE devices of which
1004 subdirectories. These are named ide0, ide1 and so on. Each of these
1014 model Type/Chipset of IDE controller
1026 capacity Capacity of the medium (in 512Byte blocks)
1037 The most interesting file is settings. This file contains a nice overview of
1076 if_inet6 List of IPv6 interface addresses
1090 (interface index, label, number of references, number of bound
1110 netlink List of PF_NETLINK sockets
1111 ip_mr_vifs List of multicast virtual interfaces
1112 ip_mr_cache List of multicast routing cache
1134 current slaves of the bond, the link status of the slaves, and how
1142 of all recognized SCSI devices in /proc/scsi:
1156 the used IRQ and the IO address range. The amount of information shown is
1203 The directory /proc/parport contains information about the parallel ports of
1214 devices list of the device drivers using that port. A + will appear by the
1215 name of the device currently using the port (it might not appear
1234 drivers list of drivers and their usage
1236 driver/serial usage statistic and status of single tty lines
1259 Various pieces of information about kernel activity are available in the
1260 /proc/stat file. All of the numbers reported in this file are aggregates
1275 The very first "cpu" line aggregates the numbers in all of the other "cpuN"
1276 lines. These numbers identify the amount of time the CPU has spent performing
1277 different kinds of work. Time units are in USER_HZ (typically hundredths of a
1278 second). The meanings of the columns are as follows, from left to right:
1291 The "intr" line gives counts of interrupts serviced since boot time, for each
1292 of the possible system interrupts. The first column is the total of all
1297 The "ctxt" line gives the total number of context switches across all CPUs.
1302 The "processes" line gives the number of processes and threads created, which
1306 The "procs_running" line gives the total number of threads that are
1307 running or ready to run (i.e., the total number of runnable threads).
1309 The "procs_blocked" line gives the number of processes currently blocked,
1312 The "softirq" line gives counts of softirqs serviced since boot time, for each
1313 of the possible system softirqs. The first column is the total of all
1330 mb_groups details of multiblock allocator buddy cache of free blocks
1346 device name of the device
1356 major:minor major and minor number of the device separated by a colon
1365 The directory structure of /proc reflects the types of information and makes
1378 * Review of the /proc/sys file tree
1382 A very interesting part of /proc is the directory /proc/sys. This is not only
1383 a source of information, it also allows you to change parameters within the
1396 general things in the operation of the Linux kernel. Since some of the files
1399 very careful when writing to any of these files. The entries in /proc may
1403 kernels, and became part of it in version 2.2.1 of the Linux kernel.
1405 Please see: Documentation/sysctl/ directory for descriptions of these
1411 Certain aspects of kernel behavior can be modified at runtime, without the
1415 of the kernel.
1426 process gets killed in out of memory conditions.
1430 units are roughly a proportion along that range of allowed memory the process
1431 may allocate from based on an estimation of its current memory and swap use.
1433 1000. If it is using half of its allowed memory, its score will be 500.
1438 The amount of "allowed" memory depends on the context in which the oom killer
1440 being exhausted, the allowed memory represents the set of mems assigned to that
1442 memory represents the set of mempolicy nodes. If it is due to a memory
1444 limit. Finally, if it is due to the entire system being out of memory, the
1447 The value of /proc/<pid>/oom_score_adj is added to the badness score before it
1453 report a badness score of 0.
1455 Consequently, it is very simple for userspace to define the amount of memory to
1456 consider for each task. Setting a /proc/<pid>/oom_score_adj value of +500, for
1457 example, is roughly equivalent to allowing the remainder of tasks sharing the
1459 50% more memory. A value of -500, on the other hand, would be roughly
1460 equivalent to discounting 50% of the task's allowed memory from being considered
1465 (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
1469 The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last
1476 minimal amount of work.
1484 process should be killed in an out-of-memory situation.
1495 test:/tmp # dd if=/dev/zero of=/tmp/test.dat &
1515 The number of bytes which this task has caused to be read from storage. This
1516 is simply the sum of bytes which this process passed to read() and pread().
1526 The number of bytes which this task has caused, or shall cause to be written
1534 Attempt to count the number of read I/O operations, i.e. syscalls like read()
1542 Attempt to count the number of write I/O operations, i.e. syscalls like
1550 Attempt to count the number of bytes which this process really did cause to
1560 Attempt to count the number of bytes which this process caused to be sent to
1569 been accounted as having caused 1MB of write.
1570 In other words: The number of bytes which this process caused to not happen,
1582 process A reads process B's /proc/pid/io while process B is updating one of
1592 long as the size of the core file isn't limited. But sometimes we don't want
1599 of memory types. If a bit of the bitmask is set, memory segments of the
1613 are always dumped regardless of the bitmask status.
1618 Default value of coredump_filter is 0x23; this means all anonymous memory
1636 This file contains lines of the form:
1641 (1) mount ID: unique identifier of the mount (may be reused after umount)
1642 (2) parent ID: ID of parent (or of self for the top of the mount tree)
1643 (3) major:minor: value of st_dev for files on filesystem
1644 (4) root: root of the mount within the filesystem
1647 (7) optional fields: zero or more fields of the form "tag[:value]"
1648 (8) separator: marks the end of the optional fields
1649 (9) filesystem type: name of filesystem of the form "type[.subtype]"
1662 X is the immediate master of the mount, or if there's no dominant peer
1674 a task to set its own or one of its thread siblings comm value. The comm value
1683 of a task pointed by <pid>/<tid> pair. The format is a space separated
1684 stream of pids.
1701 represents the current offset of the opened file in decimal form [see lseek(2)
1703 created with [see open(2) for details] and 'mnt_id' represents mount ID of
1727 where 'eventfd-count' is hex value of a counter.
1736 where 'sigmask' is hex value of the signal mask associated
1760 target file resides and the 'mask' is the mask of events, all in hex
1783 call, 'mnt_id' is the mount point identifier, 'mflags' is the value of
1786 mask and 'ignored_mask' is the mask of events which are to be ignored.
1787 All in hex format. Incorporation of 'mflags', 'mask' and 'ignored_mask'
1806 where 'clockid' is the clock type and 'ticks' is the number of the timer expirations
1826 The name of a link represents the virtual memory bounds of a mapping, i.e.
1829 The main purpose of the map_files is to retrieve a set of memory mapped
1830 files in a fast way instead of parsing /proc/<pid>/maps or
1831 /proc/<pid>/smaps, both of which contain many more records. At the same
1832 time one can open(2) mappings from the listings of two processes and
1863 /proc/<pid>/ otherwise. It greatly complicates an intruder's task of gathering