Lines Matching +full:ps +full:- +full:source +full:- +full:off +full:- +full:time +full:- +full:ms

1 .. SPDX-License-Identifier: GPL-2.0
24 1.1 Process-Specific Subdirectories
36 3 Per-Process Parameters
37 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj - Adjust the oom-killer
39 3.2 /proc/<pid>/oom_score - Display current oom-killer score
40 3.3 /proc/<pid>/io - Display the IO accounting fields
41 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
42 3.5 /proc/<pid>/mountinfo - Information about mounts
44 3.7 /proc/<pid>/task/<tid>/children - Information about task children
45 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
46 3.9 /proc/<pid>/map_files - Information about memory mapped files
47 3.10 /proc/<pid>/timerslack_ns - Task timerslack value
48 3.11 /proc/<pid>/patch_state - Livepatch patch operation state
49 3.12 /proc/<pid>/arch_status - Task architecture specific information
50 3.13 /proc/<pid>/fd - List of symlinks to open files
51 3.14 /proc/<pid/ksm_stat - Information about the process's ksm status.
62 ------------------------
68 Thanks to everybody else who contributed source or docs to the Linux kernel
75 ---------------
85 ---------------
92 ------------------------------------------------------------------------------
98 First, we'll take a look at the read-only parts of /proc. In Chapter 2, we
101 1.1 Process-Specific Subdirectories
102 -----------------------------------
108 subdirectory has the entries listed in Table 1-1.
114 capability. This applies to all read-only information like `maps`, `environ`,
115 `pagemap`, etc. The only exception is `mem` file due to its read-write nature,
128 .. table:: Table 1-1: Process specific entries in /proc
147 symbol the task is blocked in - or "0" if not blocked.
210 the ps command. In fact, ps uses the proc file system to obtain its
212 file /proc/PID/status. It fields are described in table 1-2.
215 memory usage. Its seven fields are explained in Table 1-3. The stat file
217 explained in Table 1-4.
226 .. table:: Table 1-2: Contents of the status fields (as of 4.19)
301 .. table:: Table 1-3: Contents of the statm fields (as of 2.6.8-rc3)
319 .. table:: Table 1-4: Contents of the stat fields (as of 2.6.30-rc7)
346 start_time time the process started after system boot
367 blkio_ticks time spent waiting for block IO
368 gtime guest time of the task in jiffies
369 cgtime guest time of the task children in jiffies
388 08048000-08049000 r-xp 00000000 03:00 8312 /opt/test
389 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test
390 0804a000-0806b000 rw-p 00000000 00:00 0 [heap]
391 a7cb1000-a7cb2000 ---p 00000000 00:00 0
392 a7cb2000-a7eb2000 rw-p 00000000 00:00 0
393 a7eb2000-a7eb3000 ---p 00000000 00:00 0
394 a7eb3000-a7ed5000 rw-p 00000000 00:00 0
395 a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
396 a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
397 a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
398 a800b000-a800e000 rw-p 00000000 00:00 0
399 a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0
400 a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0
401 a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0
402 a8024000-a8027000 rw-p 00000000 00:00 0
403 a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2
404 a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2
405 a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2
406 aff35000-aff4a000 rw-p 00000000 00:00 0 [stack]
407 ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
438 ioctl()-based API that gives ability to flexibly and efficiently query and
450 08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
522 "KSM" reports how many of the pages are KSM pages. Note that KSM-placed zeropages
540 "Swap" shows how much would-be-anonymous memory is also used, but out on swap.
543 replaced by copy-on-write) part of the underlying shmem object out on swap.
564 ms may share
588 uw userfaultfd wr-protect tracking
599 be vanished or the reverse -- new added. Interpretation of their meaning
622 - Pss_Anon
623 - Pss_File
624 - Pss_Shmem
634 soft-dirty bit on pte (see Documentation/admin-guide/mm/soft-dirty.rst
648 To clear the soft-dirty bit::
662 Documentation/admin-guide/mm/pagemap.rst.
673 3206000000 default file=/lib64/ld-2.12.so mapped=26 mapmax=6 N0=24 N3=2 kernelpagesize_kB=4
674 320621f000 default file=/lib64/ld-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
675 3206220000 default file=/lib64/ld-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
677 …3206800000 default file=/lib64/libc-2.12.so mapped=59 mapmax=21 active=55 N0=41 N3=18 kernelpagesi…
678 320698b000 default file=/lib64/libc-2.12.so
679 3206b8a000 default file=/lib64/libc-2.12.so anon=2 dirty=2 N3=2 kernelpagesize_kB=4
680 3206b8e000 default file=/lib64/libc-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
692 "policy" reports the NUMA memory policy set for the mapping (see Documentation/admin-guide/mm/numa_…
704 ---------------
708 /proc and are listed in Table 1-5. Not all of these will be present in your
712 .. table:: Table 1-5: Kernel info in /proc
761 pci Deprecated info of PCI bus (new way -> /proc/bus/pci/,
763 rtc Real time clock
772 uptime Wall clock since boot, combined idle time of all cpus
783 0: 8728810 XT-PIC timer
784 1: 895 XT-PIC keyboard
785 2: 0 XT-PIC cascade
786 3: 531695 XT-PIC aha152x
787 4: 2014133 XT-PIC serial
788 5: 44401 XT-PIC pcnet_cs
789 8: 2 XT-PIC rtc
790 11: 8 XT-PIC i82365
791 12: 182918 XT-PIC PS/2 Mouse
792 13: 1 XT-PIC fpu
793 14: 1232265 XT-PIC ide0
794 15: 7 XT-PIC ide1
797 In 2.4.* a couple of lines where added to this file LOC & ERR (this time is the
803 0: 1243498 1214548 IO-APIC-edge timer
804 1: 8949 8958 IO-APIC-edge keyboard
805 2: 0 0 XT-PIC cascade
806 5: 11286 10161 IO-APIC-edge soundblaster
807 8: 1 0 IO-APIC-edge rtc
808 9: 27422 27407 IO-APIC-edge 3c503
809 12: 113645 113873 IO-APIC-edge PS/2 Mouse
810 13: 0 0 XT-PIC fpu
811 14: 22491 24012 IO-APIC-edge ide0
812 15: 2183 2415 IO-APIC-edge ide1
813 17: 30564 30414 IO-APIC-level eth0
814 18: 177 164 IO-APIC-level bttv
824 ERR is incremented in the case of errors in the IO-APIC bus (the bus that
826 the IO-APIC automatically retry the transmission, so it should not be a big
827 problem, but you should read the SMP-FAQ.
829 In 2.6.2* /proc/interrupts was expanded again. This time the goal was for
892 1024-1031
894 The default_smp_affinity mask applies to all non-active IRQs, which are the
896 /proc/irq/[0-9]* directory.
905 The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
908 best choice for almost everyone. [Note this applies only to those IO-APIC's
966 X86-64. By keeping pages grouped based on their ability to move, the kernel
967 can reclaim pages within a page block to satisfy a high-order allocation.
971 by migrate-type and finishes with details on how many page blocks of each
977 at a given point in time. All the "Movable" blocks should be allocatable
987 base. Each allocation in the code is identified by its source file, line
1010 > tail -n +3 /proc/allocinfo | sort -rn
1015 13377536 234 block/blk-mq.c:3421 func:blk_mq_alloc_rqs
1120 In-memory cache for files read from the disk (the
1164 Non-file backed pages mapped into userspace page tables. Note that
1180 in-kernel data structures cache
1210 CommitLimit = ([total RAM pages] - [total huge TLB pages]) *
1218 in mm/overcommit-accounting.
1226 by the VM and can be used at any time by the allocating
1253 Non-file backed huge pages mapped into userspace page tables
1273 See Documentation/admin-guide/mm/hugetlbpage.rst.
1301 0xffffc20000000000-0xffffc20000201000 2101248 alloc_large_system_hash+0x204 ...
1303 0xffffc20000201000-0xffffc20000302000 1052672 alloc_large_system_hash+0x204 ...
1305 0xffffc20000302000-0xffffc20000304000 8192 acpi_tb_verify_table+0x21/0x4f...
1307 0xffffc20000304000-0xffffc20000307000 12288 acpi_tb_verify_table+0x21/0x4f...
1309 0xffffc2000031d000-0xffffc2000031f000 8192 init_vdso_vars+0x112/0x210
1310 0xffffc2000031f000-0xffffc2000032b000 49152 cramfs_uncompress_init+0x2e ...
1312 0xffffc2000033a000-0xffffc2000033d000 12288 sys_swapon+0x640/0xac0 ...
1314 0xffffc20000347000-0xffffc2000034c000 20480 xt_alloc_table_info+0xfe ...
1316 0xffffffffa0000000-0xffffffffa000f000 61440 sys_init_module+0xc27/0x1d00 ...
1318 0xffffffffa000f000-0xffffffffa0014000 20480 sys_init_module+0xc27/0x1d00 ...
1320 0xffffffffa0014000-0xffffffffa0017000 12288 sys_init_module+0xc27/0x1d00 ...
1322 0xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ...
1329 Provides counts of softirq handlers serviced since boot time, for each CPU.
1346 --------------------------------
1348 The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the
1350 support this. Table 1-9 lists the files and their meaning.
1353 .. table:: Table 1-8: IPv6 info in /proc/net
1369 .. table:: Table 1-9: Network info in /proc/net
1391 softnet_stat Per-CPU incoming packets queues statistics of online CPUs
1407 Inter-|Receive |[...
1426 -------------
1436 Type: Direct-Access ANSI SCSI revision: 03
1438 Vendor: PIONEER Model: CD-ROM DR-U06S Rev: 1.04
1439 Type: CD-ROM ANSI SCSI revision: 02
1446 AHA-2940 SCSI adapter::
1456 SCSI Adapter: Adaptec AHA-294X Ultra SCSI host adapter
1489 ---------------------------------------
1495 These directories contain the four files shown in Table 1-10.
1498 .. table:: Table 1-10: Files in /proc/parport
1503 autoprobe Any IEEE-1284 device ID information that has been acquired.
1514 -------------------------
1518 this directory, as shown in Table 1-11.
1521 .. table:: Table 1-11: Files in /proc/tty
1535 pty_slave /dev/pts 136 0-255 pty:slave
1536 pty_master /dev/ptm 128 0-255 pty:master
1537 pty_slave /dev/ttyp 3 0-255 pty:slave
1538 pty_master /dev/pty 2 0-255 pty:master
1539 serial /dev/cua 5 64-67 serial:callout
1540 serial /dev/ttyS 4 64-67 serial
1545 unknown /dev/tty 4 1-63 console
1549 -------------------------------------------------
1570 lines. These numbers identify the amount of time the CPU has spent performing
1571 different kinds of work. Time units are in USER_HZ (typically hundredths of a
1574 - user: normal processes executing in user mode
1575 - nice: niced processes executing in user mode
1576 - system: processes executing in kernel mode
1577 - idle: twiddling thumbs
1578 - iowait: In a word, iowait stands for waiting for I/O to complete. But there
1581 1. CPU will not wait for I/O to complete, iowait is the time that a task is
1584 2. In a multi-core CPU, the task waiting for I/O to complete is not running
1590 - irq: servicing interrupts
1591 - softirq: servicing softirqs
1592 - steal: involuntary wait
1593 - guest: running a normal guest
1594 - guest_nice: running a niced guest
1596 The "intr" line gives counts of interrupts serviced since boot time, for each
1604 The "btime" line gives the time at which the system booted, in seconds since
1617 The "softirq" line gives counts of softirqs serviced since boot time, for each
1624 -------------------------------
1629 /proc/fs/ext4/sda9 or /proc/fs/ext4/dm-0). The files in each per-device
1630 directory are shown in Table 1-12, below.
1632 .. table:: Table 1-12: Files in /proc/fs/ext4/<devname>
1640 -------------------
1647 tty0 -WU (ECp) 4:7
1648 ttyS0 -W- (Ep) 4:64
1652 +--------------------+-------------------------------------------------------+
1658 +--------------------+-------------------------------------------------------+
1665 +--------------------+-------------------------------------------------------+
1668 +--------------------+-------------------------------------------------------+
1671 -------
1684 ---------------
1690 ------------------------------------------------------------------------------
1693 a source of information, it also allows you to change parameters within the
1702 to perform this every time your system boots.
1707 documentation and source before actually making adjustments. In any case, be
1714 Please see: Documentation/admin-guide/sysctl/ directory for descriptions of
1718 -------
1727 Chapter 3: Per-process Parameters
1730 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
1731 --------------------------------------------------------------------------------
1753 is used to determine which task to kill. Acceptable values range from -1000
1756 task or completely disabling it. The lowest possible value, -1000, is
1764 50% more memory. A value of -500, on the other hand, would be roughly
1769 be used to tune the badness score. Its acceptable values range from -16
1770 (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
1779 3.2 /proc/<pid>/oom_score - Display current oom-killer score
1780 -------------------------------------------------------------
1782 This file can be used to check the current score used by the oom-killer for
1784 process should be killed in an out-of-memory situation.
1790 3.3 /proc/<pid>/io - Display the IO accounting fields
1791 -------------------------------------------------------
1857 accurate for block-backed filesystems. <please add status regarding NFS and
1858 CIFS at a later time>
1866 the storage layer. This is done at page-dirtying time.
1885 At its current implementation state, this is a bit racy on 32-bit machines:
1887 of those 64-bit counters, process A could see an intermediate result.
1893 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
1894 ---------------------------------------------------------------
1898 Conversely, sometimes we want to save file-backed memory segments into a core
1908 - (bit 0) anonymous private memory
1909 - (bit 1) anonymous shared memory
1910 - (bit 2) file-backed private memory
1911 - (bit 3) file-backed shared memory
1912 - (bit 4) ELF header pages in file-backed private memory areas (it is
1914 - (bit 5) hugetlb private memory
1915 - (bit 6) hugetlb shared memory
1916 - (bit 7) DAX private memory
1917 - (bit 8) DAX shared memory
1922 Note that bits 0-4 don't affect hugetlb or DAX memory. hugetlb memory is
1923 only affected by bit 5-6, and DAX is only affected by bits 7-8.
1940 3.5 /proc/<pid>/mountinfo - Information about mounts
1941 --------------------------------------------------------
1945 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
1957 (m+3) mount source: filesystem specific information or "none"
1981 --------------------------------------------------------
1989 3.7 /proc/<pid>/task/<tid>/children - Information about task children
1990 -------------------------------------------------------------------------
1995 Note the "first level" here -- if a child has its own children they will
1996 not be listed here; one needs to read /proc/<children-pid>/task/<tid>/children
2006 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
2007 ---------------------------------------------------------------
2009 files have at least four fields -- 'pos', 'flags', 'mnt_id' and 'ino'.
2040 eventfd-count: 5a
2042 where 'eventfd-count' is hex value of a counter.
2085 …inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_han…
2094 fields 'fhandle-bytes', 'fhandle-type' and 'f_handle', all in hex
2108 fanotify flags:10 event-flags:0
2110 …fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type…
2112 where fanotify 'flags' and 'event-flags' are values used in fanotify_init
2142 details]. 'it_value' is remaining time until the timer expiration.
2145 still exhibits timer's remaining time.
2158 exp_name: system-heap
2172 vfio-device-syspath: /sys/devices/pci0000:e0/0000:e0:01.1/0000:e1:00.0/0000:e2:05.0/0000:e8:00.0
2174 where 'vfio-device-syspath' is the sysfs path corresponding to the VFIO device
2177 3.9 /proc/<pid>/map_files - Information about memory mapped files
2178 ---------------------------------------------------------------------
2182 | lr-------- 1 root root 64 Jan 27 11:24 333c600000-333c620000 -> /usr/lib64/ld-2.18.so
2183 | lr-------- 1 root root 64 Jan 27 11:24 333c81f000-333c820000 -> /usr/lib64/ld-2.18.so
2184 | lr-------- 1 root root 64 Jan 27 11:24 333c820000-333c821000 -> /usr/lib64/ld-2.18.so
2186 | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libselinux.so.1
2187 | lr-------- 1 root root 64 Jan 27 11:24 400000-41a000 -> /usr/bin/ls
2190 vm_area_struct::vm_start-vm_area_struct::vm_end.
2195 time one can open(2) mappings from the listings of two processes and
2199 3.10 /proc/<pid>/timerslack_ns - Task timerslack value
2200 ---------------------------------------------------------
2202 This value specifies an amount of time that normal timers may be deferred
2210 Valid values are from 0 - ULLONG_MAX
2215 3.11 /proc/<pid>/patch_state - Livepatch patch operation state
2216 -----------------------------------------------------------------
2220 A value of '-1' indicates that no patch is in transition.
2232 3.12 /proc/<pid>/arch_status - task architecture specific status
2233 -------------------------------------------------------------------
2255 elapsed since the last time AVX512 usage was recorded. The recording
2259 1) The time which the task spent on the CPU without being scheduled
2263 2) The time since the task was scheduled out last. Depending on the
2264 reason for being scheduled out (time slice exhausted, syscall ...)
2265 this can be arbitrary long time.
2273 A special value of '-1' indicates that no AVX512 usage was recorded, thus
2277 3.13 /proc/<pid>/fd - List of symlinks to open files
2278 -------------------------------------------------------
2282 lr-x------ 1 root root 64 Sep 20 17:53 0 -> /dev/null
2283 l-wx------ 1 root root 64 Sep 20 17:53 1 -> /dev/null
2284 lrwx------ 1 root root 64 Sep 20 17:53 10 -> 'socket:[12539]'
2285 lrwx------ 1 root root 64 Sep 20 17:53 11 -> 'socket:[12540]'
2286 lrwx------ 1 root root 64 Sep 20 17:53 12 -> 'socket:[12542]'
2290 -------------------------------------------------------
2292 3.14 /proc/<pid/ksm_stat - Information about the process's ksm status
2293 ---------------------------------------------------------------------
2318 addresses. KSM will generate a ksm_rmap_item for each ksm-scanned page of
2358 Documentation/admin-guide/mm/ksm.rst.
2365 ---------------------
2376 hidepid=off or hidepid=0 means classic mode - everybody may access all
2390 by "kill -0 $PID"), but it hides process's uid and gid, which may be learned by
2411 so will give an `-EBUSY` error).
2426 # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc
2437 # mount -o remount,hidepid=1 -t proc proc /tmp/proc
2450 # mount -o hidepid=invisible -t proc proc /proc
2451 # mount -o hidepid=noaccess -t proc proc /tmp/proc