Lines Matching +full:proc +full:- +full:id
1 .. SPDX-License-Identifier: GPL-2.0
4 The /proc Filesystem
8 /proc/sys Terrehon Bowden <terrehon@pacbell.net>, October 7 1999
11 move /proc/sys Shen Feng <shen@cn.fujitsu.com> April 1 2009
24 1.1 Process-Specific Subdirectories
26 1.3 IDE devices in /proc/ide
27 1.4 Networking info in /proc/net
29 1.6 Parallel port info in /proc/parport
30 1.7 TTY info in /proc/tty
31 1.8 Miscellaneous kernel statistics in /proc/stat
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
43 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
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
60 ------------------------
64 /proc file system and we've used many freely available sources to write these
68 we know, it is the first 'all-in-one' document about the /proc file system. It
71 It also only covers IPv4 networking, not IPv6 nor other protocols - sorry. But
87 http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
90 mailing list at linux-kernel@vger.kernel.org and/or try to reach me at
94 ---------------
104 ---------------
105 * Investigating the properties of the pseudo file system /proc and its
107 * Examining /proc's structure
111 ------------------------------------------------------------------------------
113 The proc file system acts as an interface to internal data structures in the
117 First, we'll take a look at the read-only parts of /proc. In Chapter 2, we
118 show you how you can use /proc/sys to change settings.
120 1.1 Process-Specific Subdirectories
121 -----------------------------------
123 The directory /proc contains (among other things) one subdirectory for each
124 process running on the system, which is named after the process ID (PID).
127 subdirectory has the entries listed in Table 1-1.
129 Note that an open file descriptor to /proc/<pid> or to any of its
132 open /proc/<pid> file descriptors corresponding to dead processes
134 also assigned the process ID <pid>. Instead, operations on these FDs
137 .. table:: Table 1-1: Process specific entries in /proc
156 symbol the task is blocked in - or "0" if not blocked.
168 read the file /proc/PID/status::
170 >cat /proc/self/status
218 the ps command. In fact, ps uses the proc file system to obtain its
220 file /proc/PID/status. It fields are described in table 1-2.
223 memory usage. Its seven fields are explained in Table 1-3. The stat file
225 explained in Table 1-4.
231 snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table.
234 .. table:: Table 1-2: Contents of the status files (as of 4.19)
244 Tgid thread group ID
245 Ngid NUMA group ID (0 if none)
246 Pid process id
247 PPid process id of the parent process
253 NStgid descendant namespace thread group ID hierarchy
254 NSpid descendant namespace process ID hierarchy
255 NSpgid descendant namespace process group ID hierarchy
256 NSsid descendant namespace session ID hierarchy
306 .. table:: Table 1-3: Contents of the statm files (as of 2.6.8-rc3)
324 .. table:: Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
329 pid process id
333 ppid process id of the parent process
335 sid session id
365 use /proc/PID/wchan instead)
386 The /proc/PID/maps file contains the currently mapped memory regions and
393 08048000-08049000 r-xp 00000000 03:00 8312 /opt/test
394 08049000-0804a000 rw-p 00001000 03:00 8312 /opt/test
395 0804a000-0806b000 rw-p 00000000 00:00 0 [heap]
396 a7cb1000-a7cb2000 ---p 00000000 00:00 0
397 a7cb2000-a7eb2000 rw-p 00000000 00:00 0
398 a7eb2000-a7eb3000 ---p 00000000 00:00 0
399 a7eb3000-a7ed5000 rw-p 00000000 00:00 0
400 a7ed5000-a8008000 r-xp 00000000 03:00 4222 /lib/libc.so.6
401 a8008000-a800a000 r--p 00133000 03:00 4222 /lib/libc.so.6
402 a800a000-a800b000 rw-p 00135000 03:00 4222 /lib/libc.so.6
403 a800b000-a800e000 rw-p 00000000 00:00 0
404 a800e000-a8022000 r-xp 00000000 03:00 14462 /lib/libpthread.so.0
405 a8022000-a8023000 r--p 00013000 03:00 14462 /lib/libpthread.so.0
406 a8023000-a8024000 rw-p 00014000 03:00 14462 /lib/libpthread.so.0
407 a8024000-a8027000 rw-p 00000000 00:00 0
408 a8027000-a8043000 r-xp 00000000 03:00 8317 /lib/ld-linux.so.2
409 a8043000-a8044000 r--p 0001b000 03:00 8317 /lib/ld-linux.so.2
410 a8044000-a8045000 rw-p 0001c000 03:00 8317 /lib/ld-linux.so.2
411 aff35000-aff4a000 rw-p 00000000 00:00 0 [stack]
412 ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
438 The /proc/PID/smaps is an extension based on maps, showing the memory
442 08048000-080bc000 r-xp 00000000 03:02 13130 /bin/bash
469 mapping in /proc/PID/maps. Following lines show the size of the mapping
508 "Swap" shows how much would-be-anonymous memory is also used, but out on swap.
511 replaced by copy-on-write) part of the underlying shmem object out on swap.
516 pages - 1 if true, 0 otherwise. It just shows the current status.
555 uw userfaultfd wr-protect tracking
560 be vanished or the reverse -- new added. Interpretation of their meaning
567 Note: reading /proc/PID/maps or /proc/PID/smaps is inherently racy (consistent
579 The /proc/PID/smaps_rollup file includes the same fields as /proc/PID/smaps,
583 - Pss_Anon
584 - Pss_File
585 - Pss_Shmem
593 The /proc/PID/clear_refs is used to reset the PG_Referenced and ACCESSED/YOUNG
595 soft-dirty bit on pte (see Documentation/admin-guide/mm/soft-dirty.rst
599 > echo 1 > /proc/PID/clear_refs
603 > echo 2 > /proc/PID/clear_refs
607 > echo 3 > /proc/PID/clear_refs
609 To clear the soft-dirty bit::
611 > echo 4 > /proc/PID/clear_refs
616 > echo 5 > /proc/PID/clear_refs
618 Any other value written to /proc/PID/clear_refs will have no effect.
620 The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags
621 using /proc/kpageflags and number of times a page is mapped using
622 /proc/kpagecount. For detailed explanation, see
623 Documentation/admin-guide/mm/pagemap.rst.
625 The /proc/pid/numa_maps is an extension based on maps, showing the memory
634 3206000000 default file=/lib64/ld-2.12.so mapped=26 mapmax=6 N0=24 N3=2 kernelpagesize_kB=4
635 320621f000 default file=/lib64/ld-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
636 3206220000 default file=/lib64/ld-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
638 …3206800000 default file=/lib64/libc-2.12.so mapped=59 mapmax=21 active=55 N0=41 N3=18 kernelpagesi…
639 320698b000 default file=/lib64/libc-2.12.so
640 3206b8a000 default file=/lib64/libc-2.12.so anon=2 dirty=2 N3=2 kernelpagesize_kB=4
641 3206b8e000 default file=/lib64/libc-2.12.so anon=1 dirty=1 N3=1 kernelpagesize_kB=4
653 "policy" reports the NUMA memory policy set for the mapping (see Documentation/admin-guide/mm/numa_…
660 ---------------
664 /proc and are listed in Table 1-5. Not all of these will be present in your
668 .. table:: Table 1-5: Kernel info in /proc
710 pci Deprecated info of PCI bus (new way -> /proc/bus/pci/,
728 they are used for by looking in the file /proc/interrupts::
730 > cat /proc/interrupts
732 0: 8728810 XT-PIC timer
733 1: 895 XT-PIC keyboard
734 2: 0 XT-PIC cascade
735 3: 531695 XT-PIC aha152x
736 4: 2014133 XT-PIC serial
737 5: 44401 XT-PIC pcnet_cs
738 8: 2 XT-PIC rtc
739 11: 8 XT-PIC i82365
740 12: 182918 XT-PIC PS/2 Mouse
741 13: 1 XT-PIC fpu
742 14: 1232265 XT-PIC ide0
743 15: 7 XT-PIC ide1
749 > cat /proc/interrupts
752 0: 1243498 1214548 IO-APIC-edge timer
753 1: 8949 8958 IO-APIC-edge keyboard
754 2: 0 0 XT-PIC cascade
755 5: 11286 10161 IO-APIC-edge soundblaster
756 8: 1 0 IO-APIC-edge rtc
757 9: 27422 27407 IO-APIC-edge 3c503
758 12: 113645 113873 IO-APIC-edge PS/2 Mouse
759 13: 0 0 XT-PIC fpu
760 14: 22491 24012 IO-APIC-edge ide0
761 15: 2183 2415 IO-APIC-edge ide1
762 17: 30564 30414 IO-APIC-level eth0
763 18: 177 164 IO-APIC-level bttv
773 ERR is incremented in the case of errors in the IO-APIC bus (the bus that
775 the IO-APIC automatically retry the transmission, so it should not be a big
776 problem, but you should read the SMP-FAQ.
778 In 2.6.2* /proc/interrupts was expanded again. This time the goal was for
779 /proc/interrupts to display every IRQ vector in use by the system, not
810 Of some interest is the introduction of the /proc/irq directory to 2.4.
818 > ls /proc/irq/
821 > ls /proc/irq/0/
827 > echo 1 > /proc/irq/10/smp_affinity
834 > cat /proc/irq/0/smp_affinity
840 > cat /proc/irq/0/smp_affinity_list
841 1024-1031
843 The default_smp_affinity mask applies to all non-active IRQs, which are the
845 /proc/irq/[0-9]* directory.
854 The way IRQs are routed is handled by the IO-APIC, and it's Round Robin
857 best choice for almost everyone. [Note this applies only to those IO-APIC's
860 There are three more important subdirectories in /proc: net, scsi, and sys.
873 > cat /proc/buddyinfo
892 > cat /proc/pagetypeinfo
915 X86-64. By keeping pages grouped based on their ability to move, the kernel
916 can reclaim pages within a page block to satisfy a high-order allocation.
920 by migrate-type and finishes with details on how many page blocks of each
941 /proc/net/sockstat for TCP memory allocations.
948 > cat /proc/meminfo
1006 in-memory cache for files read from the disk (the
1040 Non-file backed pages mapped into userspace page tables
1045 Non-file backed huge pages mapped into userspace page tables
1060 in-kernel data structures cache
1084 CommitLimit = ([total RAM pages] - [total huge TLB pages]) *
1092 in vm/overcommit-accounting.
1139 > cat /proc/vmallocinfo
1140 0xffffc20000000000-0xffffc20000201000 2101248 alloc_large_system_hash+0x204 ...
1142 0xffffc20000201000-0xffffc20000302000 1052672 alloc_large_system_hash+0x204 ...
1144 0xffffc20000302000-0xffffc20000304000 8192 acpi_tb_verify_table+0x21/0x4f...
1146 0xffffc20000304000-0xffffc20000307000 12288 acpi_tb_verify_table+0x21/0x4f...
1148 0xffffc2000031d000-0xffffc2000031f000 8192 init_vdso_vars+0x112/0x210
1149 0xffffc2000031f000-0xffffc2000032b000 49152 cramfs_uncompress_init+0x2e ...
1151 0xffffc2000033a000-0xffffc2000033d000 12288 sys_swapon+0x640/0xac0 ...
1153 0xffffc20000347000-0xffffc2000034c000 20480 xt_alloc_table_info+0xfe ...
1155 0xffffffffa0000000-0xffffffffa000f000 61440 sys_init_module+0xc27/0x1d00 ...
1157 0xffffffffa000f000-0xffffffffa0014000 20480 sys_init_module+0xc27/0x1d00 ...
1159 0xffffffffa0014000-0xffffffffa0017000 12288 sys_init_module+0xc27/0x1d00 ...
1161 0xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 ...
1172 > cat /proc/softirqs
1185 1.3 IDE devices in /proc/ide
1186 ----------------------------
1188 The subdirectory /proc/ide contains information about all IDE devices of which
1196 > cat /proc/ide/drivers
1197 ide-cdrom version 4.53
1198 ide-disk version 1.08
1202 directories contains the files shown in table 1-6.
1205 .. table:: Table 1-6: IDE controller info in /proc/ide/ide?
1217 controllers directory. The files listed in table 1-7 are contained in these
1221 .. table:: Table 1-7: IDE device information
1241 # cat /proc/ide/ide0/hda/settings
1243 ---- ----- --- --- ----
1256 pio_mode write-only 0 255 w
1262 1.4 Networking info in /proc/net
1263 --------------------------------
1265 The subdirectory /proc/net follows the usual pattern. Table 1-8 shows the
1267 support this. Table 1-9 lists the files and their meaning.
1270 .. table:: Table 1-8: IPv6 info in /proc/net
1286 .. table:: Table 1-9: Network info in /proc/net
1322 > cat /proc/net/dev
1323 Inter-|Receive |[...
1336 example, the bond0 device will have a directory called /proc/net/bond0/.
1342 -------------
1345 named after the driver for this adapter in /proc/scsi. You'll also see a list
1346 of all recognized SCSI devices in /proc/scsi::
1348 >cat /proc/scsi/scsi
1350 Host: scsi0 Channel: 00 Id: 00 Lun: 00
1352 Type: Direct-Access ANSI SCSI revision: 03
1353 Host: scsi0 Channel: 00 Id: 06 Lun: 00
1354 Vendor: PIONEER Model: CD-ROM DR-U06S Rev: 1.04
1355 Type: CD-ROM ANSI SCSI revision: 02
1362 AHA-2940 SCSI adapter::
1364 > cat /proc/scsi/aic7xxx/0
1372 SCSI Adapter: Adaptec AHA-294X Ultra SCSI host adapter
1404 1.6 Parallel port info in /proc/parport
1405 ---------------------------------------
1407 The directory /proc/parport contains information about the parallel ports of
1411 These directories contain the four files shown in Table 1-10.
1414 .. table:: Table 1-10: Files in /proc/parport
1419 autoprobe Any IEEE-1284 device ID information that has been acquired.
1429 1.7 TTY info in /proc/tty
1430 -------------------------
1433 directory /proc/tty. You'll find entries for drivers and line disciplines in
1434 this directory, as shown in Table 1-11.
1437 .. table:: Table 1-11: Files in /proc/tty
1448 /proc/tty/drivers::
1450 > cat /proc/tty/drivers
1451 pty_slave /dev/pts 136 0-255 pty:slave
1452 pty_master /dev/ptm 128 0-255 pty:master
1453 pty_slave /dev/ttyp 3 0-255 pty:slave
1454 pty_master /dev/pty 2 0-255 pty:master
1455 serial /dev/cua 5 64-67 serial:callout
1456 serial /dev/ttyS 4 64-67 serial
1461 unknown /dev/tty 4 1-63 console
1464 1.8 Miscellaneous kernel statistics in /proc/stat
1465 -------------------------------------------------
1468 /proc/stat file. All of the numbers reported in this file are aggregates
1471 > cat /proc/stat
1488 - user: normal processes executing in user mode
1489 - nice: niced processes executing in user mode
1490 - system: processes executing in kernel mode
1491 - idle: twiddling thumbs
1492 - iowait: In a word, iowait stands for waiting for I/O to complete. But there
1498 2. In a multi-core CPU, the task waiting for I/O to complete is not running
1500 3. The value of iowait field in /proc/stat will decrease in certain
1503 So, the iowait is not reliable by reading from /proc/stat.
1504 - irq: servicing interrupts
1505 - softirq: servicing softirqs
1506 - steal: involuntary wait
1507 - guest: running a normal guest
1508 - guest_nice: running a niced guest
1538 -------------------------------
1541 /proc/fs/ext4. Each mounted filesystem will have a directory in
1542 /proc/fs/ext4 based on its device name (i.e., /proc/fs/ext4/hdc or
1543 /proc/fs/ext4/dm-0). The files in each per-device directory are shown
1544 in Table 1-12, below.
1546 .. table:: Table 1-12: Files in /proc/fs/ext4/<devname>
1553 1.10 /proc/consoles
1554 -------------------
1558 /dev/console, you may simply look into the file /proc/consoles::
1560 > cat /proc/consoles
1561 tty0 -WU (ECp) 4:7
1562 ttyS0 -W- (Ep) 4:64
1566 +--------------------+-------------------------------------------------------+
1572 +--------------------+-------------------------------------------------------+
1579 +--------------------+-------------------------------------------------------+
1582 +--------------------+-------------------------------------------------------+
1585 -------
1587 The /proc file system serves information about the running system. It not only
1591 The directory structure of /proc reflects the types of information and makes
1598 ---------------
1600 * Modifying kernel parameters by writing into files found in /proc/sys
1602 * Review of the /proc/sys file tree
1604 ------------------------------------------------------------------------------
1606 A very interesting part of /proc is the directory /proc/sys. This is not only
1618 The files in /proc/sys can be used to fine tune and monitor miscellaneous and
1622 very careful when writing to any of these files. The entries in /proc may
1628 Please see: Documentation/admin-guide/sysctl/ directory for descriptions of these
1632 -------
1636 /proc/sys tree can not only be read, but also modified. You can use the echo
1641 Chapter 3: Per-process Parameters
1644 3.1 /proc/<pid>/oom_adj & /proc/<pid>/oom_score_adj- Adjust the oom-killer score
1645 --------------------------------------------------------------------------------
1666 The value of /proc/<pid>/oom_score_adj is added to the badness score before it
1667 is used to determine which task to kill. Acceptable values range from -1000
1670 task or completely disabling it. The lowest possible value, -1000, is
1675 consider for each task. Setting a /proc/<pid>/oom_score_adj value of +500, for
1678 50% more memory. A value of -500, on the other hand, would be roughly
1682 For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also
1683 be used to tune the badness score. Its acceptable values range from -16
1684 (OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
1686 scaled linearly with /proc/<pid>/oom_score_adj.
1688 The value of /proc/<pid>/oom_score_adj may be reduced no lower than the last
1693 3.2 /proc/<pid>/oom_score - Display current oom-killer score
1694 -------------------------------------------------------------
1696 This file can be used to check the current score used by the oom-killer for
1697 any given <pid>. Use it together with /proc/<pid>/oom_score_adj to tune which
1698 process should be killed in an out-of-memory situation.
1704 3.3 /proc/<pid>/io - Display the IO accounting fields
1705 -------------------------------------------------------
1717 test:/tmp # cat /proc/3828/io
1771 accurate for block-backed filesystems. <please add status regarding NFS and
1780 the storage layer. This is done at page-dirtying time.
1799 At its current implementation state, this is a bit racy on 32-bit machines:
1800 if process A reads process B's /proc/pid/io while process B is updating one
1801 of those 64-bit counters, process A could see an intermediate result.
1807 3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
1808 ---------------------------------------------------------------
1812 Conversely, sometimes we want to save file-backed memory segments into a core
1815 /proc/<pid>/coredump_filter allows you to customize which memory segments
1822 - (bit 0) anonymous private memory
1823 - (bit 1) anonymous shared memory
1824 - (bit 2) file-backed private memory
1825 - (bit 3) file-backed shared memory
1826 - (bit 4) ELF header pages in file-backed private memory areas (it is
1828 - (bit 5) hugetlb private memory
1829 - (bit 6) hugetlb shared memory
1830 - (bit 7) DAX private memory
1831 - (bit 8) DAX shared memory
1836 Note that bits 0-4 don't affect hugetlb or DAX memory. hugetlb memory is
1837 only affected by bit 5-6, and DAX is only affected by bits 7-8.
1843 write 0x31 to the process's proc file::
1845 $ echo 0x31 > /proc/1234/coredump_filter
1851 $ echo 0x7 > /proc/self/coredump_filter
1854 3.5 /proc/<pid>/mountinfo - Information about mounts
1855 --------------------------------------------------------
1859 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
1862 (1) mount ID: unique identifier of the mount (may be reused after umount)
1863 (2) parent ID: ID of parent (or of self for the top of the mount tree)
1894 3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
1895 --------------------------------------------------------
1903 3.7 /proc/<pid>/task/<tid>/children - Information about task children
1904 -------------------------------------------------------------------------
1909 Note the "first level" here -- if a child has its own children they will
1910 not be listed here; one needs to read /proc/<children-pid>/task/<tid>/children
1920 3.8 /proc/<pid>/fdinfo/<fd> - Information about opened file
1921 ---------------------------------------------------------------
1923 files have at least four fields -- 'pos', 'flags', 'mnt_id' and 'ino'.
1927 mount ID of the file system containing the opened file [see 3.5
1928 /proc/<pid>/mountinfo for details]. 'ino' represents the inode number of
1954 eventfd-count: 5a
1956 where 'eventfd-count' is hex value of a counter.
1999 …inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_han…
2008 fields 'fhandle-bytes', 'fhandle-type' and 'f_handle', all in hex
2022 fanotify flags:10 event-flags:0
2024 …fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type…
2026 where fanotify 'flags' and 'event-flags' are values used in fanotify_init
2072 exp_name: system-heap
2077 3.9 /proc/<pid>/map_files - Information about memory mapped files
2078 ---------------------------------------------------------------------
2082 | lr-------- 1 root root 64 Jan 27 11:24 333c600000-333c620000 -> /usr/lib64/ld-2.18.so
2083 | lr-------- 1 root root 64 Jan 27 11:24 333c81f000-333c820000 -> /usr/lib64/ld-2.18.so
2084 | lr-------- 1 root root 64 Jan 27 11:24 333c820000-333c821000 -> /usr/lib64/ld-2.18.so
2086 | lr-------- 1 root root 64 Jan 27 11:24 35d0421000-35d0422000 -> /usr/lib64/libselinux.so.1
2087 | lr-------- 1 root root 64 Jan 27 11:24 400000-41a000 -> /usr/bin/ls
2090 vm_area_struct::vm_start-vm_area_struct::vm_end.
2093 files in a fast way instead of parsing /proc/<pid>/maps or
2094 /proc/<pid>/smaps, both of which contain many more records. At the same
2099 3.10 /proc/<pid>/timerslack_ns - Task timerslack value
2100 ---------------------------------------------------------
2110 Valid values are from 0 - ULLONG_MAX
2115 3.11 /proc/<pid>/patch_state - Livepatch patch operation state
2116 -----------------------------------------------------------------
2120 A value of '-1' indicates that no patch is in transition.
2132 3.12 /proc/<pid>/arch_status - task architecture specific status
2133 -------------------------------------------------------------------
2142 $ cat /proc/6753/arch_status
2173 A special value of '-1' indicates that no AVX512 usage was recorded, thus
2181 ---------------------
2186 hidepid= Set /proc/<pid>/ access mode.
2191 hidepid=off or hidepid=0 means classic mode - everybody may access all
2192 /proc/<pid>/ directories (default).
2194 hidepid=noaccess or hidepid=1 means users may not access any /proc/<pid>/
2198 behaviour). As an additional bonus, as /proc/<pid>/cmdline is unaccessible for
2202 hidepid=invisible or hidepid=2 means hidepid=1 plus all /proc/<pid>/ will be
2205 by "kill -0 $PID"), but it hides process' uid and gid, which may be learned by
2206 stat()'ing /proc/<pid>/ otherwise. It greatly complicates an intruder's task of
2212 /proc/<pid>/ directories that the caller can ptrace.
2231 # grep ^proc /proc/mounts
2232 proc /proc proc rw,relatime,hidepid=2 0 0
2234 # strace -e mount mount -o hidepid=1 -t proc proc /tmp/proc
2235 mount("proc", "/tmp/proc", "proc", 0, "hidepid=1") = 0
2238 # grep ^proc /proc/mounts
2239 proc /proc proc rw,relatime,hidepid=2 0 0
2240 proc /tmp/proc proc rw,relatime,hidepid=2 0 0
2245 # mount -o remount,hidepid=1 -t proc proc /tmp/proc
2247 # grep ^proc /proc/mounts
2248 proc /proc proc rw,relatime,hidepid=1 0 0
2249 proc /tmp/proc proc rw,relatime,hidepid=1 0 0
2258 # mount -o hidepid=invisible -t proc proc /proc
2259 # mount -o hidepid=noaccess -t proc proc /tmp/proc
2260 # grep ^proc /proc/mounts
2261 proc /proc proc rw,relatime,hidepid=invisible 0 0
2262 proc /tmp/proc proc rw,relatime,hidepid=noaccess 0 0