public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* proc(5) and xml version
@ 2020-11-13 14:25 Brian Inglis
  2020-11-16 12:07 ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-11-13 14:25 UTC (permalink / raw)
  To: Cygwin Patches

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

Hacked a Cygwin proc.5 man page FMOI over time, by combing through 
fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto as in 
the build, man width 80 output from both, and diff (all attached).

Unsure how this might best be fitted into the distro (cygwin, cygwin-doc, ...?) 
and/or whether there may be xml remediation possible to generate verbatim output 
left justified with zero margin, and character value displays, the major output 
issues in the diff? Content feedback is also welcome.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[-- Attachment #2: proc.5 --]
[-- Type: text/plain, Size: 33650 bytes --]

.\" (c) Copyright 2020 Cygwin project
.\" (c) Copyright 2002-2008,2017 Michael Kerrisk <mtk.manpages@gmail.com>
.\" (c) Copyright 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com)
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, see
.\" <http://www.gnu.org/licenses/>.
.\" %%%LICENSE_END
.\"
.TH PROC 5 2020-11-11 "Cygwin" "Cygwin User's Manual"
.SH NAME
proc \- process information pseudo-filesystem
.SH DESCRIPTION
The
.B proc
filesystem is a pseudo-filesystem which provides an interface to
kernel data structures.
It is commonly mounted at
.IR /proc .
Typically, it is mounted automatically by the system.
.\"
.SS Overview
Underneath
.IR /proc ,
there are the following general groups of files and subdirectories:
.TP
.IR /proc/[pid] " subdirectories"
Each one of these subdirectories contains files and subdirectories
exposing information about the process with the corresponding process ID.
.IP
The
.I /proc/[pid]
subdirectories are visible when iterating through
.I /proc
with
.BR getdents (2)
(and thus are visible when one uses
.BR ls (1)
to view the contents of
.IR /proc ).
.TP
.I /proc/self
When a process accesses this magic symbolic link,
it resolves to the process's own
.I /proc/[pid]
directory.
.TP
.I /proc/[a-z]*
Various other files and subdirectories under
.I /proc
expose system-wide information.
.PP
All of the above are described in more detail below.
.\"
.SS Files and directories
The following list provides details of many of the files and directories
under the
.I /proc
hierarchy.
.TP
.I /proc/[pid]
There is a numerical subdirectory for each running process; the
subdirectory is named by the process ID.
Each
.I /proc/[pid]
subdirectory contains the pseudo-files and directories described below.
.IP
The files inside each
.I /proc/[pid]
directory are normally owned by the effective user and
effective group ID of the process.
.TP
.I /proc/[pid]/cmdline
This read-only file holds the complete command line for the process,
unless the process is a zombie.
In the latter case, there is nothing in this file:
that is, a read on this file will return 0 characters.
The command-line arguments appear in this file as a set of
strings followed by null bytes (\(aq\e0\(aq).
.TP
.I /proc/[pid]/ctty
This read-only file holds the name of the console or control terminal device
for the process, unless the process is detached from any terminal.
In the latter case, there is only a newline in this file.
.TP
.I /proc/[pid]/cwd
This is a symbolic link to the current working directory of the process.
To find out the current working directory of process 20,
for instance, you can do this:
.IP
.in +4n
.EX
.RB "$" " cd /proc/20/cwd; /bin/pwd"
.EE
.in
.IP
Note that the
.I pwd
command is often a shell built-in, and might
not work properly.
In
.BR bash (1),
you may use
.IR "pwd\ \-P" .
.TP
.I /proc/[pid]/environ
This read-only file contains the initial environment that was set
when the currently executing program was started via
.BR execve (2).
The entries are separated by null bytes (\(aq\e0\(aq),
and there may be a null byte at the end.
Thus, to print out the environment of process 1, you would do:
.IP
.in +4n
.EX
.RB "$" " cat -A /proc/1/environ"
.EE
.in
.IP
If, after an
.BR execve (2),
the process modifies its environment
(e.g., by calling functions such as
.BR putenv (3)
or modifying the
.BR environ (7)
variable directly),
this file will
.I not
reflect those changes.
.TP
.I /proc/[pid]/exe
This file is a symbolic link
containing the actual pathname of the executed command.
This symbolic link can be dereferenced normally; attempting to open
it will open the executable.
You can even type
.I /proc/[pid]/exe
to run another copy of the same executable that is being run by
process [pid].
.I /proc/[pid]/exe
is a pointer to the binary which was executed,
and appears as a symbolic link.
.TP
.I /proc/[pid]/exename
This read-only file contains the actual pathname of the executed command.
.TP
.I /proc/[pid]/fd/
This is a subdirectory containing one entry for each file which the
process has open, named by its file descriptor, and which is a
symbolic link to the actual file.
Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.
.IP
For file descriptors for pipes and sockets,
the entries will be symbolic links whose content is the
file type with the inode.
A
.BR readlink (2)
call on this file returns a string in the format:
.IP
    type:[inode]
.IP
For example,
.I socket:[2248868]
will be a socket and its inode is 2248868.
.IP
Programs that take a filename as a command-line argument,
but don't take input from standard input if no argument is supplied,
and programs that write to a file named as a command-line argument,
but don't send their output to standard output
if no argument is supplied, can nevertheless be made to use
standard input or standard output by using
.IR /proc/[pid]/fd
files as command-line arguments.
For example, assuming that
.I \-i
is the flag designating an input file and
.I \-o
is the flag designating an output file:
.IP
.in +4n
.EX
.RB "$" " foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 ..."
.EE
.in
.IP
and you have a working filter.
.IP
.I /proc/self/fd/N
is approximately the same as
.I /dev/fd/N
in some UNIX and UNIX-like systems.
Most Linux MAKEDEV scripts symbolically link
.I /dev/fd
to
.IR /proc/self/fd ,
in fact.
.IP
Most systems provide symbolic links
.IR /dev/stdin ,
.IR /dev/stdout ,
and
.IR /dev/stderr ,
which respectively link to the files
.IR 0 ,
.IR 1 ,
and
.IR 2
in
.IR /proc/self/fd .
Thus the example command above could be written as:
.IP
.in +4n
.EX
.RB "$" " foobar \-i /dev/stdin \-o /dev/stdout ..."
.EE
.in
.IP
Note that for file descriptors referring to inodes (pipes and sockets, see above),
those inodes still have permission bits and ownership information
distinct from those of the
.I /proc/[pid]/fd
entry,
and that the owner may differ from the user and group IDs of the process.
An unprivileged process may lack permissions to open them, as in this example:
.IP
.in +4n
.EX
.RB "$" " echo test | sudo -u nobody cat"
test
.RB "$" " echo test | sudo -u nobody cat /proc/self/fd/0"
cat: /proc/self/fd/0: Permission denied
.EE
.in
.IP
File descriptor 0 refers to the pipe created by the shell
and owned by that shell's user, which is not
.IR nobody ,
so
.B cat
does not have permission to create a new file descriptor to read from that inode,
even though it can still read from its existing file descriptor 0.
.TP
.IR /proc/[pid]/gid
This read-only file contains the primary group id for the process.
.TP
.I /proc/[pid]/maps
A file containing the currently mapped memory regions and their access
permissions.
See
.BR mmap (2)
for some further information about memory mappings.
.IP
The format of the file is:
.IP
.in 0n
.EX
.I "address          perms offset   dev       inode               pathname"
00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
\&...
00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
00200000-00377000 ===p 00000000 0000:0000 0                   
00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
\&...
00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
\&...
100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
\&...
180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
\&...
800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0           
7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0           
7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0           
\&...
7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
\&...
.EE
.in
.IP
The
.I address
field is the address space in the process that the mapping occupies.
The
.I perms
field is a set of permissions:
.IP
.in +4
.EX
r: read
w: write
x: execute
===: reserved
s: shared
g: guard
p: private
.EE
.in
.IP
The
.I offset
field is the offset into the file/whatever;
.I dev
is the device
(major:minor);
.I inode
is the inode on that device.
0 indicates that no inode is associated with the memory region,
as would be the case with BSS (uninitialized data).
.IP
The
.I pathname
field will usually be the file that is backing the mapping.
.IP
There are additional helpful pseudo-paths:
.RS 12
.TP
.RI [ cygwin-shared ]
Global shared Cygwin process information.
.TP
.RI [ cygwin-user-shared ]
Global shared Cygwin user information.
.TP
.RI [ peb ]
Windows Process Environment Block.
.TP
.RI [ procinfo ]
Cygwin process information.
.TP
.RI [ shared-user-data ]
Shared user information.
.TP
.RI [ heap ]
The process's heap.
.TP
.RI [ stack ]
The initial process's (also known as the main thread's) stack.
.TP
.RI [ stack " (tid " <tid> )]
A thread's stack (where the
.IR <tid>
is a thread id).
.TP
.RI [ teb " (tid " <tid> )]
Windows Thread Environment Block (where
.IR <tid>
is a thread id).
.TP
.RI [ "win heap <n> default shared exec grow noserial debug" ]
Windows extended heap (where
.IR <n>
is a heap id)
.br
and the rest of the words are heap flags:
.RS
.TP 10
.I default
default heap flags
.TP 10
.I shared
shareable and mapped heap flags
.TP 10
.I exec
executable heap flag
.TP 10
.I grow
growable heap flag
.TP 10
.I noserial
do not serialize heap flag
.TP 10
.I debug
debugged heap flag
.in
.RE
.in
.RE
.IP
If the
.I pathname
field is blank,
this is an anonymous mapping as obtained via
.BR mmap (2).
There is no easy way to coordinate this back to a process's source,
short of running it through
.BR gdb (1),
.BR strace (1),
or similar.
.IP
.I pathname
is shown unescaped except for newline characters, which are replaced
with an octal escape sequence.
As a result, it is not possible to determine whether the original
pathname contained a newline character or the literal
.I \ee012
character sequence.
.IP
If the mapping is file-backed and the file has been deleted, the string
" (deleted)" is appended to the pathname.
Note that this is ambiguous too.
.TP
.IR /proc/[pid]/mountinfo
This file contains information about mount points
in the process's mount namespace (see
.BR mount_namespaces (7)).
It supplies various information
(e.g., propagation state, root of mount for bind mounts,
identifier for each mount and its parent) that is missing from the (older)
.IR /proc/[pid]/mounts
file, and fixes various other problems with that file
(e.g., nonextensibility,
failure to distinguish per-mount versus per-superblock options).
.IP
The file contains lines of the form:
.IP
.in 0n
.EX
36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
.in
.EE
.IP
The numbers in parentheses are labels for the descriptions below:
.RS 7
.TP 5
(1)
mount ID: a unique ID for the mount (may be reused after
.BR umount (2)).
.TP
(2)
parent ID: the ID of the parent mount
(or of self for the root of this mount namespace's mount tree).
.IP
If a new mount is stacked on top of a previous existing mount
(so that it hides the existing mount) at pathname P,
then the parent of the new mount is the previous mount at that location.
Thus, when looking at all the mounts stacked at a particular location,
the top-most mount is the one that is not the parent
of any other mount at the same location.
(Note, however, that this top-most mount will be accessible only if
the longest path subprefix of P that is a mount point
is not itself hidden by a stacked mount.)
.IP
If the parent mount point lies outside the process's root directory (see
.BR chroot (2)),
the ID shown here won't have a corresponding record in
.I mountinfo
whose mount ID (field 1) matches this parent mount ID
(because mount points that lie outside the process's root directory
are not shown in
.IR mountinfo ).
As a special case of this point,
the process's root mount point may have a parent mount
(for the initramfs filesystem) that lies
.\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
.\" mtk: In the initial mount namespace, this hidden ID has the value 0
outside the process's root directory,
and an entry for that mount point will not appear in
.IR mountinfo .
.TP
(3)
major:minor: the value of
.I st_dev
for files on this filesystem (see
.BR stat (2)).
.TP
(4)
root: the pathname of the directory in the filesystem
which forms the root of this mount.
.TP
(5)
mount point: the pathname of the mount point relative
to the process's root directory.
.TP
(6)
mount options: per-mount options (see
.BR mount (2)).
.TP
(7)
optional fields: zero or more fields of the form "tag[:value]"; see below.
.TP
(8)
separator: the end of the optional fields is marked by a single hyphen.
.TP
(9)
filesystem type: the filesystem type in the form "type[.subtype]".
.TP
(10)
mount source: filesystem-specific information or "none".
.TP
(11)
super options: per-superblock options (see
.BR mount (2)).
.RE
.TP
.IR /proc/[pid]/mounts
This file lists all the filesystems currently mounted in the
process's mount namespace (see
.BR mount_namespaces (7)).
The format of this file is documented in
.BR fstab (5).
.TP
.IR /proc/[pid]/pgid
This read-only file contains the process group id for the process.
.TP
.IR /proc/[pid]/ppid
This read-only file contains the parent process id for the process.
.TP
.I /proc/[pid]/root
UNIX and Linux support the idea of a per-process root of the
filesystem, set by the
.BR chroot (2)
system call.
This file is a symbolic link that points to the process's
root directory, and behaves in the same way as
.IR exe ,
and
.IR fd/* .
.TP
.IR /proc/[pid]/sid
This read-only file contains the session id for the process.
.TP
.I /proc/[pid]/stat
Status information about the process.
This is used by
.BR ps (1).
.IP
The fields, in order, with their proper
.BR scanf (3)
format specifiers, are listed below.
.IP
.RS
.TP 10
(1) \fIpid\fP \ %d
.br
The process ID.
.TP
(2) \fIcomm\fP \ %s
The filename of the executable, in parentheses.
This is visible whether or not the executable is swapped out.
.TP
(3) \fIstate\fP \ %c
One of the following characters, indicating process state:
.RS
.IP R 3
Runnable
.IP O
Running
.IP S
Sleeping in an interruptible wait
.IP D
Waiting in uninterruptible
disk sleep
.IP Z
Zombie
.IP T
Stopped (on a signal) or trace stopped
.RE
.TP
(4) \fIppid\fP \ %d
The PID of the parent of this process.
.TP
(5) \fIpgrp\fP \ %d
The process group ID of the process.
.TP
(6) \fIsession\fP \ %d
The session ID of the process.
.TP
(7) \fItty_nr\fP \ %d
The controlling terminal of the process.
(The minor device number is contained in the combination of bits
31 to 20 and 7 to 0;
the major device number is in bits 15 to 8.)
.TP
(8) \fItpgid\fP \ %d
.\" This field and following, up to and including wchan added 0.99.1
The ID of the foreground process group of the controlling
terminal of the process.
.TP
(9) \fIflags\fP \ %u
The kernel flags word of the process.
.TP
(10) \fIminflt\fP \ %lu
The number of minor faults the process has made which have not
required loading a memory page from disk.
.TP
(11) \fIcminflt\fP \ %lu
The number of minor faults that the process's
waited-for children have made.
.TP
(12) \fImajflt\fP \ %lu
The number of major faults the process has made which have
required loading a memory page from disk.
.TP
(13) \fIcmajflt\fP \ %lu
The number of major faults that the process's
waited-for children have made.
.TP
(14) \fIutime\fP \ %lu
Amount of time that this process has been scheduled in user mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
This includes guest time, \fIguest_time\fP
(time spent running a virtual CPU, see below),
so that applications that are not aware of the guest time field
do not lose that time from their calculations.
.TP
(15) \fIstime\fP \ %lu
Amount of time that this process has been scheduled in kernel mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
(16) \fIcutime\fP \ %ld
Amount of time that this process's
waited-for children have been scheduled in user mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
(See also
.BR times (2).)
This includes guest time, \fIcguest_time\fP
(time spent running a virtual CPU, see below).
.TP
(17) \fIcstime\fP \ %ld
Amount of time that this process's
waited-for children have been scheduled in kernel mode,
measured in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
(18) \fIpriority\fP \ %ld
For processes running a real-time scheduling policy
.RI ( policy
below; see
.BR sched_setscheduler (2)),
this is the negated scheduling priority, minus one;
that is, a number in the range \-2 to \-100,
corresponding to real-time priorities 1 to 99.
For processes running under a non-real-time scheduling policy,
this is the raw nice value
.RB ( setpriority (2))
as represented in the kernel.
The kernel stores nice values as numbers
in the range 0 (high) to 39 (low),
corresponding to the user-visible nice range of \-20 to 19.
.TP
(19) \fInice\fP \ %ld
The nice value (see
.BR setpriority (2)),
a value in the range 19 (low priority) to \-20 (high priority).
.TP
(20) \fInum_threads\fP \ %ld
Number of threads in this process.
.TP
(21) \fIitrealvalue\fP \ %ld
The time in jiffies before the next
.B SIGALRM
is sent to the process due to an interval timer.
This field is no longer maintained,
and is hard coded as 0.
.TP
(22) \fIstarttime\fP \ %llu
The time the process started after system boot.
The value is expressed in clock ticks (divide by
.IR sysconf(_SC_CLK_TCK) ).
.TP
(23) \fIvsize\fP \ %lu
Virtual memory size in bytes.
.TP
(24) \fIrss\fP \ %ld
Resident Set Size: number of pages the process has in real memory.
This is just the pages which
count toward text, data, or stack space.
This does not include pages
which have not been demand-loaded in, or which are swapped out.
.TP
(25) \fIrsslim\fP \ %lu
Current soft limit in bytes on the rss of the process;
see the description of
.B RLIMIT_RSS
in
.BR getrlimit (2).
.RE
.TP
.I /proc/[pid]/statm
Provides information about memory usage, measured in pages.
The columns are:
.IP
.in +4n
.EX
size       (1) total program size
           (same as VmSize in \fI/proc/[pid]/status\fP)
resident   (2) resident set size
           (same as VmRSS in \fI/proc/[pid]/status\fP)
shared     (3) number of resident shared pages (i.e., backed by a file)
           (same as RssFile+RssShmem in \fI/proc/[pid]/status\fP)
text       (4) text (code)
lib        (5) library
data       (6) data + stack
dt         (7) dirty pages (always 0)
.EE
.in
.TP
.I /proc/[pid]/status
Provides much of the information in
.I /proc/[pid]/stat
and
.I /proc/[pid]/statm
in a format that's easier for humans to parse.
Here's an example:
.IP
.in +4n
.EX
.RB "$" " cat /proc/$$/status"
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   17248
Pid:    17248
PPid:   17200
Uid:    1000    1000    1000    1000
Gid:    100     100     100     100
VmSize:	  131168 kB
VmLck:	       0 kB
VmRSS:	   13484 kB
VmData:	   10332 kB
VmStk:	     136 kB
VmExe:	     992 kB
VmLib:	    2104 kB
SigPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000384004
.EE
.in
.IP
The fields are as follows:
.RS
.IP * 2
.IR Name :
Command run by this process.
.IP *
.IR Umask :
Process umask, expressed in octal with a leading zero; see
.BR umask (2).
.IP *
.IR State :
Current state of the process.
One of
"R (runnable)",
"O (running)",
"S (sleeping)",
"D (disk sleep)",
"T (stopped)",
"T (tracing stop)",
or
"Z (zombie)".
.IP *
.IR Tgid :
Thread group ID (i.e., Process ID).
.IP *
.IR Pid :
Thread ID (see
.BR gettid (2)).
.IP *
.IR PPid :
PID of parent process.
.IP *
.IR Uid ", " Gid :
Real, effective, saved set, and filesystem UIDs (GIDs).
.IP *
.IR VmSize :
Virtual memory size.
.IP *
.IR VmLck :
Locked memory size (see
.BR mlock (2)).
.IP *
.IR VmRSS :
Resident set size.
.IP *
.IR VmData ", " VmStk ", " VmExe :
Size of data, stack, and text segments.
.IP *
.IR VmLib :
Shared library code size.
.IP *
.IR SigPnd :
Number of signals pending for process as a whole (see
.BR pthreads (7)
and
.BR signal (7)).
.IP *
.IR SigBlk ", " SigIgn :
Masks indicating signals being blocked and ignored (see
.BR signal (7)).
.RE
.TP
.IR /proc/[pid]/uid
This read-only file contains the user id for the process.
.TP
.IR /proc/[pid]/winexename
This read-only file contains the Windows pathname of the executed command.
.TP
.IR /proc/[pid]/winpid
This read-only file contains the Windows process id for the process.
.TP
.I /proc/cpuinfo
This is a collection of CPU and system architecture dependent items,
for each supported architecture a different list.
Two common entries are \fIprocessor\fP which gives CPU number and
\fIbogomips\fP; a system constant that is calculated
during kernel initialization.
SMP machines have information for
each CPU.
The
.BR lscpu (1)
command gathers its information from this file.
.TP
.I /proc/cygdrive
This file is a symbolic link that points to the user's
Windows mapped drive mount point, and behaves in the same way as
.IR root .
.TP
.I /proc/devices
Text listing of major numbers and device groups.
This can be used by MAKEDEV scripts for consistency with the kernel.
.TP
.I /proc/filesystems
A text listing of the filesystems which are supported by the kernel,
namely filesystems which were compiled into the kernel or whose kernel
modules are currently loaded.
(See also
.BR filesystems (5).)
If a filesystem is marked with "nodev",
this means that it does not require a block device to be mounted
(e.g., virtual filesystem, network filesystem).
.IP
Incidentally, this file may be used by
.BR mount (8)
when no filesystem is specified and it didn't manage to determine the
filesystem type.
Then filesystems contained in this file are tried
(excepted those that are marked with "nodev").
.TP
.I /proc/loadavg
The first three fields in this file are load average figures
giving the number of jobs in the run queue (state R)
or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
They are the same as the load average numbers given by
.BR uptime (1)
and other programs.
The fourth field consists of two numbers separated by a slash (/).
The first of these is the number of currently runnable kernel
scheduling entities (processes, threads).
The value after the slash is the number of kernel scheduling entities
that currently exist on the system.
.TP
.I /proc/meminfo
This file reports statistics about memory usage on the system.
It is used by
.BR free (1)
to report the amount of free and used memory (both physical and swap)
on the system as well as the shared memory and buffers used by the
kernel.
Each line of the file consists of a parameter name, followed by a colon,
the value of the parameter, and an option unit of measurement (e.g., "kB").
The list below describes the parameter names and
the format specifier required to read the field value.
Some fields are displayed only if the kernel was configured
with various options; those dependencies are noted in the list.
.RS
.TP
.IR MemTotal " %lu"
Total usable RAM (i.e., physical RAM minus a few reserved
bits and the kernel binary code).
.TP
.IR MemFree " %lu"
The sum of
.IR LowFree + HighFree .
.TP
.IR HighTotal " %lu"
Total amount of highmem.
.TP
.IR HighFree " %lu
Amount of free highmem.
.TP
.IR LowTotal " %lu
Total amount of lowmem.
Lowmem is memory which can be used for everything that
highmem can be used for, but it is also available for the
kernel's use for its own data structures.
Bad things happen when you're out of lowmem.
.TP
.IR LowFree " %lu
Amount of free lowmem.
.TP
.IR SwapTotal " %lu"
Total amount of swap space available.
.TP
.IR SwapFree " %lu"
Amount of swap space that is currently unused.
.RE
.TP
.I /proc/misc
Text listing of minor device numbers and names of devices with major device
number of the misc device group.
This can be used by MAKEDEV scripts for consistency with the kernel.
.TP
.I /proc/mounts
With the introduction of per-process mount namespaces,
this file became a link to
.IR /proc/self/mounts ,
which lists the mount points of the process's own mount namespace.
The format of this file is documented in
.BR fstab (5).
.TP
.I /proc/net
This directory contains various files and subdirectories containing
information about the networking layer.
The files contain ASCII structures and are,
therefore, readable with
.BR cat (1).
However, the standard
.BR netstat (8)
suite provides much cleaner access to these files.
.TP
.I /proc/net/if_inet6
This file contains information about IP V6 interface adapters, if used.
Each line represents an IP V6 interface adapter.
.IP
.in +4n
.EX
fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
                           (1)  (2)(3)(4)(5)  (6)
.EE
.in
.IP
The fields in each line are:
.RS 7
.TP 5
(1)
The IP V6 address of the interface adapter.
.TP
(2)
The IP V6 interface adapter index.
.TP
(3)
The prefix length of the IP V6 interface address.
.TP
(4)
The scope of the IP V6 interface address.
.TP
(5)
The state of the IP V6 interface address.
.TP
(6)
The DUID/GUID/UUID of the IP V6 interface adapter.
.RE
.IP
The last number exists only for compatibility reasons and is always 1.
.TP
.I /proc/partitions
Contains the major and minor numbers of each partition as well as the number
of 1024-byte blocks and the partition name.
.TP
.I /proc/registry
Under Windows, this directory contains subdirectories for registry paths, keys,
and subkeys, and files named for registry values which contain registry data,
for the current process.
.TP
.I /proc/registry32
Under 64 bit Windows, this directory contains subdirectories for registry
paths, keys, and subkeys, and files named for registry values which contain
registry data, for 32 bit processes.
.TP
.I /proc/registry64
Under 64 bit Windows, this directory contains subdirectories for registry
paths, keys, and subkeys, and files named for registry values which contain
registry data, for 64 bit processes.
.TP
.I /proc/self
This directory refers to the process accessing the
.I /proc
filesystem,
and is identical to the
.I /proc
directory named by the process ID of the same process.
.TP
.I /proc/stat
kernel/system statistics.
Varies with architecture.
Common
entries include:
.RS
.TP
.I cpu  10132153 0 3084719 46828483
.TQ
.I cpu0 1393280 0 572056 13343292
The amount of time, measured in units of
USER_HZ (1/100ths of a second on most architectures, use
.IR sysconf(_SC_CLK_TCK)
to obtain the right value),
that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line)
spent in various states:
.RS
.TP
.I user
(1) Time spent in user mode.
.TP
.I nice
(2) Time spent in user mode with low priority (nice).
.TP
.I system
(3) Time spent in system mode.
.TP
.I idle
(4) Time spent in the idle task.
.RE
.TP
\fIpage 5741 1808\fP
The number of pages the system paged in and the number that were paged
out (from disk).
.TP
\fIswap 1 0\fP
The number of swap pages that have been brought in and out.
.TP
\fIintr 1462898\fP
This number of interrupts serviced.
.TP
\fIctxt 115315\fP
The number of context switches that the system underwent.
.TP
\fIbtime 769041601\fP
boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
.RE
.TP
.I /proc/swaps
Swap areas in use.
See also
.BR swapon (8).
.TP
.I /proc/sys
This directory contains a number of files
and subdirectories corresponding to kernel variables.
These variables can be read using
the \fI/proc\fP filesystem, and the (deprecated)
.BR sysctl (2)
system call.
.IP
String values may be terminated by either \(aq\e0\(aq or \(aq\en\(aq.
.IP
Integer and long values may be written either in decimal or in
hexadecimal notation (e.g. 0x3FFF).
When writing multiple integer or long values, these may be separated
by any of the following whitespace characters:
\(aq\ \(aq, \(aq\et\(aq, or \(aq\en\(aq.
Using other separators leads to the error
.BR EINVAL .
.TP
.I /proc/sysvipc
Subdirectory containing the pseudo-files
.IR msg ", " sem " and " shm "."
These files list the System V Interprocess Communication (IPC) objects
(respectively: message queues, semaphores, and shared memory)
that currently exist on the system,
providing similar information to that available via
.BR ipcs (1).
These files have headers and are formatted (one IPC object per line)
for easy understanding.
.BR svipc (7)
provides further background on the information shown by these files.
.TP
.I /proc/uptime
This file contains two numbers (values in seconds): the uptime of the
system (including time spent in suspend) and the amount of time spent
in the idle process.
.TP
.I /proc/version
This string identifies the kernel version that is currently running.
For example:
.IP
.in 2n
.EX
CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC
.EE
.in
.SH NOTES
Many files contain strings (e.g., the environment and command line)
that are in the internal format,
with subfields terminated by null bytes (\(aq\e0\(aq).
When inspecting such files, you may find that the results are more readable
if you use a command of the following form to display them:
.PP
.in +4n
.EX
.RB "$" " cat -A \fIfile\fP"
.EE
.in
.PP
This manual page is incomplete, possibly inaccurate, and is the kind
of thing that needs to be updated very often.
.SH SEE ALSO
.BR cat (1),
.BR find (1),
.BR free (1),
.BR ps (1),
.BR pstree (1),
.BR tr (1),
.BR uptime (1),
.BR chroot (2),
.BR mmap (2),
.BR readlink (2),
.BR syslog (2),
.BR hier (7),
.BR arp (8),
.BR mount (8),
.BR netstat (8),
.BR route (8).
.SH COLOPHON
This page is part of version 3 of
.IR Cygwin .
A description of the project,
information about reporting bugs,
and the latest documentation,
can be found at
.IR \%https://cygwin.com/docs.html .

[-- Attachment #3: proc-5.xml --]
[-- Type: text/xml, Size: 61553 bytes --]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
                   "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- lifted from man+troff by doclifter -->
<refentry id='proc5'>
<!-- (c) Copyright 2020 Cygwin project
(c) Copyright 2002&bsol;-2008,2017 Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
(c) Copyright 1994, 1995 by Daniel Quinlan (quinlan@yggdrasil.com) -->

<!-- %%%LICENSE_START(GPLv2+_DOC_FULL)
This is free documentation; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version. -->

<!-- The GNU General Public License's references to "object code"
and "executables" are to be interpreted as the output of any
document formatting or typesetting system, including
intermediate and printed output. -->

<!-- This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details. -->

<!-- You should have received a copy of the GNU General Public
License along with this manual; if not, see
&lt;<ulink url='http://www.gnu.org/licenses/&gt;'>http://www.gnu.org/licenses/&gt;</ulink>.
%%%LICENSE_END -->

<refentryinfo><date>2020-11-11</date></refentryinfo>
<refmeta>
<refentrytitle>PROC</refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo class='date'>2020-11-11</refmiscinfo>
<refmiscinfo class='source'>Cygwin</refmiscinfo>
<refmiscinfo class='manual'>Cygwin User's Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>proc</refname>
<refpurpose>process information pseudo-filesystem</refpurpose>
</refnamediv>
<!-- body begins here -->

<refsect1 id='description'><title>DESCRIPTION</title>
<para>The
<emphasis role='strong' remap='B'>proc</emphasis>
filesystem is a pseudo-filesystem which provides an interface to
kernel data structures.
It is commonly mounted at
<filename>/proc</filename>.
Typically, it is mounted automatically by the system.</para>


<refsect2 id='overview'><title>Overview</title>
<para>Underneath
<filename>/proc</filename>,
there are the following general groups of files and subdirectories:</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><filename>/proc/[pid]</filename> subdirectories</term>
  <listitem>
<para>Each one of these subdirectories contains files and subdirectories
exposing information about the process with the corresponding process ID.</para>

<para>The
<filename>/proc/[pid]</filename>
subdirectories are visible when iterating through
<filename>/proc</filename>
with
<citerefentry><refentrytitle>getdents</refentrytitle><manvolnum>2</manvolnum></citerefentry>
(and thus are visible when one uses
<citerefentry><refentrytitle>ls</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to view the contents of
<filename>/proc</filename>).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/self</filename></term>
  <listitem>
<para>When a process accesses this magic symbolic link,
it resolves to the process's own
<filename>/proc/[pid]</filename>
directory.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[a-z]*</filename></term>
  <listitem>
<para>Various other files and subdirectories under
<filename>/proc</filename>
expose system-wide information.</para>
  </listitem>
  </varlistentry>
</variablelist>

<para>All of the above are described in more detail below.</para>

</refsect2>

<refsect2 id='files_and_directories'><title>Files and directories</title>
<para>The following list provides details of many of the files and directories
under the
<filename>/proc</filename>
hierarchy.</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><filename>/proc/[pid]</filename></term>
  <listitem>
<para>There is a numerical subdirectory for each running process; the
subdirectory is named by the process ID.
Each
<filename>/proc/[pid]</filename>
subdirectory contains the pseudo-files and directories described below.</para>

<para>The files inside each
<filename>/proc/[pid]</filename>
directory are normally owned by the effective user and
effective group ID of the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/cmdline</filename></term>
  <listitem>
<para>This read-only file holds the complete command line for the process,
unless the process is a zombie.
In the latter case, there is nothing in this file:
that is, a read on this file will return 0 characters.
The command-line arguments appear in this file as a set of
strings followed by null bytes (&apos;'&bsol;0&apos;').</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/ctty</filename></term>
  <listitem>
<para>This read-only file holds the name of the console or control terminal device
for the process, unless the process is detached from any terminal.
In the latter case, there is only a newline in this file.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/cwd</filename></term>
  <listitem>
<para>This is a symbolic link to the current working directory of the process.
To find out the current working directory of process 20,
for instance, you can do this:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> cd /proc/20/cwd; /bin/pwd</emphasis>
</literallayout> <!-- remap='EE'
in -->

<para>Note that the
<emphasis remap='I'>pwd</emphasis>
command is often a shell built-in, and might
not work properly.
In
<citerefentry><refentrytitle>bash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
you may use
<userinput>pwd&nbsp;-P</userinput>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/environ</filename></term>
  <listitem>
<para>This read-only file contains the initial environment that was set
when the currently executing program was started via
<citerefentry><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
The entries are separated by null bytes (&apos;'&bsol;0&apos;'),
and there may be a null byte at the end.
Thus, to print out the environment of process 1, you would do:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> cat -A /proc/1/environ</emphasis>
</literallayout> <!-- remap='EE'
in -->

<para>If, after an
<citerefentry><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
the process modifies its environment
(e.g., by calling functions such as
<citerefentry><refentrytitle>putenv</refentrytitle><manvolnum>3</manvolnum></citerefentry>
or modifying the
<citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
variable directly),
this file will
<emphasis remap='I'>not</emphasis>
reflect those changes.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/exe</filename></term>
  <listitem>
<para>This file is a symbolic link
containing the actual pathname of the executed command.
This symbolic link can be dereferenced normally; attempting to open
it will open the executable.
You can even type
<filename>/proc/[pid]/exe</filename>
to run another copy of the same executable that is being run by
process [pid].
<filename>/proc/[pid]/exe</filename>
is a pointer to the binary which was executed,
and appears as a symbolic link.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/exename</filename></term>
  <listitem>
<para>This read-only file contains the actual pathname of the executed command.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/fd/</filename></term>
  <listitem>
<para>This is a subdirectory containing one entry for each file which the
process has open, named by its file descriptor, and which is a
symbolic link to the actual file.
Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.</para>

<para>For file descriptors for pipes and sockets,
the entries will be symbolic links whose content is the
file type with the inode.
A
<citerefentry><refentrytitle>readlink</refentrytitle><manvolnum>2</manvolnum></citerefentry>
call on this file returns a string in the format:</para>

<para>    type:[inode]</para>

<para>For example,
<emphasis remap='I'>socket:[2248868]</emphasis>
will be a socket and its inode is 2248868.</para>

<para>Programs that take a filename as a command-line argument,
but don't take input from standard input if no argument is supplied,
and programs that write to a file named as a command-line argument,
but don't send their output to standard output
if no argument is supplied, can nevertheless be made to use
standard input or standard output by using
<filename>/proc/[pid]/fd</filename>
files as command-line arguments.
For example, assuming that
<option>-i</option>
is the flag designating an input file and
<option>-o</option>
is the flag designating an output file:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...</emphasis>
</literallayout> <!-- remap='EE'
in -->

<para>and you have a working filter.</para>

<para><filename>/proc/self/fd/N</filename>
is approximately the same as
<filename>/dev/fd/N</filename>
in some UNIX and UNIX-like systems.
Most Linux MAKEDEV scripts symbolically link
<filename>/dev/fd</filename>
to
<filename>/proc/self/fd</filename>,
in fact.</para>

<para>Most systems provide symbolic links
<filename>/dev/stdin</filename>,
<filename>/dev/stdout</filename>,
and
<filename>/dev/stderr</filename>,
which respectively link to the files
<literal>0</literal>,
<literal>1</literal>,
and
<literal>2</literal>
in
<filename>/proc/self/fd</filename>.
Thus the example command above could be written as:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> foobar -i /dev/stdin -o /dev/stdout ...</emphasis>
</literallayout> <!-- remap='EE'
in -->

<para>Note that for file descriptors referring to inodes (pipes and sockets, see above),
those inodes still have permission bits and ownership information
distinct from those of the
<filename>/proc/[pid]/fd</filename>
entry,
and that the owner may differ from the user and group IDs of the process.
An unprivileged process may lack permissions to open them, as in this example:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> echo test | sudo -u nobody cat</emphasis>
test
$<emphasis role='strong' remap='B'> echo test | sudo -u nobody cat /proc/self/fd/0</emphasis>
cat: /proc/self/fd/0: Permission denied
</literallayout> <!-- remap='EE'
in -->

<para>File descriptor 0 refers to the pipe created by the shell
and owned by that shell's user, which is not
<emphasis remap='I'>nobody</emphasis>,
so
<emphasis role='strong' remap='B'>cat</emphasis>
does not have permission to create a new file descriptor to read from that inode,
even though it can still read from its existing file descriptor 0.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/gid</filename></term>
  <listitem>
<para>This read-only file contains the primary group id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/maps</filename></term>
  <listitem>
<para>A file containing the currently mapped memory regions and their access
permissions.
See
<citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>
for some further information about memory mappings.</para>

<para>The format of the file is:</para>

<!-- in 0n -->
<literallayout remap='EX'>
<emphasis remap='I'>address          perms offset   dev       inode               pathname</emphasis>
00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
...
00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
00200000-00377000 ===p 00000000 0000:0000 0                   
00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
...
00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
...
100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
...
180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
...
800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0           
7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0           
7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0           
...
7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
...
</literallayout> <!-- remap='EE' -->
<para>The
<emphasis remap='I'>address</emphasis>
field is the address space in the process that the mapping occupies.
The
<emphasis remap='I'>perms</emphasis>
field is a set of permissions:</para>

<!-- in +4 -->
<literallayout remap='EX'>
r: read
w: write
x: execute
===: reserved
s: shared
g: guard
p: private
</literallayout> <!-- remap='EE'
in -->

<para>The
<emphasis remap='I'>offset</emphasis>
field is the offset into the file/whatever;
<emphasis remap='I'>dev</emphasis>
is the device
(major:minor);
<emphasis remap='I'>inode</emphasis>
is the inode on that device.
0 indicates that no inode is associated with the memory region,
as would be the case with BSS (uninitialized data).</para>

<para>The
<emphasis remap='I'>pathname</emphasis>
field will usually be the file that is backing the mapping.</para>

<para>There are additional helpful pseudo-paths:</para>
    <variablelist remap='TP'>
      <varlistentry>
      <term>[<emphasis remap='I'>cygwin-shared</emphasis>]</term>
      <listitem>
<para>Global shared Cygwin process information.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>cygwin-user-shared</emphasis>]</term>
      <listitem>
<para>Global shared Cygwin user information.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>peb</emphasis>]</term>
      <listitem>
<para>Windows Process Environment Block.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>procinfo</emphasis>]</term>
      <listitem>
<para>Cygwin process information.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>shared-user-data</emphasis>]</term>
      <listitem>
<para>Shared user information.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>heap</emphasis>]</term>
      <listitem>
<para>The process's heap.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>stack</emphasis>]</term>
      <listitem>
<para>The initial process's (also known as the main thread's) stack.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>stack</emphasis> (tid <emphasis remap='I'>&lt;tid&gt;</emphasis>)]</term>
      <listitem>
<para>A thread's stack (where the
<emphasis remap='I'>&lt;tid&gt;</emphasis>
is a thread id).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>teb</emphasis> (tid <emphasis remap='I'>&lt;tid&gt;</emphasis>)]</term>
      <listitem>
<para>Windows Thread Environment Block (where
<emphasis remap='I'>&lt;tid&gt;</emphasis>
is a thread id).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>[<emphasis remap='I'>win heap &lt;n&gt; default shared exec grow noserial debug</emphasis>]</term>
      <listitem>
<para>Windows extended heap (where
<emphasis remap='I'>&lt;n&gt;</emphasis>
is a heap id)
<!-- br -->
and the rest of the words are heap flags:</para>
        <variablelist remap='TP'>
          <varlistentry>
          <term><emphasis remap='I'>default</emphasis></term>
          <listitem>
<para>default heap flags</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>shared</emphasis></term>
          <listitem>
<para>shareable and mapped heap flags</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>exec</emphasis></term>
          <listitem>
<para>executable heap flag</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>grow</emphasis></term>
          <listitem>
<para>growable heap flag</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>noserial</emphasis></term>
          <listitem>
<para>do not serialize heap flag</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>debug</emphasis></term>
          <listitem>
<para>debugged heap flag</para>
<!-- in -->
          </listitem>
          </varlistentry>
        </variablelist>
<!-- in -->
      </listitem>
      </varlistentry>
    </variablelist>

<para>If the
<emphasis remap='I'>pathname</emphasis>
field is blank,
this is an anonymous mapping as obtained via
<citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
There is no easy way to coordinate this back to a process's source,
short of running it through
<citerefentry><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>strace</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
or similar.</para>

<para><emphasis remap='I'>pathname</emphasis>
is shown unescaped except for newline characters, which are replaced
with an octal escape sequence.
As a result, it is not possible to determine whether the original
pathname contained a newline character or the literal
<emphasis remap='I'>&bsol;e012</emphasis>
character sequence.</para>

<para>If the mapping is file-backed and the file has been deleted, the string
" (deleted)" is appended to the pathname.
Note that this is ambiguous too.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/mountinfo</filename></term>
  <listitem>
<para>This file contains information about mount points
in the process's mount namespace (see
<citerefentry><refentrytitle>mount_namespaces</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
It supplies various information
(e.g., propagation state, root of mount for bind mounts,
identifier for each mount and its parent) that is missing from the (older)
<filename>/proc/[pid]/mounts</filename>
file, and fixes various other problems with that file
(e.g., nonextensibility,
failure to distinguish per-mount versus per-superblock options).</para>

<para>The file contains lines of the form:</para>

<!-- in 0n -->
<literallayout remap='EX'>
36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
</literallayout> <!-- remap='EE' -->
<para>The numbers in parentheses are labels for the descriptions below:</para>
    <variablelist remap='TP'>
      <varlistentry>
      <term>(1)</term>
      <listitem>
<para>mount ID: a unique ID for the mount (may be reused after
<citerefentry><refentrytitle>umount</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(2)</term>
      <listitem>
<para>parent ID: the ID of the parent mount
(or of self for the root of this mount namespace's mount tree).</para>

<para>If a new mount is stacked on top of a previous existing mount
(so that it hides the existing mount) at pathname P,
then the parent of the new mount is the previous mount at that location.
Thus, when looking at all the mounts stacked at a particular location,
the top-most mount is the one that is not the parent
of any other mount at the same location.
(Note, however, that this top-most mount will be accessible only if
the longest path subprefix of P that is a mount point
is not itself hidden by a stacked mount.)</para>

<para>If the parent mount point lies outside the process's root directory (see
<citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>),
the ID shown here won't have a corresponding record in
<emphasis remap='I'>mountinfo</emphasis>
whose mount ID (field 1) matches this parent mount ID
(because mount points that lie outside the process's root directory
are not shown in
<emphasis remap='I'>mountinfo</emphasis>).
As a special case of this point,
the process's root mount point may have a parent mount
(for the initramfs filesystem) that lies
<!-- Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
mtk: In the initial mount namespace, this hidden ID has the value 0 -->
outside the process's root directory,
and an entry for that mount point will not appear in
<emphasis remap='I'>mountinfo</emphasis>.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(3)</term>
      <listitem>
<para>major:minor: the value of
<emphasis remap='I'>st_dev</emphasis>
for files on this filesystem (see
<citerefentry><refentrytitle>stat</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(4)</term>
      <listitem>
<para>root: the pathname of the directory in the filesystem
which forms the root of this mount.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(5)</term>
      <listitem>
<para>mount point: the pathname of the mount point relative
to the process's root directory.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(6)</term>
      <listitem>
<para>mount options: per-mount options (see
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(7)</term>
      <listitem>
<para>optional fields: zero or more fields of the form "tag[:value]"; see below.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(8)</term>
      <listitem>
<para>separator: the end of the optional fields is marked by a single hyphen.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(9)</term>
      <listitem>
<para>filesystem type: the filesystem type in the form "type[.subtype]".</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(10)</term>
      <listitem>
<para>mount source: filesystem-specific information or "none".</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(11)</term>
      <listitem>
<para>super options: per-superblock options (see
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      </varlistentry>
    </variablelist>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/mounts</filename></term>
  <listitem>
<para>This file lists all the filesystems currently mounted in the
process's mount namespace (see
<citerefentry><refentrytitle>mount_namespaces</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
The format of this file is documented in
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/pgid</filename></term>
  <listitem>
<para>This read-only file contains the process group id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/ppid</filename></term>
  <listitem>
<para>This read-only file contains the parent process id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/root</filename></term>
  <listitem>
<para>UNIX and Linux support the idea of a per-process root of the
filesystem, set by the
<citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
system call.
This file is a symbolic link that points to the process's
root directory, and behaves in the same way as
<emphasis remap='I'>exe</emphasis>,
and
<emphasis remap='I'>fd/*</emphasis>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/sid</filename></term>
  <listitem>
<para>This read-only file contains the session id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/stat</filename></term>
  <listitem>
<para>Status information about the process.
This is used by
<citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>

<para>The fields, in order, with their proper
<citerefentry><refentrytitle>scanf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
format specifiers, are listed below.</para>

    <variablelist remap='TP'>
      <varlistentry>
      <term>(1) <emphasis remap='I'>pid</emphasis>  %d</term>
      <listitem>
<!-- br -->
<para>The process ID.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(2) <emphasis remap='I'>comm</emphasis>  %s</term>
      <listitem>
<para>The filename of the executable, in parentheses.
This is visible whether or not the executable is swapped out.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(3) <emphasis remap='I'>state</emphasis>  %c</term>
      <listitem>
<para>One of the following characters, indicating process state:</para>
        <variablelist remap='IP'>
          <varlistentry>
          <term>R</term>
          <listitem>
<para>Runnable</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term>O</term>
          <listitem>
<para>Running</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term>S</term>
          <listitem>
<para>Sleeping in an interruptible wait</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term>D</term>
          <listitem>
<para>Waiting in uninterruptible
disk sleep</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term>Z</term>
          <listitem>
<para>Zombie</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term>T</term>
          <listitem>
<para>Stopped (on a signal) or trace stopped</para>
          </listitem>
          </varlistentry>
        </variablelist>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(4) <emphasis remap='I'>ppid</emphasis>  %d</term>
      <listitem>
<para>The PID of the parent of this process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(5) <emphasis remap='I'>pgrp</emphasis>  %d</term>
      <listitem>
<para>The process group ID of the process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(6) <emphasis remap='I'>session</emphasis>  %d</term>
      <listitem>
<para>The session ID of the process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(7) <emphasis remap='I'>tty_nr</emphasis>  %d</term>
      <listitem>
<para>The controlling terminal of the process.
(The minor device number is contained in the combination of bits
31 to 20 and 7 to 0;
the major device number is in bits 15 to 8.)</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(8) <emphasis remap='I'>tpgid</emphasis>  %d</term>
      <listitem>
<!-- This field and following, up to and including wchan added 0.99.1 -->
<para>The ID of the foreground process group of the controlling
terminal of the process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(9) <emphasis remap='I'>flags</emphasis>  %u</term>
      <listitem>
<para>The kernel flags word of the process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(10) <emphasis remap='I'>minflt</emphasis>  %lu</term>
      <listitem>
<para>The number of minor faults the process has made which have not
required loading a memory page from disk.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(11) <emphasis remap='I'>cminflt</emphasis>  %lu</term>
      <listitem>
<para>The number of minor faults that the process's
waited-for children have made.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(12) <emphasis remap='I'>majflt</emphasis>  %lu</term>
      <listitem>
<para>The number of major faults the process has made which have
required loading a memory page from disk.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(13) <emphasis remap='I'>cmajflt</emphasis>  %lu</term>
      <listitem>
<para>The number of major faults that the process's
waited-for children have made.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(14) <emphasis remap='I'>utime</emphasis>  %lu</term>
      <listitem>
<para>Amount of time that this process has been scheduled in user mode,
measured in clock ticks (divide by
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>).
This includes guest time, <emphasis remap='I'>guest_time</emphasis>
(time spent running a virtual CPU, see below),
so that applications that are not aware of the guest time field
do not lose that time from their calculations.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(15) <emphasis remap='I'>stime</emphasis>  %lu</term>
      <listitem>
<para>Amount of time that this process has been scheduled in kernel mode,
measured in clock ticks (divide by
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(16) <emphasis remap='I'>cutime</emphasis>  %ld</term>
      <listitem>
<para>Amount of time that this process's
waited-for children have been scheduled in user mode,
measured in clock ticks (divide by
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>).
(See also
<citerefentry><refentrytitle>times</refentrytitle><manvolnum>2</manvolnum></citerefentry>.)
This includes guest time, <emphasis remap='I'>cguest_time</emphasis>
(time spent running a virtual CPU, see below).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(17) <emphasis remap='I'>cstime</emphasis>  %ld</term>
      <listitem>
<para>Amount of time that this process's
waited-for children have been scheduled in kernel mode,
measured in clock ticks (divide by
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(18) <emphasis remap='I'>priority</emphasis>  %ld</term>
      <listitem>
<para>For processes running a real-time scheduling policy
(<emphasis remap='I'>policy</emphasis>
below; see
<citerefentry><refentrytitle>sched_setscheduler</refentrytitle><manvolnum>2</manvolnum></citerefentry>),
this is the negated scheduling priority, minus one;
that is, a number in the range -2 to -100,
corresponding to real-time priorities 1 to 99.
For processes running under a non-real-time scheduling policy,
this is the raw nice value
(<citerefentry><refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum></citerefentry>)
as represented in the kernel.
The kernel stores nice values as numbers
in the range 0 (high) to 39 (low),
corresponding to the user-visible nice range of -20 to 19.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(19) <emphasis remap='I'>nice</emphasis>  %ld</term>
      <listitem>
<para>The nice value (see
<citerefentry><refentrytitle>setpriority</refentrytitle><manvolnum>2</manvolnum></citerefentry>),
a value in the range 19 (low priority) to -20 (high priority).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(20) <emphasis remap='I'>num_threads</emphasis>  %ld</term>
      <listitem>
<para>Number of threads in this process.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(21) <emphasis remap='I'>itrealvalue</emphasis>  %ld</term>
      <listitem>
<para>The time in jiffies before the next
<emphasis role='strong' remap='B'>SIGALRM</emphasis>
is sent to the process due to an interval timer.
This field is no longer maintained,
and is hard coded as 0.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(22) <emphasis remap='I'>starttime</emphasis>  %llu</term>
      <listitem>
<para>The time the process started after system boot.
The value is expressed in clock ticks (divide by
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(23) <emphasis remap='I'>vsize</emphasis>  %lu</term>
      <listitem>
<para>Virtual memory size in bytes.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(24) <emphasis remap='I'>rss</emphasis>  %ld</term>
      <listitem>
<para>Resident Set Size: number of pages the process has in real memory.
This is just the pages which
count toward text, data, or stack space.
This does not include pages
which have not been demand-loaded in, or which are swapped out.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(25) <emphasis remap='I'>rsslim</emphasis>  %lu</term>
      <listitem>
<para>Current soft limit in bytes on the rss of the process;
see the description of
<emphasis role='strong' remap='B'>RLIMIT_RSS</emphasis>
in
<citerefentry><refentrytitle>getrlimit</refentrytitle><manvolnum>2</manvolnum></citerefentry>.</para>
      </listitem>
      </varlistentry>
    </variablelist>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/statm</filename></term>
  <listitem>
<para>Provides information about memory usage, measured in pages.
The columns are:</para>

<!-- in +4n -->
<literallayout remap='EX'>
size       (1) total program size
           (same as VmSize in <filename>/proc/[pid]/status</filename>)
resident   (2) resident set size
           (same as VmRSS in <filename>/proc/[pid]/status</filename>)
shared     (3) number of resident shared pages (i.e., backed by a file)
           (same as RssFile+RssShmem in <filename>/proc/[pid]/status</filename>)
text       (4) text (code)
lib        (5) library
data       (6) data + stack
dt         (7) dirty pages (always 0)
</literallayout> <!-- remap='EE' -->
<para><filename>/proc/[pid]/status</filename>
Provides much of the information in
<filename>/proc/[pid]/stat</filename>
and
<filename>/proc/[pid]/statm</filename>
in a format that's easier for humans to parse.
Here's an example:</para>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> cat /proc/$$/status</emphasis>
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   17248
Pid:    17248
PPid:   17200
Uid:    1000    1000    1000    1000
Gid:    100     100     100     100
VmSize:	  131168 kB
VmLck:	       0 kB
VmRSS:	   13484 kB
VmData:	   10332 kB
VmStk:	     136 kB
VmExe:	     992 kB
VmLib:	    2104 kB
SigPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000384004
</literallayout> <!-- remap='EE' -->
<para>The fields are as follows:</para>
    <itemizedlist remap='IP+bullet'>
      <listitem override='bullet'>
<para><emphasis remap='I'>Name</emphasis>:
Command run by this process.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>Umask</emphasis>:
Process umask, expressed in octal with a leading zero; see
<citerefentry><refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum></citerefentry>.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>State</emphasis>:
Current state of the process.
One of
"R (runnable)",
"O (running)",
"S (sleeping)",
"D (disk sleep)",
"T (stopped)",
"T (tracing stop)",
or
"Z (zombie)".</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>Tgid</emphasis>:
Thread group ID (i.e., Process ID).</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>Pid</emphasis>:
Thread ID (see
<citerefentry><refentrytitle>gettid</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>PPid</emphasis>:
PID of parent process.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>Uid</emphasis>, <emphasis remap='I'>Gid</emphasis>:
Real, effective, saved set, and filesystem UIDs (GIDs).</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>VmSize</emphasis>:
Virtual memory size.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>VmLck</emphasis>:
Locked memory size (see
<citerefentry><refentrytitle>mlock</refentrytitle><manvolnum>2</manvolnum></citerefentry>).</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>VmRSS</emphasis>:
Resident set size.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>VmData</emphasis>, <emphasis remap='I'>VmStk</emphasis>, <emphasis remap='I'>VmExe</emphasis>:
Size of data, stack, and text segments.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>VmLib</emphasis>:
Shared library code size.</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>SigPnd</emphasis>:
Number of signals pending for process as a whole (see
<citerefentry><refentrytitle>pthreads</refentrytitle><manvolnum>7</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>).</para>
      </listitem>
      <listitem override='bullet'>
<para><emphasis remap='I'>SigBlk</emphasis>, <emphasis remap='I'>SigIgn</emphasis>:
Masks indicating signals being blocked and ignored (see
<citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>).</para>
      </listitem>
    </itemizedlist>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/uid</filename></term>
  <listitem>
<para>This read-only file contains the user id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/winexename</filename></term>
  <listitem>
<para>This read-only file contains the Windows pathname of the executed command.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/[pid]/winpid</filename></term>
  <listitem>
<para>This read-only file contains the Windows process id for the process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/cpuinfo</filename></term>
  <listitem>
<para>This is a collection of CPU and system architecture dependent items,
for each supported architecture a different list.
Two common entries are <emphasis remap='I'>processor</emphasis> which gives CPU number and
<emphasis remap='I'>bogomips</emphasis>; a system constant that is calculated
during kernel initialization.
SMP machines have information for
each CPU.
The
<citerefentry><refentrytitle>lscpu</refentrytitle><manvolnum>1</manvolnum></citerefentry>
command gathers its information from this file.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/cygdrive</filename></term>
  <listitem>
<para>This file is a symbolic link that points to the user's
Windows mapped drive mount point, and behaves in the same way as
<emphasis remap='I'>root</emphasis>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/devices</filename></term>
  <listitem>
<para>Text listing of major numbers and device groups.
This can be used by MAKEDEV scripts for consistency with the kernel.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/filesystems</filename></term>
  <listitem>
<para>A text listing of the filesystems which are supported by the kernel,
namely filesystems which were compiled into the kernel or whose kernel
modules are currently loaded.
(See also
<citerefentry><refentrytitle>filesystems</refentrytitle><manvolnum>5</manvolnum></citerefentry>.)
If a filesystem is marked with "nodev",
this means that it does not require a block device to be mounted
(e.g., virtual filesystem, network filesystem).</para>

<para>Incidentally, this file may be used by
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>
when no filesystem is specified and it didn't manage to determine the
filesystem type.
Then filesystems contained in this file are tried
(excepted those that are marked with "nodev").</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/loadavg</filename></term>
  <listitem>
<para>The first three fields in this file are load average figures
giving the number of jobs in the run queue (state R)
or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes.
They are the same as the load average numbers given by
<citerefentry><refentrytitle>uptime</refentrytitle><manvolnum>1</manvolnum></citerefentry>
and other programs.
The fourth field consists of two numbers separated by a slash (/).
The first of these is the number of currently runnable kernel
scheduling entities (processes, threads).
The value after the slash is the number of kernel scheduling entities
that currently exist on the system.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/meminfo</filename></term>
  <listitem>
<para>This file reports statistics about memory usage on the system.
It is used by
<citerefentry><refentrytitle>free</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to report the amount of free and used memory (both physical and swap)
on the system as well as the shared memory and buffers used by the
kernel.
Each line of the file consists of a parameter name, followed by a colon,
the value of the parameter, and an option unit of measurement (e.g., "kB").
The list below describes the parameter names and
the format specifier required to read the field value.
Some fields are displayed only if the kernel was configured
with various options; those dependencies are noted in the list.</para>
    <variablelist remap='TP'>
      <varlistentry>
      <term><emphasis remap='I'>MemTotal</emphasis> %lu</term>
      <listitem>
<para>Total usable RAM (i.e., physical RAM minus a few reserved
bits and the kernel binary code).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>MemFree</emphasis> %lu</term>
      <listitem>
<para>The sum of
<emphasis remap='I'>LowFree</emphasis>+<emphasis remap='I'>HighFree</emphasis>.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>HighTotal</emphasis> %lu</term>
      <listitem>
<para>Total amount of highmem.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>HighFree</emphasis> %lu</term>
      <listitem>
<para>Amount of free highmem.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>LowTotal</emphasis> %lu</term>
      <listitem>
<para>Total amount of lowmem.
Lowmem is memory which can be used for everything that
highmem can be used for, but it is also available for the
kernel's use for its own data structures.
Bad things happen when you're out of lowmem.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>LowFree</emphasis> %lu</term>
      <listitem>
<para>Amount of free lowmem.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>SwapTotal</emphasis> %lu</term>
      <listitem>
<para>Total amount of swap space available.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>SwapFree</emphasis> %lu</term>
      <listitem>
<para>Amount of swap space that is currently unused.</para>
      </listitem>
      </varlistentry>
    </variablelist>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/misc</filename></term>
  <listitem>
<para>Text listing of minor device numbers and names of devices with major device
number of the misc device group.
This can be used by MAKEDEV scripts for consistency with the kernel.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/mounts</filename></term>
  <listitem>
<para>With the introduction of per-process mount namespaces,
this file became a link to
<filename>/proc/self/mounts</filename>,
which lists the mount points of the process's own mount namespace.
The format of this file is documented in
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/net</filename></term>
  <listitem>
<para>This directory contains various files and subdirectories containing
information about the networking layer.
The files contain ASCII structures and are,
therefore, readable with
<citerefentry><refentrytitle>cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
However, the standard
<citerefentry><refentrytitle>netstat</refentrytitle><manvolnum>8</manvolnum></citerefentry>
suite provides much cleaner access to these files.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/net/if_inet6</filename></term>
  <listitem>
<para>This file contains information about IP V6 interface adapters, if used.
Each line represents an IP V6 interface adapter.</para>

<!-- in +4n -->
<literallayout remap='EX'>
fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
                           (1)  (2)(3)(4)(5)  (6)
</literallayout> <!-- remap='EE' -->
<para>The fields in each line are:</para>
    <variablelist remap='TP'>
      <varlistentry>
      <term>(1)</term>
      <listitem>
<para>The IP V6 address of the interface adapter.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(2)</term>
      <listitem>
<para>The IP V6 interface adapter index.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(3)</term>
      <listitem>
<para>The prefix length of the IP V6 interface address.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(4)</term>
      <listitem>
<para>The scope of the IP V6 interface address.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(5)</term>
      <listitem>
<para>The state of the IP V6 interface address.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term>(6)</term>
      <listitem>
<para>The DUID/GUID/UUID of the IP V6 interface adapter.</para>
      </listitem>
      </varlistentry>
    </variablelist>

<para>The last number exists only for compatibility reasons and is always 1.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/partitions</filename></term>
  <listitem>
<para>Contains the major and minor numbers of each partition as well as the number
of 1024-byte blocks and the partition name.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/registry</filename></term>
  <listitem>
<para>Under Windows, this directory contains subdirectories for registry paths, keys,
and subkeys, and files named for registry values which contain registry data,
for the current process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/registry32</filename></term>
  <listitem>
<para>Under 64 bit Windows, this directory contains subdirectories for registry
paths, keys, and subkeys, and files named for registry values which contain
registry data, for 32 bit processes.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/registry64</filename></term>
  <listitem>
<para>Under 64 bit Windows, this directory contains subdirectories for registry
paths, keys, and subkeys, and files named for registry values which contain
registry data, for 64 bit processes.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/self</filename></term>
  <listitem>
<para>This directory refers to the process accessing the
<filename>/proc</filename>
filesystem,
and is identical to the
<filename>/proc</filename>
directory named by the process ID of the same process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/stat</filename></term>
  <listitem>
<para>kernel/system statistics.
Varies with architecture.
Common
entries include:</para>
    <variablelist remap='TP'>
      <varlistentry>
      <term><emphasis remap='I'>cpu 10132153 0 3084719 46828483</emphasis></term>
      <term><emphasis remap='I'>cpu0 1393280 0 572056 13343292</emphasis></term>
      <listitem>
<para>The amount of time, measured in units of
USER_HZ (1/100ths of a second on most architectures, use
<emphasis remap='I'>sysconf(_SC_CLK_TCK)</emphasis>
to obtain the right value),
that the system ("cpu" line) or the specific CPU ("cpu<emphasis remap='I'>N</emphasis>" line)
spent in various states:</para>
        <variablelist remap='TP'>
          <varlistentry>
          <term><emphasis remap='I'>user</emphasis></term>
          <listitem>
<para>(1) Time spent in user mode.</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>nice</emphasis></term>
          <listitem>
<para>(2) Time spent in user mode with low priority (nice).</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>system</emphasis></term>
          <listitem>
<para>(3) Time spent in system mode.</para>
          </listitem>
          </varlistentry>
          <varlistentry>
          <term><emphasis remap='I'>idle</emphasis></term>
          <listitem>
<para>(4) Time spent in the idle task.</para>
          </listitem>
          </varlistentry>
        </variablelist>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>page 5741 1808</emphasis></term>
      <listitem>
<para>The number of pages the system paged in and the number that were paged
out (from disk).</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>swap 1 0</emphasis></term>
      <listitem>
<para>The number of swap pages that have been brought in and out.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>intr 1462898</emphasis></term>
      <listitem>
<para>This number of interrupts serviced.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>ctxt 115315</emphasis></term>
      <listitem>
<para>The number of context switches that the system underwent.</para>
      </listitem>
      </varlistentry>
      <varlistentry>
      <term><emphasis remap='I'>btime 769041601</emphasis></term>
      <listitem>
<para>boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).</para>
      </listitem>
      </varlistentry>
    </variablelist>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/swaps</filename></term>
  <listitem>
<para>Swap areas in use.
See also
<citerefentry><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/sys</filename></term>
  <listitem>
<para>This directory contains a number of files
and subdirectories corresponding to kernel variables.
These variables can be read using
the <filename>/proc</filename> filesystem, and the (deprecated)
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
system call.</para>

<para>String values may be terminated by either &apos;'&bsol;0&apos;' or &apos;'&bsol;n&apos;'.</para>

<para>Integer and long values may be written either in decimal or in
hexadecimal notation (e.g. 0x3FFF).
When writing multiple integer or long values, these may be separated
by any of the following whitespace characters:
&apos;'&nbsp;&apos;', &apos;'&bsol;t&apos;', or &apos;'&bsol;n&apos;'.
Using other separators leads to the error
<emphasis role='strong' remap='B'>EINVAL</emphasis>.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/sysvipc</filename></term>
  <listitem>
<para>Subdirectory containing the pseudo-files
<emphasis remap='I'>msg</emphasis>, <emphasis remap='I'>sem</emphasis> and <emphasis remap='I'>shm</emphasis>.
These files list the System V Interprocess Communication (IPC) objects
(respectively: message queues, semaphores, and shared memory)
that currently exist on the system,
providing similar information to that available via
<citerefentry><refentrytitle>ipcs</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
These files have headers and are formatted (one IPC object per line)
for easy understanding.
<citerefentry><refentrytitle>svipc</refentrytitle><manvolnum>7</manvolnum></citerefentry>
provides further background on the information shown by these files.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/uptime</filename></term>
  <listitem>
<para>This file contains two numbers (values in seconds): the uptime of the
system (including time spent in suspend) and the amount of time spent
in the idle process.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><filename>/proc/version</filename></term>
  <listitem>
<para>This string identifies the kernel version that is currently running.
For example:</para>

<!-- in 2n -->
<literallayout remap='EX'>
CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC
</literallayout> <!-- remap='EE' -->
<para>Many files contain strings (e.g., the environment and command line)
that are in the internal format,
with subfields terminated by null bytes (&apos;'&bsol;0&apos;').
When inspecting such files, you may find that the results are more readable
if you use a command of the following form to display them:</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- in +4n -->
<literallayout remap='EX'>
$<emphasis role='strong' remap='B'> cat -A </emphasis><emphasis remap='I'>file</emphasis><emphasis role='strong' remap='P->B'></emphasis>
</literallayout> <!-- remap='EE'
in -->

<para>This manual page is incomplete, possibly inaccurate, and is the kind
of thing that needs to be updated very often.</para>
</refsect2>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para><citerefentry><refentrytitle>cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>find</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>free</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>pstree</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>tr</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>uptime</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>readlink</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>arp</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>netstat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>route</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</refsect1>

<refsect1 id='colophon'><title>COLOPHON</title>
<para>This page is part of version 3 of
<emphasis remap='I'>Cygwin</emphasis>.
A description of the project,
information about reporting bugs,
and the latest documentation,
can be found at
<emphasis remap='I'>&shy;https://cygwin.com/docs.html</emphasis>.</para>
</refsect1>
</refentry>


[-- Attachment #4: proc-xml.5 --]
[-- Type: text/plain, Size: 36860 bytes --]

'\" t
.\"     Title: PROC
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
.\"      Date: 2020-11-11
.\"    Manual: Cygwin User\*(Aqs Manual
.\"    Source: Cygwin
.\"  Language: English
.\"
.TH "PROC" "5" "2020\-11\-11" "Cygwin" "Cygwin User\*(Aqs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
proc \- process information pseudo\-filesystem
.SH "DESCRIPTION"
.PP
The
\fBproc\fR
filesystem is a pseudo\-filesystem which provides an interface to kernel data structures\&. It is commonly mounted at
/proc\&. Typically, it is mounted automatically by the system\&.
.SS "Overview"
.PP
Underneath
/proc, there are the following general groups of files and subdirectories:
.PP
/proc/[pid] subdirectories
.RS 4
Each one of these subdirectories contains files and subdirectories exposing information about the process with the corresponding process ID\&.
.sp
The
/proc/[pid]
subdirectories are visible when iterating through
/proc
with
\fBgetdents\fR(2)
(and thus are visible when one uses
\fBls\fR(1)
to view the contents of
/proc)\&.
.RE
.PP
/proc/self
.RS 4
When a process accesses this magic symbolic link, it resolves to the process\*(Aqs own
/proc/[pid]
directory\&.
.RE
.PP
/proc/[a\-z]*
.RS 4
Various other files and subdirectories under
/proc
expose system\-wide information\&.
.RE
.PP
All of the above are described in more detail below\&.
.SS "Files and directories"
.PP
The following list provides details of many of the files and directories under the
/proc
hierarchy\&.
.PP
/proc/[pid]
.RS 4
There is a numerical subdirectory for each running process; the subdirectory is named by the process ID\&. Each
/proc/[pid]
subdirectory contains the pseudo\-files and directories described below\&.
.sp
The files inside each
/proc/[pid]
directory are normally owned by the effective user and effective group ID of the process\&.
.RE
.PP
/proc/[pid]/cmdline
.RS 4
This read\-only file holds the complete command line for the process, unless the process is a zombie\&. In the latter case, there is nothing in this file: that is, a read on this file will return 0 characters\&. The command\-line arguments appear in this file as a set of strings followed by null bytes (\*(Aq\*(Aq\e0\*(Aq\*(Aq)\&.
.RE
.PP
/proc/[pid]/ctty
.RS 4
This read\-only file holds the name of the console or control terminal device for the process, unless the process is detached from any terminal\&. In the latter case, there is only a newline in this file\&.
.RE
.PP
/proc/[pid]/cwd
.RS 4
This is a symbolic link to the current working directory of the process\&. To find out the current working directory of process 20, for instance, you can do this:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB cd /proc/20/cwd; /bin/pwd\fR
.fi
.if n \{\
.RE
.\}
.sp
Note that the
\fIpwd\fR
command is often a shell built\-in, and might not work properly\&. In
\fBbash\fR(1), you may use
\fBpwd\ \&\-P\fR\&.
.RE
.PP
/proc/[pid]/environ
.RS 4
This read\-only file contains the initial environment that was set when the currently executing program was started via
\fBexecve\fR(2)\&. The entries are separated by null bytes (\*(Aq\*(Aq\e0\*(Aq\*(Aq), and there may be a null byte at the end\&. Thus, to print out the environment of process 1, you would do:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB cat \-A /proc/1/environ\fR
.fi
.if n \{\
.RE
.\}
.sp
If, after an
\fBexecve\fR(2), the process modifies its environment (e\&.g\&., by calling functions such as
\fBputenv\fR(3)
or modifying the
\fBenviron\fR(7)
variable directly), this file will
\fInot\fR
reflect those changes\&.
.RE
.PP
/proc/[pid]/exe
.RS 4
This file is a symbolic link containing the actual pathname of the executed command\&. This symbolic link can be dereferenced normally; attempting to open it will open the executable\&. You can even type
/proc/[pid]/exe
to run another copy of the same executable that is being run by process [pid]\&.
/proc/[pid]/exe
is a pointer to the binary which was executed, and appears as a symbolic link\&.
.RE
.PP
/proc/[pid]/exename
.RS 4
This read\-only file contains the actual pathname of the executed command\&.
.RE
.PP
/proc/[pid]/fd/
.RS 4
This is a subdirectory containing one entry for each file which the process has open, named by its file descriptor, and which is a symbolic link to the actual file\&. Thus, 0 is standard input, 1 standard output, 2 standard error, and so on\&.
.sp
For file descriptors for pipes and sockets, the entries will be symbolic links whose content is the file type with the inode\&. A
\fBreadlink\fR(2)
call on this file returns a string in the format:
.sp
type:[inode]
.sp
For example,
\fIsocket:[2248868]\fR
will be a socket and its inode is 2248868\&.
.sp
Programs that take a filename as a command\-line argument, but don\*(Aqt take input from standard input if no argument is supplied, and programs that write to a file named as a command\-line argument, but don\*(Aqt send their output to standard output if no argument is supplied, can nevertheless be made to use standard input or standard output by using
/proc/[pid]/fd
files as command\-line arguments\&. For example, assuming that
\fB\-i\fR
is the flag designating an input file and
\fB\-o\fR
is the flag designating an output file:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB foobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 \&.\&.\&.\fR
.fi
.if n \{\
.RE
.\}
.sp
and you have a working filter\&.
.sp
/proc/self/fd/N
is approximately the same as
/dev/fd/N
in some UNIX and UNIX\-like systems\&. Most Linux MAKEDEV scripts symbolically link
/dev/fd
to
/proc/self/fd, in fact\&.
.sp
Most systems provide symbolic links
/dev/stdin,
/dev/stdout, and
/dev/stderr, which respectively link to the files
0,
1, and
2
in
/proc/self/fd\&. Thus the example command above could be written as:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB foobar \-i /dev/stdin \-o /dev/stdout \&.\&.\&.\fR
.fi
.if n \{\
.RE
.\}
.sp
Note that for file descriptors referring to inodes (pipes and sockets, see above), those inodes still have permission bits and ownership information distinct from those of the
/proc/[pid]/fd
entry, and that the owner may differ from the user and group IDs of the process\&. An unprivileged process may lack permissions to open them, as in this example:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB echo test | sudo \-u nobody cat\fR
test
$\fB echo test | sudo \-u nobody cat /proc/self/fd/0\fR
cat: /proc/self/fd/0: Permission denied
.fi
.if n \{\
.RE
.\}
.sp
File descriptor 0 refers to the pipe created by the shell and owned by that shell\*(Aqs user, which is not
\fInobody\fR, so
\fBcat\fR
does not have permission to create a new file descriptor to read from that inode, even though it can still read from its existing file descriptor 0\&.
.RE
.PP
/proc/[pid]/gid
.RS 4
This read\-only file contains the primary group id for the process\&.
.RE
.PP
/proc/[pid]/maps
.RS 4
A file containing the currently mapped memory regions and their access permissions\&. See
\fBmmap\fR(2)
for some further information about memory mappings\&.
.sp
The format of the file is:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIaddress          perms offset   dev       inode               pathname\fR
00010000\-00020000 rw\-s 00000000 0000:0000 0                   [win heap 1 default shared]
\&.\&.\&.
00080000\-00082000 rw\-p 00000000 0000:0000 0                   [win heap 0 default grow]
00082000\-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
000A0000\-000A1000 rw\-p 00000000 0000:0000 0                   [win heap 2 grow]
000A1000\-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
000C0000\-000D9000 rw\-p 00000000 0000:0000 0                   [win heap 0 default grow]
000D9000\-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
00200000\-00377000 ===p 00000000 0000:0000 0                   
00377000\-00378000 rw\-p 00177000 0000:0000 0                   [peb]
00378000\-0037A000 rw\-p 00178000 0000:0000 0                   [teb (tid 8844)]
\&.\&.\&.
00400000\-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
005F9000\-005FC000 rw\-g 001F9000 0000:0000 0                   [stack (tid 8884)]
005FC000\-00600000 rw\-p 001FC000 0000:0000 0                   [stack (tid 8884)]
00600000\-006C7000 r\-\-s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale\&.nls
\&.\&.\&.
100400000\-100401000 r\-\-p 00000000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
100401000\-100413000 r\-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
100413000\-100414000 rw\-p 00013000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
\&.\&.\&.
180010000\-180020000 rw\-s 00000000 0000:0000 0                 [procinfo]
180020000\-180029000 rw\-s 00000000 0000:0000 0                 [cygwin\-user\-shared]
180030000\-18003C000 rw\-s 00000000 0000:0000 0                 [cygwin\-shared]
180040000\-180041000 r\-\-p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
180041000\-18022D000 r\-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
18022D000\-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
180231000\-18026A000 rw\-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
\&.\&.\&.
800000000\-800090000 rw\-p 00000000 0000:0000 0                 [heap]
800090000\-820000000 ===p 00090000 0000:0000 0                 [heap]
7FF4FDEB0000\-7FF4FDEB5000 r\-\-s 00000000 0000:0000 0           
7FF4FDEB5000\-7FF4FDFB0000 ===s 00005000 0000:0000 0           
7FF4FDFB0000\-7FF5FDFD0000 ===p 00000000 0000:0000 0           
\&.\&.\&.
7FFBEEAC0000\-7FFBEEAC1000 r\-\-p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEAC1000\-7FFBEEB36000 r\-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB36000\-7FFBEEB68000 r\-\-p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB68000\-7FFBEEB6A000 rw\-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB6A000\-7FFBEEB72000 r\-\-p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
\&.\&.\&.
.fi
.if n \{\
.RE
.\}
.sp
The
\fIaddress\fR
field is the address space in the process that the mapping occupies\&. The
\fIperms\fR
field is a set of permissions:
.sp
.if n \{\
.RS 4
.\}
.nf
r: read
w: write
x: execute
===: reserved
s: shared
g: guard
p: private
.fi
.if n \{\
.RE
.\}
.sp
The
\fIoffset\fR
field is the offset into the file/whatever;
\fIdev\fR
is the device (major:minor);
\fIinode\fR
is the inode on that device\&. 0 indicates that no inode is associated with the memory region, as would be the case with BSS (uninitialized data)\&.
.sp
The
\fIpathname\fR
field will usually be the file that is backing the mapping\&.
.sp
There are additional helpful pseudo\-paths:
.PP
[\fIcygwin\-shared\fR]
.RS 4
Global shared Cygwin process information\&.
.RE
.PP
[\fIcygwin\-user\-shared\fR]
.RS 4
Global shared Cygwin user information\&.
.RE
.PP
[\fIpeb\fR]
.RS 4
Windows Process Environment Block\&.
.RE
.PP
[\fIprocinfo\fR]
.RS 4
Cygwin process information\&.
.RE
.PP
[\fIshared\-user\-data\fR]
.RS 4
Shared user information\&.
.RE
.PP
[\fIheap\fR]
.RS 4
The process\*(Aqs heap\&.
.RE
.PP
[\fIstack\fR]
.RS 4
The initial process\*(Aqs (also known as the main thread\*(Aqs) stack\&.
.RE
.PP
[\fIstack\fR (tid \fI<tid>\fR)]
.RS 4
A thread\*(Aqs stack (where the
\fI<tid>\fR
is a thread id)\&.
.RE
.PP
[\fIteb\fR (tid \fI<tid>\fR)]
.RS 4
Windows Thread Environment Block (where
\fI<tid>\fR
is a thread id)\&.
.RE
.PP
[\fIwin heap <n> default shared exec grow noserial debug\fR]
.RS 4
Windows extended heap (where
\fI<n>\fR
is a heap id)
and the rest of the words are heap flags:
.PP
\fIdefault\fR
.RS 4
default heap flags
.RE
.PP
\fIshared\fR
.RS 4
shareable and mapped heap flags
.RE
.PP
\fIexec\fR
.RS 4
executable heap flag
.RE
.PP
\fIgrow\fR
.RS 4
growable heap flag
.RE
.PP
\fInoserial\fR
.RS 4
do not serialize heap flag
.RE
.PP
\fIdebug\fR
.RS 4
debugged heap flag
.RE
.sp
.RE
.sp
If the
\fIpathname\fR
field is blank, this is an anonymous mapping as obtained via
\fBmmap\fR(2)\&. There is no easy way to coordinate this back to a process\*(Aqs source, short of running it through
\fBgdb\fR(1),
\fBstrace\fR(1), or similar\&.
.sp
\fIpathname\fR
is shown unescaped except for newline characters, which are replaced with an octal escape sequence\&. As a result, it is not possible to determine whether the original pathname contained a newline character or the literal
\fI\ee012\fR
character sequence\&.
.sp
If the mapping is file\-backed and the file has been deleted, the string " (deleted)" is appended to the pathname\&. Note that this is ambiguous too\&.
.RE
.PP
/proc/[pid]/mountinfo
.RS 4
This file contains information about mount points in the process\*(Aqs mount namespace (see
\fBmount_namespaces\fR(7))\&. It supplies various information (e\&.g\&., propagation state, root of mount for bind mounts, identifier for each mount and its parent) that is missing from the (older)
/proc/[pid]/mounts
file, and fixes various other problems with that file (e\&.g\&., nonextensibility, failure to distinguish per\-mount versus per\-superblock options)\&.
.sp
The file contains lines of the form:
.sp
.if n \{\
.RS 4
.\}
.nf
36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
.fi
.if n \{\
.RE
.\}
.sp
The numbers in parentheses are labels for the descriptions below:
.PP
(1)
.RS 4
mount ID: a unique ID for the mount (may be reused after
\fBumount\fR(2))\&.
.RE
.PP
(2)
.RS 4
parent ID: the ID of the parent mount (or of self for the root of this mount namespace\*(Aqs mount tree)\&.
.sp
If a new mount is stacked on top of a previous existing mount (so that it hides the existing mount) at pathname P, then the parent of the new mount is the previous mount at that location\&. Thus, when looking at all the mounts stacked at a particular location, the top\-most mount is the one that is not the parent of any other mount at the same location\&. (Note, however, that this top\-most mount will be accessible only if the longest path subprefix of P that is a mount point is not itself hidden by a stacked mount\&.)
.sp
If the parent mount point lies outside the process\*(Aqs root directory (see
\fBchroot\fR(2)), the ID shown here won\*(Aqt have a corresponding record in
\fImountinfo\fR
whose mount ID (field 1) matches this parent mount ID (because mount points that lie outside the process\*(Aqs root directory are not shown in
\fImountinfo\fR)\&. As a special case of this point, the process\*(Aqs root mount point may have a parent mount (for the initramfs filesystem) that lies
outside the process\*(Aqs root directory, and an entry for that mount point will not appear in
\fImountinfo\fR\&.
.RE
.PP
(3)
.RS 4
major:minor: the value of
\fIst_dev\fR
for files on this filesystem (see
\fBstat\fR(2))\&.
.RE
.PP
(4)
.RS 4
root: the pathname of the directory in the filesystem which forms the root of this mount\&.
.RE
.PP
(5)
.RS 4
mount point: the pathname of the mount point relative to the process\*(Aqs root directory\&.
.RE
.PP
(6)
.RS 4
mount options: per\-mount options (see
\fBmount\fR(2))\&.
.RE
.PP
(7)
.RS 4
optional fields: zero or more fields of the form "tag[:value]"; see below\&.
.RE
.PP
(8)
.RS 4
separator: the end of the optional fields is marked by a single hyphen\&.
.RE
.PP
(9)
.RS 4
filesystem type: the filesystem type in the form "type[\&.subtype]"\&.
.RE
.PP
(10)
.RS 4
mount source: filesystem\-specific information or "none"\&.
.RE
.PP
(11)
.RS 4
super options: per\-superblock options (see
\fBmount\fR(2))\&.
.RE
.RE
.PP
/proc/[pid]/mounts
.RS 4
This file lists all the filesystems currently mounted in the process\*(Aqs mount namespace (see
\fBmount_namespaces\fR(7))\&. The format of this file is documented in
\fBfstab\fR(5)\&.
.RE
.PP
/proc/[pid]/pgid
.RS 4
This read\-only file contains the process group id for the process\&.
.RE
.PP
/proc/[pid]/ppid
.RS 4
This read\-only file contains the parent process id for the process\&.
.RE
.PP
/proc/[pid]/root
.RS 4
UNIX and Linux support the idea of a per\-process root of the filesystem, set by the
\fBchroot\fR(2)
system call\&. This file is a symbolic link that points to the process\*(Aqs root directory, and behaves in the same way as
\fIexe\fR, and
\fIfd/*\fR\&.
.RE
.PP
/proc/[pid]/sid
.RS 4
This read\-only file contains the session id for the process\&.
.RE
.PP
/proc/[pid]/stat
.RS 4
Status information about the process\&. This is used by
\fBps\fR(1)\&.
.sp
The fields, in order, with their proper
\fBscanf\fR(3)
format specifiers, are listed below\&.
.PP
(1) \fIpid\fR %d
.RS 4
The process ID\&.
.RE
.PP
(2) \fIcomm\fR %s
.RS 4
The filename of the executable, in parentheses\&. This is visible whether or not the executable is swapped out\&.
.RE
.PP
(3) \fIstate\fR %c
.RS 4
One of the following characters, indicating process state:
.PP
R
.RS 4
Runnable
.RE
.PP
O
.RS 4
Running
.RE
.PP
S
.RS 4
Sleeping in an interruptible wait
.RE
.PP
D
.RS 4
Waiting in uninterruptible disk sleep
.RE
.PP
Z
.RS 4
Zombie
.RE
.PP
T
.RS 4
Stopped (on a signal) or trace stopped
.RE
.RE
.PP
(4) \fIppid\fR %d
.RS 4
The PID of the parent of this process\&.
.RE
.PP
(5) \fIpgrp\fR %d
.RS 4
The process group ID of the process\&.
.RE
.PP
(6) \fIsession\fR %d
.RS 4
The session ID of the process\&.
.RE
.PP
(7) \fItty_nr\fR %d
.RS 4
The controlling terminal of the process\&. (The minor device number is contained in the combination of bits 31 to 20 and 7 to 0; the major device number is in bits 15 to 8\&.)
.RE
.PP
(8) \fItpgid\fR %d
.RS 4
The ID of the foreground process group of the controlling terminal of the process\&.
.RE
.PP
(9) \fIflags\fR %u
.RS 4
The kernel flags word of the process\&.
.RE
.PP
(10) \fIminflt\fR %lu
.RS 4
The number of minor faults the process has made which have not required loading a memory page from disk\&.
.RE
.PP
(11) \fIcminflt\fR %lu
.RS 4
The number of minor faults that the process\*(Aqs waited\-for children have made\&.
.RE
.PP
(12) \fImajflt\fR %lu
.RS 4
The number of major faults the process has made which have required loading a memory page from disk\&.
.RE
.PP
(13) \fIcmajflt\fR %lu
.RS 4
The number of major faults that the process\*(Aqs waited\-for children have made\&.
.RE
.PP
(14) \fIutime\fR %lu
.RS 4
Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by
\fIsysconf(_SC_CLK_TCK)\fR)\&. This includes guest time,
\fIguest_time\fR
(time spent running a virtual CPU, see below), so that applications that are not aware of the guest time field do not lose that time from their calculations\&.
.RE
.PP
(15) \fIstime\fR %lu
.RS 4
Amount of time that this process has been scheduled in kernel mode, measured in clock ticks (divide by
\fIsysconf(_SC_CLK_TCK)\fR)\&.
.RE
.PP
(16) \fIcutime\fR %ld
.RS 4
Amount of time that this process\*(Aqs waited\-for children have been scheduled in user mode, measured in clock ticks (divide by
\fIsysconf(_SC_CLK_TCK)\fR)\&. (See also
\fBtimes\fR(2)\&.) This includes guest time,
\fIcguest_time\fR
(time spent running a virtual CPU, see below)\&.
.RE
.PP
(17) \fIcstime\fR %ld
.RS 4
Amount of time that this process\*(Aqs waited\-for children have been scheduled in kernel mode, measured in clock ticks (divide by
\fIsysconf(_SC_CLK_TCK)\fR)\&.
.RE
.PP
(18) \fIpriority\fR %ld
.RS 4
For processes running a real\-time scheduling policy (\fIpolicy\fR
below; see
\fBsched_setscheduler\fR(2)), this is the negated scheduling priority, minus one; that is, a number in the range \-2 to \-100, corresponding to real\-time priorities 1 to 99\&. For processes running under a non\-real\-time scheduling policy, this is the raw nice value (\fBsetpriority\fR(2)) as represented in the kernel\&. The kernel stores nice values as numbers in the range 0 (high) to 39 (low), corresponding to the user\-visible nice range of \-20 to 19\&.
.RE
.PP
(19) \fInice\fR %ld
.RS 4
The nice value (see
\fBsetpriority\fR(2)), a value in the range 19 (low priority) to \-20 (high priority)\&.
.RE
.PP
(20) \fInum_threads\fR %ld
.RS 4
Number of threads in this process\&.
.RE
.PP
(21) \fIitrealvalue\fR %ld
.RS 4
The time in jiffies before the next
\fBSIGALRM\fR
is sent to the process due to an interval timer\&. This field is no longer maintained, and is hard coded as 0\&.
.RE
.PP
(22) \fIstarttime\fR %llu
.RS 4
The time the process started after system boot\&. The value is expressed in clock ticks (divide by
\fIsysconf(_SC_CLK_TCK)\fR)\&.
.RE
.PP
(23) \fIvsize\fR %lu
.RS 4
Virtual memory size in bytes\&.
.RE
.PP
(24) \fIrss\fR %ld
.RS 4
Resident Set Size: number of pages the process has in real memory\&. This is just the pages which count toward text, data, or stack space\&. This does not include pages which have not been demand\-loaded in, or which are swapped out\&.
.RE
.PP
(25) \fIrsslim\fR %lu
.RS 4
Current soft limit in bytes on the rss of the process; see the description of
\fBRLIMIT_RSS\fR
in
\fBgetrlimit\fR(2)\&.
.RE
.RE
.PP
/proc/[pid]/statm
.RS 4
Provides information about memory usage, measured in pages\&. The columns are:
.sp
.if n \{\
.RS 4
.\}
.nf
size       (1) total program size
           (same as VmSize in /proc/[pid]/status)
resident   (2) resident set size
           (same as VmRSS in /proc/[pid]/status)
shared     (3) number of resident shared pages (i\&.e\&., backed by a file)
           (same as RssFile+RssShmem in /proc/[pid]/status)
text       (4) text (code)
lib        (5) library
data       (6) data + stack
dt         (7) dirty pages (always 0)
.fi
.if n \{\
.RE
.\}
.sp
/proc/[pid]/status
Provides much of the information in
/proc/[pid]/stat
and
/proc/[pid]/statm
in a format that\*(Aqs easier for humans to parse\&. Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB cat /proc/$$/status\fR
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   17248
Pid:    17248
PPid:   17200
Uid:    1000    1000    1000    1000
Gid:    100     100     100     100
VmSize:	  131168 kB
VmLck:	       0 kB
VmRSS:	   13484 kB
VmData:	   10332 kB
VmStk:	     136 kB
VmExe:	     992 kB
VmLib:	    2104 kB
SigPnd: 0000000000000000
SigBlk: 0000000000010000
SigIgn: 0000000000384004
.fi
.if n \{\
.RE
.\}
.sp
The fields are as follows:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIName\fR: Command run by this process\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIUmask\fR: Process umask, expressed in octal with a leading zero; see
\fBumask\fR(2)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIState\fR: Current state of the process\&. One of "R (runnable)", "O (running)", "S (sleeping)", "D (disk sleep)", "T (stopped)", "T (tracing stop)", or "Z (zombie)"\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fITgid\fR: Thread group ID (i\&.e\&., Process ID)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIPid\fR: Thread ID (see
\fBgettid\fR(2))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIPPid\fR: PID of parent process\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIUid\fR,
\fIGid\fR: Real, effective, saved set, and filesystem UIDs (GIDs)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIVmSize\fR: Virtual memory size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIVmLck\fR: Locked memory size (see
\fBmlock\fR(2))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIVmRSS\fR: Resident set size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIVmData\fR,
\fIVmStk\fR,
\fIVmExe\fR: Size of data, stack, and text segments\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIVmLib\fR: Shared library code size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fISigPnd\fR: Number of signals pending for process as a whole (see
\fBpthreads\fR(7)
and
\fBsignal\fR(7))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fISigBlk\fR,
\fISigIgn\fR: Masks indicating signals being blocked and ignored (see
\fBsignal\fR(7))\&.
.RE
.RE
.PP
/proc/[pid]/uid
.RS 4
This read\-only file contains the user id for the process\&.
.RE
.PP
/proc/[pid]/winexename
.RS 4
This read\-only file contains the Windows pathname of the executed command\&.
.RE
.PP
/proc/[pid]/winpid
.RS 4
This read\-only file contains the Windows process id for the process\&.
.RE
.PP
/proc/cpuinfo
.RS 4
This is a collection of CPU and system architecture dependent items, for each supported architecture a different list\&. Two common entries are
\fIprocessor\fR
which gives CPU number and
\fIbogomips\fR; a system constant that is calculated during kernel initialization\&. SMP machines have information for each CPU\&. The
\fBlscpu\fR(1)
command gathers its information from this file\&.
.RE
.PP
/proc/cygdrive
.RS 4
This file is a symbolic link that points to the user\*(Aqs Windows mapped drive mount point, and behaves in the same way as
\fIroot\fR\&.
.RE
.PP
/proc/devices
.RS 4
Text listing of major numbers and device groups\&. This can be used by MAKEDEV scripts for consistency with the kernel\&.
.RE
.PP
/proc/filesystems
.RS 4
A text listing of the filesystems which are supported by the kernel, namely filesystems which were compiled into the kernel or whose kernel modules are currently loaded\&. (See also
\fBfilesystems\fR(5)\&.) If a filesystem is marked with "nodev", this means that it does not require a block device to be mounted (e\&.g\&., virtual filesystem, network filesystem)\&.
.sp
Incidentally, this file may be used by
\fBmount\fR(8)
when no filesystem is specified and it didn\*(Aqt manage to determine the filesystem type\&. Then filesystems contained in this file are tried (excepted those that are marked with "nodev")\&.
.RE
.PP
/proc/loadavg
.RS 4
The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes\&. They are the same as the load average numbers given by
\fBuptime\fR(1)
and other programs\&. The fourth field consists of two numbers separated by a slash (/)\&. The first of these is the number of currently runnable kernel scheduling entities (processes, threads)\&. The value after the slash is the number of kernel scheduling entities that currently exist on the system\&.
.RE
.PP
/proc/meminfo
.RS 4
This file reports statistics about memory usage on the system\&. It is used by
\fBfree\fR(1)
to report the amount of free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel\&. Each line of the file consists of a parameter name, followed by a colon, the value of the parameter, and an option unit of measurement (e\&.g\&., "kB")\&. The list below describes the parameter names and the format specifier required to read the field value\&. Some fields are displayed only if the kernel was configured with various options; those dependencies are noted in the list\&.
.PP
\fIMemTotal\fR %lu
.RS 4
Total usable RAM (i\&.e\&., physical RAM minus a few reserved bits and the kernel binary code)\&.
.RE
.PP
\fIMemFree\fR %lu
.RS 4
The sum of
\fILowFree\fR+\fIHighFree\fR\&.
.RE
.PP
\fIHighTotal\fR %lu
.RS 4
Total amount of highmem\&.
.RE
.PP
\fIHighFree\fR %lu
.RS 4
Amount of free highmem\&.
.RE
.PP
\fILowTotal\fR %lu
.RS 4
Total amount of lowmem\&. Lowmem is memory which can be used for everything that highmem can be used for, but it is also available for the kernel\*(Aqs use for its own data structures\&. Bad things happen when you\*(Aqre out of lowmem\&.
.RE
.PP
\fILowFree\fR %lu
.RS 4
Amount of free lowmem\&.
.RE
.PP
\fISwapTotal\fR %lu
.RS 4
Total amount of swap space available\&.
.RE
.PP
\fISwapFree\fR %lu
.RS 4
Amount of swap space that is currently unused\&.
.RE
.RE
.PP
/proc/misc
.RS 4
Text listing of minor device numbers and names of devices with major device number of the misc device group\&. This can be used by MAKEDEV scripts for consistency with the kernel\&.
.RE
.PP
/proc/mounts
.RS 4
With the introduction of per\-process mount namespaces, this file became a link to
/proc/self/mounts, which lists the mount points of the process\*(Aqs own mount namespace\&. The format of this file is documented in
\fBfstab\fR(5)\&.
.RE
.PP
/proc/net
.RS 4
This directory contains various files and subdirectories containing information about the networking layer\&. The files contain ASCII structures and are, therefore, readable with
\fBcat\fR(1)\&. However, the standard
\fBnetstat\fR(8)
suite provides much cleaner access to these files\&.
.RE
.PP
/proc/net/if_inet6
.RS 4
This file contains information about IP V6 interface adapters, if used\&. Each line represents an IP V6 interface adapter\&.
.sp
.if n \{\
.RS 4
.\}
.nf
fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5\-A3AC\-4DB0\-A308\-8EE94E1406A4}
fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972\-0918\-41FC\-851B\-090C446C7D1C}
fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD\-DFAC\-4398\-AA85\-FB33E17E38EA}
fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53\-1659\-4065\-BDA5\-F41162250E03}
20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
00000000000000000000000000000001 01 80 10 80 {2B5345AC\-7502\-11EA\-AC73\-806E6F6E6963}
                           (1)  (2)(3)(4)(5)  (6)
.fi
.if n \{\
.RE
.\}
.sp
The fields in each line are:
.PP
(1)
.RS 4
The IP V6 address of the interface adapter\&.
.RE
.PP
(2)
.RS 4
The IP V6 interface adapter index\&.
.RE
.PP
(3)
.RS 4
The prefix length of the IP V6 interface address\&.
.RE
.PP
(4)
.RS 4
The scope of the IP V6 interface address\&.
.RE
.PP
(5)
.RS 4
The state of the IP V6 interface address\&.
.RE
.PP
(6)
.RS 4
The DUID/GUID/UUID of the IP V6 interface adapter\&.
.RE
.sp
The last number exists only for compatibility reasons and is always 1\&.
.RE
.PP
/proc/partitions
.RS 4
Contains the major and minor numbers of each partition as well as the number of 1024\-byte blocks and the partition name\&.
.RE
.PP
/proc/registry
.RS 4
Under Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for the current process\&.
.RE
.PP
/proc/registry32
.RS 4
Under 64 bit Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for 32 bit processes\&.
.RE
.PP
/proc/registry64
.RS 4
Under 64 bit Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for 64 bit processes\&.
.RE
.PP
/proc/self
.RS 4
This directory refers to the process accessing the
/proc
filesystem, and is identical to the
/proc
directory named by the process ID of the same process\&.
.RE
.PP
/proc/stat
.RS 4
kernel/system statistics\&. Varies with architecture\&. Common entries include:
.PP
\fIcpu 10132153 0 3084719 46828483\fR, \fIcpu0 1393280 0 572056 13343292\fR
.RS 4
The amount of time, measured in units of USER_HZ (1/100ths of a second on most architectures, use
\fIsysconf(_SC_CLK_TCK)\fR
to obtain the right value), that the system ("cpu" line) or the specific CPU ("cpu\fIN\fR" line) spent in various states:
.PP
\fIuser\fR
.RS 4
(1) Time spent in user mode\&.
.RE
.PP
\fInice\fR
.RS 4
(2) Time spent in user mode with low priority (nice)\&.
.RE
.PP
\fIsystem\fR
.RS 4
(3) Time spent in system mode\&.
.RE
.PP
\fIidle\fR
.RS 4
(4) Time spent in the idle task\&.
.RE
.RE
.PP
\fIpage 5741 1808\fR
.RS 4
The number of pages the system paged in and the number that were paged out (from disk)\&.
.RE
.PP
\fIswap 1 0\fR
.RS 4
The number of swap pages that have been brought in and out\&.
.RE
.PP
\fIintr 1462898\fR
.RS 4
This number of interrupts serviced\&.
.RE
.PP
\fIctxt 115315\fR
.RS 4
The number of context switches that the system underwent\&.
.RE
.PP
\fIbtime 769041601\fR
.RS 4
boot time, in seconds since the Epoch, 1970\-01\-01 00:00:00 +0000 (UTC)\&.
.RE
.RE
.PP
/proc/swaps
.RS 4
Swap areas in use\&. See also
\fBswapon\fR(8)\&.
.RE
.PP
/proc/sys
.RS 4
This directory contains a number of files and subdirectories corresponding to kernel variables\&. These variables can be read using the
/proc
filesystem, and the (deprecated)
\fBsysctl\fR(2)
system call\&.
.sp
String values may be terminated by either \*(Aq\*(Aq\e0\*(Aq\*(Aq or \*(Aq\*(Aq\en\*(Aq\*(Aq\&.
.sp
Integer and long values may be written either in decimal or in hexadecimal notation (e\&.g\&. 0x3FFF)\&. When writing multiple integer or long values, these may be separated by any of the following whitespace characters: \*(Aq\*(Aq\ \&\*(Aq\*(Aq, \*(Aq\*(Aq\et\*(Aq\*(Aq, or \*(Aq\*(Aq\en\*(Aq\*(Aq\&. Using other separators leads to the error
\fBEINVAL\fR\&.
.RE
.PP
/proc/sysvipc
.RS 4
Subdirectory containing the pseudo\-files
\fImsg\fR,
\fIsem\fR
and
\fIshm\fR\&. These files list the System V Interprocess Communication (IPC) objects (respectively: message queues, semaphores, and shared memory) that currently exist on the system, providing similar information to that available via
\fBipcs\fR(1)\&. These files have headers and are formatted (one IPC object per line) for easy understanding\&.
\fBsvipc\fR(7)
provides further background on the information shown by these files\&.
.RE
.PP
/proc/uptime
.RS 4
This file contains two numbers (values in seconds): the uptime of the system (including time spent in suspend) and the amount of time spent in the idle process\&.
.RE
.PP
/proc/version
.RS 4
This string identifies the kernel version that is currently running\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf
CYGWIN_NT\-10\&.0\-18363 version 3\&.1\&.7\-340\&.x86_64 (corinna@calimero) (gcc version 9\&.3\&.0 20200312 (Fedora Cygwin 9\&.3\&.0\-1) (GCC) ) 2020\-08\-22 17:48 UTC
.fi
.if n \{\
.RE
.\}
.sp
Many files contain strings (e\&.g\&., the environment and command line) that are in the internal format, with subfields terminated by null bytes (\*(Aq\*(Aq\e0\*(Aq\*(Aq)\&. When inspecting such files, you may find that the results are more readable if you use a command of the following form to display them:
.RE
.sp
.if n \{\
.RS 4
.\}
.nf
$\fB cat \-A \fR\fIfile\fR
.fi
.if n \{\
.RE
.\}
.PP
This manual page is incomplete, possibly inaccurate, and is the kind of thing that needs to be updated very often\&.
.SH "SEE ALSO"
.PP
\fBcat\fR(1),
\fBfind\fR(1),
\fBfree\fR(1),
\fBps\fR(1),
\fBpstree\fR(1),
\fBtr\fR(1),
\fBuptime\fR(1),
\fBchroot\fR(2),
\fBmmap\fR(2),
\fBreadlink\fR(2),
\fBsyslog\fR(2),
\fBhier\fR(7),
\fBarp\fR(8),
\fBmount\fR(8),
\fBnetstat\fR(8),
\fBroute\fR(8)\&.
.SH "COLOPHON"
.PP
This page is part of version 3 of
\fICygwin\fR\&. A description of the project, information about reporting bugs, and the latest documentation, can be found at
\fI\%https://cygwin\&.com/docs\&.html\fR\&.

[-- Attachment #5: proc-5-man.txt --]
[-- Type: text/plain, Size: 40547 bytes --]

PROC(5)                      Cygwin User's Manual                      PROC(5)

NAME
       proc - process information pseudo-filesystem

DESCRIPTION
       The  proc filesystem is a pseudo-filesystem which provides an interface
       to kernel data structures.  It is commonly  mounted  at  /proc.   Typi‐
       cally, it is mounted automatically by the system.

   Overview
       Underneath  /proc,  there are the following general groups of files and
       subdirectories:

       /proc/[pid] subdirectories
              Each one of these subdirectories contains files and  subdirecto‐
              ries exposing information about the process with the correspond‐
              ing process ID.

              The  /proc/[pid]  subdirectories  are  visible  when   iterating
              through  /proc  with  getdents(2) (and thus are visible when one
              uses ls(1) to view the contents of /proc).

       /proc/self
              When a process accesses this magic symbolic link, it resolves to
              the process's own /proc/[pid] directory.

       /proc/[a-z]*
              Various  other  files and subdirectories under /proc expose sys‐
              tem-wide information.

       All of the above are described in more detail below.

   Files and directories
       The following list provides details of many of the files  and  directo‐
       ries under the /proc hierarchy.

       /proc/[pid]
              There  is a numerical subdirectory for each running process; the
              subdirectory is named by the process ID.  Each /proc/[pid]  sub‐
              directory  contains  the  pseudo-files and directories described
              below.

              The files inside each /proc/[pid] directory are  normally  owned
              by the effective user and effective group ID of the process.

       /proc/[pid]/cmdline
              This  read-only  file  holds  the  complete command line for the
              process, unless the process is a zombie.  In  the  latter  case,
              there is nothing in this file: that is, a read on this file will
              return 0 characters.  The command-line arguments appear in  this
              file as a set of strings followed by null bytes ('\0').

       /proc/[pid]/ctty
              This  read-only  file  holds  the name of the console or control
              terminal device for the process, unless the process is  detached
              from  any terminal.  In the latter case, there is only a newline
              in this file.

       /proc/[pid]/cwd
              This is a symbolic link to the current working directory of  the
              process.   To  find out the current working directory of process
              20, for instance, you can do this:

                  $ cd /proc/20/cwd; /bin/pwd

              Note that the pwd command is often a shell built-in,  and  might
              not work properly.  In bash(1), you may use pwd -P.

       /proc/[pid]/environ
              This  read-only  file  contains the initial environment that was
              set when the currently executing program  was  started  via  ex‐
              ecve(2).   The  entries  are separated by null bytes ('\0'), and
              there may be a null byte at the end.  Thus, to print out the en‐
              vironment of process 1, you would do:

                  $ cat -A /proc/1/environ

              If,  after  an  execve(2),  the process modifies its environment
              (e.g., by calling functions such as putenv(3) or  modifying  the
              environ(7)  variable directly), this file will not reflect those
              changes.

       /proc/[pid]/exe
              This file is a symbolic link containing the actual  pathname  of
              the  executed  command.   This symbolic link can be dereferenced
              normally; attempting to open it will open the  executable.   You
              can  even  type  /proc/[pid]/exe to run another copy of the same
              executable that is being run by process [pid].   /proc/[pid]/exe
              is  a pointer to the binary which was executed, and appears as a
              symbolic link.

       /proc/[pid]/exename
              This read-only file contains the actual pathname of the executed
              command.

       /proc/[pid]/fd/
              This  is a subdirectory containing one entry for each file which
              the process has open, named by its file descriptor, and which is
              a  symbolic link to the actual file.  Thus, 0 is standard input,
              1 standard output, 2 standard error, and so on.

              For file descriptors for pipes and sockets, the entries will  be
              symbolic links whose content is the file type with the inode.  A
              readlink(2) call on this file returns a string in the format:

                  type:[inode]

              For example, socket:[2248868] will be a socket and its inode  is
              2248868.

              Programs  that  take  a filename as a command-line argument, but
              don't take input from standard input if no argument is supplied,
              and  programs that write to a file named as a command-line argu‐
              ment, but don't send their output to standard output if no argu‐
              ment is supplied, can nevertheless be made to use standard input
              or standard output by using /proc/[pid]/fd files as command-line
              arguments.   For example, assuming that -i is the flag designat‐
              ing an input file and -o is the flag designating an output file:

                  $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...

              and you have a working filter.

              /proc/self/fd/N is approximately the same as /dev/fd/N  in  some
              UNIX and UNIX-like systems.  Most Linux MAKEDEV scripts symboli‐
              cally link /dev/fd to /proc/self/fd, in fact.

              Most systems provide symbolic links /dev/stdin, /dev/stdout, and
              /dev/stderr, which respectively link to the files 0, 1, and 2 in
              /proc/self/fd.  Thus the example command above could be  written
              as:

                  $ foobar -i /dev/stdin -o /dev/stdout ...

              Note  that  for  file descriptors referring to inodes (pipes and
              sockets, see above), those inodes still have permission bits and
              ownership  information distinct from those of the /proc/[pid]/fd
              entry, and that the owner may differ from the user and group IDs
              of the process.  An unprivileged process may lack permissions to
              open them, as in this example:

                  $ echo test | sudo -u nobody cat
                  test
                  $ echo test | sudo -u nobody cat /proc/self/fd/0
                  cat: /proc/self/fd/0: Permission denied

              File descriptor 0 refers to the pipe created by  the  shell  and
              owned by that shell's user, which is not nobody, so cat does not
              have permission to create a new file  descriptor  to  read  from
              that inode, even though it can still read from its existing file
              descriptor 0.

       /proc/[pid]/gid
              This read-only file  contains  the  primary  group  id  for  the
              process.

       /proc/[pid]/maps
              A  file containing the currently mapped memory regions and their
              access permissions.  See mmap(2) for  some  further  information
              about memory mappings.

              The format of the file is:

address          perms offset   dev       inode               pathname
00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
...
00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
00200000-00377000 ===p 00000000 0000:0000 0
00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
...
00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
...
100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
...
180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
...
800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0
7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0
7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0
...
7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
...

              The  address  field is the address space in the process that the
              mapping occupies.  The perms field is a set of permissions:

                  r: read
                  w: write
                  x: execute
                  ===: reserved
                  s: shared
                  g: guard
                  p: private

              The offset field is the offset into the  file/whatever;  dev  is
              the  device (major:minor); inode is the inode on that device.  0
              indicates that no inode is associated with the memory region, as
              would be the case with BSS (uninitialized data).

              The  pathname field will usually be the file that is backing the
              mapping.

              There are additional helpful pseudo-paths:

                   [cygwin-shared]
                          Global shared Cygwin process information.

                   [cygwin-user-shared]
                          Global shared Cygwin user information.

                   [peb]  Windows Process Environment Block.

                   [procinfo]
                          Cygwin process information.

                   [shared-user-data]
                          Shared user information.

                   [heap] The process's heap.

                   [stack]
                          The  initial  process's  (also  known  as  the  main
                          thread's) stack.

                   [stack (tid <tid>)]
                          A thread's stack (where the <tid> is a thread id).

                   [teb (tid <tid>)]
                          Windows  Thread  Environment Block (where <tid> is a
                          thread id).

                   [win heap <n> default shared exec grow noserial debug]
                          Windows extended heap (where <n> is a heap id)
                          and the rest of the words are heap flags:

                          default   default heap flags

                          shared    shareable and mapped heap flags

                          exec      executable heap flag

                          grow      growable heap flag

                          noserial  do not serialize heap flag

                          debug     debugged heap flag

              If the pathname field is blank, this is an anonymous mapping  as
              obtained  via  mmap(2).  There is no easy way to coordinate this
              back to a process's source, short of running it through  gdb(1),
              strace(1), or similar.

              pathname is shown unescaped except for newline characters, which
              are replaced with an octal escape sequence.  As a result, it  is
              not  possible  to  determine  whether the original pathname con‐
              tained a newline character or the literal  \e012  character  se‐
              quence.

              If the mapping is file-backed and the file has been deleted, the
              string " (deleted)" is appended to the pathname.  Note that this
              is ambiguous too.

       /proc/[pid]/mountinfo
              This  file  contains  information  about  mount  points  in  the
              process's mount namespace (see  mount_namespaces(7)).   It  sup‐
              plies  various  information  (e.g.,  propagation  state, root of
              mount for bind mounts, identifier for each mount and its parent)
              that  is  missing  from the (older) /proc/[pid]/mounts file, and
              fixes various other problems with that file  (e.g.,  nonextensi‐
              bility,  failure  to distinguish per-mount versus per-superblock
              options).

              The file contains lines of the form:

36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)

              The numbers in parentheses are labels for the  descriptions  be‐
              low:

              (1)  mount  ID:  a  unique ID for the mount (may be reused after
                   umount(2)).

              (2)  parent ID: the ID of the parent mount (or of self  for  the
                   root of this mount namespace's mount tree).

                   If  a  new  mount  is stacked on top of a previous existing
                   mount (so that it hides the existing mount) at pathname  P,
                   then  the  parent of the new mount is the previous mount at
                   that location.   Thus,  when  looking  at  all  the  mounts
                   stacked at a particular location, the top-most mount is the
                   one that is not the parent of any other mount at  the  same
                   location.  (Note, however, that this top-most mount will be
                   accessible only if the longest path subprefix of P that  is
                   a mount point is not itself hidden by a stacked mount.)

                   If  the  parent mount point lies outside the process's root
                   directory (see chroot(2)), the ID shown here won't  have  a
                   corresponding  record in mountinfo whose mount ID (field 1)
                   matches this parent mount ID (because mount points that lie
                   outside  the  process's  root  directory  are  not shown in
                   mountinfo).  As a special case of this point, the process's
                   root mount point may have a parent mount (for the initramfs
                   filesystem) that lies outside the process's root directory,
                   and  an  entry  for  that  mount  point  will not appear in
                   mountinfo.

              (3)  major:minor: the value of st_dev for files on this filesys‐
                   tem (see stat(2)).

              (4)  root: the pathname of the directory in the filesystem which
                   forms the root of this mount.

              (5)  mount point: the pathname of the mount  point  relative  to
                   the process's root directory.

              (6)  mount options: per-mount options (see mount(2)).

              (7)  optional   fields:   zero   or  more  fields  of  the  form
                   "tag[:value]"; see below.

              (8)  separator: the end of the optional fields is  marked  by  a
                   single hyphen.

              (9)  filesystem   type:   the   filesystem   type  in  the  form
                   "type[.subtype]".

              (10) mount source: filesystem-specific information or "none".

              (11) super options: per-superblock options (see mount(2)).

       /proc/[pid]/mounts
              This file lists all the filesystems  currently  mounted  in  the
              process's mount namespace (see mount_namespaces(7)).  The format
              of this file is documented in fstab(5).

       /proc/[pid]/pgid
              This read-only file  contains  the  process  group  id  for  the
              process.

       /proc/[pid]/ppid
              This  read-only  file  contains  the  parent  process id for the
              process.

       /proc/[pid]/root
              UNIX and Linux support the idea of a  per-process  root  of  the
              filesystem,  set  by  the chroot(2) system call.  This file is a
              symbolic link that points to the process's root  directory,  and
              behaves in the same way as exe, and fd/*.

       /proc/[pid]/sid
              This read-only file contains the session id for the process.

       /proc/[pid]/stat
              Status information about the process.  This is used by ps(1).

              The  fields,  in order, with their proper scanf(3) format speci‐
              fiers, are listed below.

              (1) pid  %d
                        The process ID.

              (2) comm  %s
                        The filename of the executable, in parentheses.   This
                        is  visible  whether  or not the executable is swapped
                        out.

              (3) state  %c
                        One of the following  characters,  indicating  process
                        state:

                        R  Runnable

                        O  Running

                        S  Sleeping in an interruptible wait

                        D  Waiting in uninterruptible disk sleep

                        Z  Zombie

                        T  Stopped (on a signal) or trace stopped

              (4) ppid  %d
                        The PID of the parent of this process.

              (5) pgrp  %d
                        The process group ID of the process.

              (6) session  %d
                        The session ID of the process.

              (7) tty_nr  %d
                        The  controlling  terminal of the process.  (The minor
                        device number is contained in the combination of  bits
                        31  to  20  and  7 to 0; the major device number is in
                        bits 15 to 8.)

              (8) tpgid  %d
                        The ID of the foreground process group of the control‐
                        ling terminal of the process.

              (9) flags  %u
                        The kernel flags word of the process.

              (10) minflt  %lu
                        The  number of minor faults the process has made which
                        have not required loading a memory page from disk.

              (11) cminflt  %lu
                        The number of minor faults that the process's  waited-
                        for children have made.

              (12) majflt  %lu
                        The  number of major faults the process has made which
                        have required loading a memory page from disk.

              (13) cmajflt  %lu
                        The number of major faults that the process's  waited-
                        for children have made.

              (14) utime  %lu
                        Amount of time that this process has been scheduled in
                        user  mode,  measured  in  clock  ticks   (divide   by
                        sysconf(_SC_CLK_TCK)).    This  includes  guest  time,
                        guest_time (time spent running a virtual CPU, see  be‐
                        low),  so  that applications that are not aware of the
                        guest time field do not lose that time from their cal‐
                        culations.

              (15) stime  %lu
                        Amount of time that this process has been scheduled in
                        kernel  mode,  measured  in  clock  ticks  (divide  by
                        sysconf(_SC_CLK_TCK)).

              (16) cutime  %ld
                        Amount of time that this process's waited-for children
                        have been scheduled in user mode,  measured  in  clock
                        ticks  (divide  by  sysconf(_SC_CLK_TCK)).   (See also
                        times(2).)   This  includes  guest  time,  cguest_time
                        (time spent running a virtual CPU, see below).

              (17) cstime  %ld
                        Amount of time that this process's waited-for children
                        have been scheduled in kernel mode, measured in  clock
                        ticks (divide by sysconf(_SC_CLK_TCK)).

              (18) priority  %ld
                        For  processes  running  a real-time scheduling policy
                        (policy below; see sched_setscheduler(2)), this is the
                        negated  scheduling  priority,  minus  one; that is, a
                        number in the range -2 to -100, corresponding to real-
                        time  priorities 1 to 99.  For processes running under
                        a non-real-time scheduling policy,  this  is  the  raw
                        nice value (setpriority(2)) as represented in the ker‐
                        nel.  The kernel stores nice values as numbers in  the
                        range 0 (high) to 39 (low), corresponding to the user-
                        visible nice range of -20 to 19.

              (19) nice  %ld
                        The nice value (see setpriority(2)), a  value  in  the
                        range 19 (low priority) to -20 (high priority).

              (20) num_threads  %ld
                        Number of threads in this process.

              (21) itrealvalue  %ld
                        The time in jiffies before the next SIGALRM is sent to
                        the process due to an interval timer.  This  field  is
                        no longer maintained, and is hard coded as 0.

              (22) starttime  %llu
                        The  time  the process started after system boot.  The
                        value  is  expressed  in  clock   ticks   (divide   by
                        sysconf(_SC_CLK_TCK)).

              (23) vsize  %lu
                        Virtual memory size in bytes.

              (24) rss  %ld
                        Resident  Set Size: number of pages the process has in
                        real memory.  This is just the pages which  count  to‐
                        ward  text,  data,  or stack space.  This does not in‐
                        clude pages which have not been demand-loaded  in,  or
                        which are swapped out.

              (25) rsslim  %lu
                        Current soft limit in bytes on the rss of the process;
                        see the description of RLIMIT_RSS in getrlimit(2).

       /proc/[pid]/statm
              Provides information about memory usage, measured in pages.  The
              columns are:

                  size       (1) total program size
                             (same as VmSize in /proc/[pid]/status)
                  resident   (2) resident set size
                             (same as VmRSS in /proc/[pid]/status)
                  shared     (3) number of resident shared pages (i.e., backed by a file)
                             (same as RssFile+RssShmem in /proc/[pid]/status)
                  text       (4) text (code)
                  lib        (5) library
                  data       (6) data + stack
                  dt         (7) dirty pages (always 0)

       /proc/[pid]/status
              Provides   much  of  the  information  in  /proc/[pid]/stat  and
              /proc/[pid]/statm in a format that's easier for humans to parse.
              Here's an example:

                  $ cat /proc/$$/status
                  Name:   bash
                  Umask:  0022
                  State:  S (sleeping)
                  Tgid:   17248
                  Pid:    17248
                  PPid:   17200
                  Uid:    1000    1000    1000    1000
                  Gid:    100     100     100     100
                  VmSize:     131168 kB
                  VmLck:           0 kB
                  VmRSS:       13484 kB
                  VmData:      10332 kB
                  VmStk:         136 kB
                  VmExe:         992 kB
                  VmLib:        2104 kB
                  SigPnd: 0000000000000000
                  SigBlk: 0000000000010000
                  SigIgn: 0000000000384004

              The fields are as follows:

              * Name: Command run by this process.

              * Umask:  Process umask, expressed in octal with a leading zero;
                see umask(2).

              * State: Current state of the process.  One of  "R  (runnable)",
                "O   (running)",   "S   (sleeping)",   "D  (disk  sleep)",  "T
                (stopped)", "T (tracing stop)", or "Z (zombie)".

              * Tgid: Thread group ID (i.e., Process ID).

              * Pid: Thread ID (see gettid(2)).

              * PPid: PID of parent process.

              * Uid, Gid: Real, effective,  saved  set,  and  filesystem  UIDs
                (GIDs).

              * VmSize: Virtual memory size.

              * VmLck: Locked memory size (see mlock(2)).

              * VmRSS: Resident set size.

              * VmData, VmStk, VmExe: Size of data, stack, and text segments.

              * VmLib: Shared library code size.

              * SigPnd:  Number of signals pending for process as a whole (see
                pthreads(7) and signal(7)).

              * SigBlk, SigIgn: Masks indicating signals being blocked and ig‐
                nored (see signal(7)).

       /proc/[pid]/uid
              This read-only file contains the user id for the process.

       /proc/[pid]/winexename
              This  read-only  file  contains the Windows pathname of the exe‐
              cuted command.

       /proc/[pid]/winpid
              This read-only file contains the  Windows  process  id  for  the
              process.

       /proc/cpuinfo
              This  is  a  collection of CPU and system architecture dependent
              items, for each supported architecture a  different  list.   Two
              common  entries  are  processor  which  gives CPU number and bo‐
              gomips; a system constant that is calculated during kernel  ini‐
              tialization.   SMP  machines have information for each CPU.  The
              lscpu(1) command gathers its information from this file.

       /proc/cygdrive
              This file is a symbolic link that points to the  user's  Windows
              mapped drive mount point, and behaves in the same way as root.

       /proc/devices
              Text  listing  of  major numbers and device groups.  This can be
              used by MAKEDEV scripts for consistency with the kernel.

       /proc/filesystems
              A text listing of the filesystems which  are  supported  by  the
              kernel,  namely  filesystems which were compiled into the kernel
              or  whose  kernel  modules  are  currently  loaded.   (See  also
              filesystems(5).)   If  a filesystem is marked with "nodev", this
              means that it does not require a  block  device  to  be  mounted
              (e.g., virtual filesystem, network filesystem).

              Incidentally, this file may be used by mount(8) when no filesys‐
              tem is specified and it didn't manage to determine the  filesys‐
              tem  type.   Then  filesystems  contained in this file are tried
              (excepted those that are marked with "nodev").

       /proc/loadavg
              The first three fields in this file  are  load  average  figures
              giving  the number of jobs in the run queue (state R) or waiting
              for disk I/O (state D) averaged over 1, 5, and 15 minutes.  They
              are  the same as the load average numbers given by uptime(1) and
              other programs.  The fourth field consists of two numbers  sepa‐
              rated  by a slash (/).  The first of these is the number of cur‐
              rently runnable kernel scheduling entities (processes, threads).
              The value after the slash is the number of kernel scheduling en‐
              tities that currently exist on the system.

       /proc/meminfo
              This file reports statistics about memory usage on  the  system.
              It is used by free(1) to report the amount of free and used mem‐
              ory (both physical and swap) on the system as well as the shared
              memory  and  buffers  used by the kernel.  Each line of the file
              consists of a parameter name, followed by a colon, the value  of
              the  parameter,  and an option unit of measurement (e.g., "kB").
              The list below describes the  parameter  names  and  the  format
              specifier  required  to  read  the field value.  Some fields are
              displayed only if the kernel was  configured  with  various  op‐
              tions; those dependencies are noted in the list.

              MemTotal %lu
                     Total usable RAM (i.e., physical RAM minus a few reserved
                     bits and the kernel binary code).

              MemFree %lu
                     The sum of LowFree+HighFree.

              HighTotal %lu
                     Total amount of highmem.

              HighFree %lu
                     Amount of free highmem.

              LowTotal %lu
                     Total amount of lowmem.  Lowmem is memory  which  can  be
                     used  for everything that highmem can be used for, but it
                     is also available for the kernel's use for its  own  data
                     structures.  Bad things happen when you're out of lowmem.

              LowFree %lu
                     Amount of free lowmem.

              SwapTotal %lu
                     Total amount of swap space available.

              SwapFree %lu
                     Amount of swap space that is currently unused.

       /proc/misc
              Text  listing  of minor device numbers and names of devices with
              major device number of the misc device group.  This can be  used
              by MAKEDEV scripts for consistency with the kernel.

       /proc/mounts
              With the introduction of per-process mount namespaces, this file
              became a link to /proc/self/mounts, which lists the mount points
              of  the  process's own mount namespace.  The format of this file
              is documented in fstab(5).

       /proc/net
              This directory contains various files  and  subdirectories  con‐
              taining  information about the networking layer.  The files con‐
              tain ASCII structures and are, therefore, readable with  cat(1).
              However, the standard netstat(8) suite provides much cleaner ac‐
              cess to these files.

       /proc/net/if_inet6
              This file contains information about IP V6  interface  adapters,
              if used.  Each line represents an IP V6 interface adapter.

                  fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
                  fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
                  fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
                  fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
                  20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
                  00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
                                             (1)  (2)(3)(4)(5)  (6)

              The fields in each line are:

              (1)  The IP V6 address of the interface adapter.

              (2)  The IP V6 interface adapter index.

              (3)  The prefix length of the IP V6 interface address.

              (4)  The scope of the IP V6 interface address.

              (5)  The state of the IP V6 interface address.

              (6)  The DUID/GUID/UUID of the IP V6 interface adapter.

              The last number exists only for compatibility reasons and is al‐
              ways 1.

       /proc/partitions
              Contains the major and minor numbers of each partition  as  well
              as the number of 1024-byte blocks and the partition name.

       /proc/registry
              Under  Windows,  this directory contains subdirectories for reg‐
              istry paths, keys, and subkeys, and  files  named  for  registry
              values which contain registry data, for the current process.

       /proc/registry32
              Under 64 bit Windows, this directory contains subdirectories for
              registry paths, keys, and subkeys, and files named for  registry
              values which contain registry data, for 32 bit processes.

       /proc/registry64
              Under 64 bit Windows, this directory contains subdirectories for
              registry paths, keys, and subkeys, and files named for  registry
              values which contain registry data, for 64 bit processes.

       /proc/self
              This  directory  refers  to  the  process  accessing  the  /proc
              filesystem, and is identical to the /proc directory named by the
              process ID of the same process.

       /proc/stat
              kernel/system statistics.  Varies with architecture.  Common en‐
              tries include:

              cpu 10132153 0 3084719 46828483
              cpu0 1393280 0 572056 13343292
                     The  amount  of  time,  measured  in  units  of   USER_HZ
                     (1/100ths   of   a  second  on  most  architectures,  use
                     sysconf(_SC_CLK_TCK) to obtain the right value), that the
                     system  ("cpu"  line)  or  the specific CPU ("cpuN" line)
                     spent in various states:

                     user   (1) Time spent in user mode.

                     nice   (2) Time spent in  user  mode  with  low  priority
                            (nice).

                     system (3) Time spent in system mode.

                     idle   (4) Time spent in the idle task.

              page 5741 1808
                     The  number  of  pages the system paged in and the number
                     that were paged out (from disk).

              swap 1 0
                     The number of swap pages that have been  brought  in  and
                     out.

              intr 1462898
                     This number of interrupts serviced.

              ctxt 115315
                     The number of context switches that the system underwent.

              btime 769041601
                     boot   time,  in  seconds  since  the  Epoch,  1970-01-01
                     00:00:00 +0000 (UTC).

       /proc/swaps
              Swap areas in use.  See also swapon(8).

       /proc/sys
              This directory contains a number  of  files  and  subdirectories
              corresponding  to kernel variables.  These variables can be read
              using the /proc filesystem, and the (deprecated) sysctl(2)  sys‐
              tem call.

              String values may be terminated by either '\0' or '\n'.

              Integer  and  long values may be written either in decimal or in
              hexadecimal notation (e.g. 0x3FFF).  When writing multiple inte‐
              ger or long values, these may be separated by any of the follow‐
              ing whitespace characters: ' ', '\t', or '\n'.  Using other sep‐
              arators leads to the error EINVAL.

       /proc/sysvipc
              Subdirectory  containing  the  pseudo-files  msg,  sem  and shm.
              These files list the System V Interprocess  Communication  (IPC)
              objects  (respectively:  message  queues, semaphores, and shared
              memory) that currently exist on the  system,  providing  similar
              information  to  that  available  via ipcs(1).  These files have
              headers and are formatted (one IPC object per line) for easy un‐
              derstanding.  svipc(7) provides further background on the infor‐
              mation shown by these files.

       /proc/uptime
              This file contains two numbers (values in seconds):  the  uptime
              of  the  system (including time spent in suspend) and the amount
              of time spent in the idle process.

       /proc/version
              This string identifies the kernel version that is currently run‐
              ning.  For example:

  CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC

NOTES
       Many  files  contain  strings  (e.g., the environment and command line)
       that are in the internal format,  with  subfields  terminated  by  null
       bytes  ('\0').   When  inspecting such files, you may find that the re‐
       sults are more readable if you use a command of the following  form  to
       display them:

           $ cat -A file

       This manual page is incomplete, possibly inaccurate, and is the kind of
       thing that needs to be updated very often.

SEE ALSO
       cat(1), find(1),  free(1),  ps(1),  pstree(1),  tr(1),  uptime(1),  ch‐
       root(2),  mmap(2),  readlink(2),  syslog(2), hier(7), arp(8), mount(8),
       netstat(8), route(8).

COLOPHON
       This page is part of  version  3  of  Cygwin.   A  description  of  the
       project,  information  about  reporting bugs, and the latest documenta‐
       tion, can be found at https://cygwin.com/docs.html.

Cygwin                            2020-11-11                           PROC(5)

[-- Attachment #6: proc-5-xml.txt --]
[-- Type: text/plain, Size: 38223 bytes --]

PROC(5)                       Cygwin Users Manual                      PROC(5)

NAME
       proc - process information pseudo-filesystem

DESCRIPTION
       The proc filesystem is a pseudo-filesystem which provides an interface
       to kernel data structures. It is commonly mounted at /proc. Typically,
       it is mounted automatically by the system.

   Overview
       Underneath /proc, there are the following general groups of files and
       subdirectories:

       /proc/[pid] subdirectories
           Each one of these subdirectories contains files and subdirectories
           exposing information about the process with the corresponding
           process ID.

           The /proc/[pid] subdirectories are visible when iterating through
           /proc with getdents(2) (and thus are visible when one uses ls(1) to
           view the contents of /proc).

       /proc/self
           When a process accesses this magic symbolic link, it resolves to
           the process's own /proc/[pid] directory.

       /proc/[a-z]*
           Various other files and subdirectories under /proc expose
           system-wide information.

       All of the above are described in more detail below.

   Files and directories
       The following list provides details of many of the files and
       directories under the /proc hierarchy.

       /proc/[pid]
           There is a numerical subdirectory for each running process; the
           subdirectory is named by the process ID. Each /proc/[pid]
           subdirectory contains the pseudo-files and directories described
           below.

           The files inside each /proc/[pid] directory are normally owned by
           the effective user and effective group ID of the process.

       /proc/[pid]/cmdline
           This read-only file holds the complete command line for the
           process, unless the process is a zombie. In the latter case, there
           is nothing in this file: that is, a read on this file will return 0
           characters. The command-line arguments appear in this file as a set
           of strings followed by null bytes (''\0'').

       /proc/[pid]/ctty
           This read-only file holds the name of the console or control
           terminal device for the process, unless the process is detached
           from any terminal. In the latter case, there is only a newline in
           this file.

       /proc/[pid]/cwd
           This is a symbolic link to the current working directory of the
           process. To find out the current working directory of process 20,
           for instance, you can do this:

               $ cd /proc/20/cwd; /bin/pwd

           Note that the pwd command is often a shell built-in, and might not
           work properly. In bash(1), you may use pwd -P.

       /proc/[pid]/environ
           This read-only file contains the initial environment that was set
           when the currently executing program was started via execve(2). The
           entries are separated by null bytes (''\0''), and there may be a
           null byte at the end. Thus, to print out the environment of process
           1, you would do:

               $ cat -A /proc/1/environ

           If, after an execve(2), the process modifies its environment (e.g.,
           by calling functions such as putenv(3) or modifying the environ(7)
           variable directly), this file will not reflect those changes.

       /proc/[pid]/exe
           This file is a symbolic link containing the actual pathname of the
           executed command. This symbolic link can be dereferenced normally;
           attempting to open it will open the executable. You can even type
           /proc/[pid]/exe to run another copy of the same executable that is
           being run by process [pid].  /proc/[pid]/exe is a pointer to the
           binary which was executed, and appears as a symbolic link.

       /proc/[pid]/exename
           This read-only file contains the actual pathname of the executed
           command.

       /proc/[pid]/fd/
           This is a subdirectory containing one entry for each file which the
           process has open, named by its file descriptor, and which is a
           symbolic link to the actual file. Thus, 0 is standard input, 1
           standard output, 2 standard error, and so on.

           For file descriptors for pipes and sockets, the entries will be
           symbolic links whose content is the file type with the inode. A
           readlink(2) call on this file returns a string in the format:

           type:[inode]

           For example, socket:[2248868] will be a socket and its inode is
           2248868.

           Programs that take a filename as a command-line argument, but don't
           take input from standard input if no argument is supplied, and
           programs that write to a file named as a command-line argument, but
           don't send their output to standard output if no argument is
           supplied, can nevertheless be made to use standard input or
           standard output by using /proc/[pid]/fd files as command-line
           arguments. For example, assuming that -i is the flag designating an
           input file and -o is the flag designating an output file:

               $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...

           and you have a working filter.

           /proc/self/fd/N is approximately the same as /dev/fd/N in some UNIX
           and UNIX-like systems. Most Linux MAKEDEV scripts symbolically link
           /dev/fd to /proc/self/fd, in fact.

           Most systems provide symbolic links /dev/stdin, /dev/stdout, and
           /dev/stderr, which respectively link to the files 0, 1, and 2 in
           /proc/self/fd. Thus the example command above could be written as:

               $ foobar -i /dev/stdin -o /dev/stdout ...

           Note that for file descriptors referring to inodes (pipes and
           sockets, see above), those inodes still have permission bits and
           ownership information distinct from those of the /proc/[pid]/fd
           entry, and that the owner may differ from the user and group IDs of
           the process. An unprivileged process may lack permissions to open
           them, as in this example:

               $ echo test | sudo -u nobody cat
               test
               $ echo test | sudo -u nobody cat /proc/self/fd/0
               cat: /proc/self/fd/0: Permission denied

           File descriptor 0 refers to the pipe created by the shell and owned
           by that shell's user, which is not nobody, so cat does not have
           permission to create a new file descriptor to read from that inode,
           even though it can still read from its existing file descriptor 0.

       /proc/[pid]/gid
           This read-only file contains the primary group id for the process.

       /proc/[pid]/maps
           A file containing the currently mapped memory regions and their
           access permissions. See mmap(2) for some further information about
           memory mappings.

           The format of the file is:

               address          perms offset   dev       inode               pathname
               00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
               ...
               00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
               00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
               000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
               000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
               000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
               000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
               00200000-00377000 ===p 00000000 0000:0000 0
               00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
               00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
               ...
               00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
               005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
               005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
               00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
               ...
               100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
               100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
               100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
               ...
               180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
               180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
               180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
               180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
               180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
               18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
               180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
               ...
               800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
               800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
               7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0
               7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0
               7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0
               ...
               7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
               7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
               7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
               7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
               7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
               ...

           The address field is the address space in the process that the
           mapping occupies. The perms field is a set of permissions:

               r: read
               w: write
               x: execute
               ===: reserved
               s: shared
               g: guard
               p: private

           The offset field is the offset into the file/whatever; dev is the
           device (major:minor); inode is the inode on that device. 0
           indicates that no inode is associated with the memory region, as
           would be the case with BSS (uninitialized data).

           The pathname field will usually be the file that is backing the
           mapping.

           There are additional helpful pseudo-paths:

           [cygwin-shared]
               Global shared Cygwin process information.

           [cygwin-user-shared]
               Global shared Cygwin user information.

           [peb]
               Windows Process Environment Block.

           [procinfo]
               Cygwin process information.

           [shared-user-data]
               Shared user information.

           [heap]
               The process's heap.

           [stack]
               The initial process's (also known as the main thread's) stack.

           [stack (tid <tid>)]
               A thread's stack (where the <tid> is a thread id).

           [teb (tid <tid>)]
               Windows Thread Environment Block (where <tid> is a thread id).

           [win heap <n> default shared exec grow noserial debug]
               Windows extended heap (where <n> is a heap id) and the rest of
               the words are heap flags:

               default
                   default heap flags

               shared
                   shareable and mapped heap flags

               exec
                   executable heap flag

               grow
                   growable heap flag

               noserial
                   do not serialize heap flag

               debug
                   debugged heap flag

           If the pathname field is blank, this is an anonymous mapping as
           obtained via mmap(2). There is no easy way to coordinate this back
           to a process's source, short of running it through gdb(1),
           strace(1), or similar.

           pathname is shown unescaped except for newline characters, which
           are replaced with an octal escape sequence. As a result, it is not
           possible to determine whether the original pathname contained a
           newline character or the literal \e012 character sequence.

           If the mapping is file-backed and the file has been deleted, the
           string " (deleted)" is appended to the pathname. Note that this is
           ambiguous too.

       /proc/[pid]/mountinfo
           This file contains information about mount points in the process's
           mount namespace (see mount_namespaces(7)). It supplies various
           information (e.g., propagation state, root of mount for bind
           mounts, identifier for each mount and its parent) that is missing
           from the (older) /proc/[pid]/mounts file, and fixes various other
           problems with that file (e.g., nonextensibility, failure to
           distinguish per-mount versus per-superblock options).

           The file contains lines of the form:

               36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
               (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)

           The numbers in parentheses are labels for the descriptions below:

           (1)
               mount ID: a unique ID for the mount (may be reused after
               umount(2)).

           (2)
               parent ID: the ID of the parent mount (or of self for the root
               of this mount namespace's mount tree).

               If a new mount is stacked on top of a previous existing mount
               (so that it hides the existing mount) at pathname P, then the
               parent of the new mount is the previous mount at that location.
               Thus, when looking at all the mounts stacked at a particular
               location, the top-most mount is the one that is not the parent
               of any other mount at the same location. (Note, however, that
               this top-most mount will be accessible only if the longest path
               subprefix of P that is a mount point is not itself hidden by a
               stacked mount.)

               If the parent mount point lies outside the process's root
               directory (see chroot(2)), the ID shown here won't have a
               corresponding record in mountinfo whose mount ID (field 1)
               matches this parent mount ID (because mount points that lie
               outside the process's root directory are not shown in
               mountinfo). As a special case of this point, the process's root
               mount point may have a parent mount (for the initramfs
               filesystem) that lies outside the process's root directory, and
               an entry for that mount point will not appear in mountinfo.

           (3)
               major:minor: the value of st_dev for files on this filesystem
               (see stat(2)).

           (4)
               root: the pathname of the directory in the filesystem which
               forms the root of this mount.

           (5)
               mount point: the pathname of the mount point relative to the
               process's root directory.

           (6)
               mount options: per-mount options (see mount(2)).

           (7)
               optional fields: zero or more fields of the form "tag[:value]";
               see below.

           (8)
               separator: the end of the optional fields is marked by a single
               hyphen.

           (9)
               filesystem type: the filesystem type in the form
               "type[.subtype]".

           (10)
               mount source: filesystem-specific information or "none".

           (11)
               super options: per-superblock options (see mount(2)).

       /proc/[pid]/mounts
           This file lists all the filesystems currently mounted in the
           process's mount namespace (see mount_namespaces(7)). The format of
           this file is documented in fstab(5).

       /proc/[pid]/pgid
           This read-only file contains the process group id for the process.

       /proc/[pid]/ppid
           This read-only file contains the parent process id for the process.

       /proc/[pid]/root
           UNIX and Linux support the idea of a per-process root of the
           filesystem, set by the chroot(2) system call. This file is a
           symbolic link that points to the process's root directory, and
           behaves in the same way as exe, and fd/*.

       /proc/[pid]/sid
           This read-only file contains the session id for the process.

       /proc/[pid]/stat
           Status information about the process. This is used by ps(1).

           The fields, in order, with their proper scanf(3) format specifiers,
           are listed below.

           (1) pid %d
               The process ID.

           (2) comm %s
               The filename of the executable, in parentheses. This is visible
               whether or not the executable is swapped out.

           (3) state %c
               One of the following characters, indicating process state:

               R
                   Runnable

               O
                   Running

               S
                   Sleeping in an interruptible wait

               D
                   Waiting in uninterruptible disk sleep

               Z
                   Zombie

               T
                   Stopped (on a signal) or trace stopped

           (4) ppid %d
               The PID of the parent of this process.

           (5) pgrp %d
               The process group ID of the process.

           (6) session %d
               The session ID of the process.

           (7) tty_nr %d
               The controlling terminal of the process. (The minor device
               number is contained in the combination of bits 31 to 20 and 7
               to 0; the major device number is in bits 15 to 8.)

           (8) tpgid %d
               The ID of the foreground process group of the controlling
               terminal of the process.

           (9) flags %u
               The kernel flags word of the process.

           (10) minflt %lu
               The number of minor faults the process has made which have not
               required loading a memory page from disk.

           (11) cminflt %lu
               The number of minor faults that the process's waited-for
               children have made.

           (12) majflt %lu
               The number of major faults the process has made which have
               required loading a memory page from disk.

           (13) cmajflt %lu
               The number of major faults that the process's waited-for
               children have made.

           (14) utime %lu
               Amount of time that this process has been scheduled in user
               mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).
               This includes guest time, guest_time (time spent running a
               virtual CPU, see below), so that applications that are not
               aware of the guest time field do not lose that time from their
               calculations.

           (15) stime %lu
               Amount of time that this process has been scheduled in kernel
               mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).

           (16) cutime %ld
               Amount of time that this process's waited-for children have
               been scheduled in user mode, measured in clock ticks (divide by
               sysconf(_SC_CLK_TCK)). (See also times(2).) This includes guest
               time, cguest_time (time spent running a virtual CPU, see
               below).

           (17) cstime %ld
               Amount of time that this process's waited-for children have
               been scheduled in kernel mode, measured in clock ticks (divide
               by sysconf(_SC_CLK_TCK)).

           (18) priority %ld
               For processes running a real-time scheduling policy (policy
               below; see sched_setscheduler(2)), this is the negated
               scheduling priority, minus one; that is, a number in the range
               -2 to -100, corresponding to real-time priorities 1 to 99. For
               processes running under a non-real-time scheduling policy, this
               is the raw nice value (setpriority(2)) as represented in the
               kernel. The kernel stores nice values as numbers in the range 0
               (high) to 39 (low), corresponding to the user-visible nice
               range of -20 to 19.

           (19) nice %ld
               The nice value (see setpriority(2)), a value in the range 19
               (low priority) to -20 (high priority).

           (20) num_threads %ld
               Number of threads in this process.

           (21) itrealvalue %ld
               The time in jiffies before the next SIGALRM is sent to the
               process due to an interval timer. This field is no longer
               maintained, and is hard coded as 0.

           (22) starttime %llu
               The time the process started after system boot. The value is
               expressed in clock ticks (divide by sysconf(_SC_CLK_TCK)).

           (23) vsize %lu
               Virtual memory size in bytes.

           (24) rss %ld
               Resident Set Size: number of pages the process has in real
               memory. This is just the pages which count toward text, data,
               or stack space. This does not include pages which have not been
               demand-loaded in, or which are swapped out.

           (25) rsslim %lu
               Current soft limit in bytes on the rss of the process; see the
               description of RLIMIT_RSS in getrlimit(2).

       /proc/[pid]/statm
           Provides information about memory usage, measured in pages. The
           columns are:

               size       (1) total program size
                          (same as VmSize in /proc/[pid]/status)
               resident   (2) resident set size
                          (same as VmRSS in /proc/[pid]/status)
               shared     (3) number of resident shared pages (i.e., backed by a file)
                          (same as RssFile+RssShmem in /proc/[pid]/status)
               text       (4) text (code)
               lib        (5) library
               data       (6) data + stack
               dt         (7) dirty pages (always 0)

           /proc/[pid]/status Provides much of the information in
           /proc/[pid]/stat and /proc/[pid]/statm in a format that's easier
           for humans to parse. Here's an example:

               $ cat /proc/$$/status
               Name:   bash
               Umask:  0022
               State:  S (sleeping)
               Tgid:   17248
               Pid:    17248
               PPid:   17200
               Uid:    1000    1000    1000    1000
               Gid:    100     100     100     100
               VmSize:     131168 kB
               VmLck:           0 kB
               VmRSS:       13484 kB
               VmData:      10332 kB
               VmStk:         136 kB
               VmExe:         992 kB
               VmLib:        2104 kB
               SigPnd: 0000000000000000
               SigBlk: 0000000000010000
               SigIgn: 0000000000384004

           The fields are as follows:

           •   Name: Command run by this process.

           •   Umask: Process umask, expressed in octal with a leading zero;
               see umask(2).

           •   State: Current state of the process. One of "R (runnable)", "O
               (running)", "S (sleeping)", "D (disk sleep)", "T (stopped)", "T
               (tracing stop)", or "Z (zombie)".

           •   Tgid: Thread group ID (i.e., Process ID).

           •   Pid: Thread ID (see gettid(2)).

           •   PPid: PID of parent process.

           •   Uid, Gid: Real, effective, saved set, and filesystem UIDs
               (GIDs).

           •   VmSize: Virtual memory size.

           •   VmLck: Locked memory size (see mlock(2)).

           •   VmRSS: Resident set size.

           •   VmData, VmStk, VmExe: Size of data, stack, and text segments.

           •   VmLib: Shared library code size.

           •   SigPnd: Number of signals pending for process as a whole (see
               pthreads(7) and signal(7)).

           •   SigBlk, SigIgn: Masks indicating signals being blocked and
               ignored (see signal(7)).

       /proc/[pid]/uid
           This read-only file contains the user id for the process.

       /proc/[pid]/winexename
           This read-only file contains the Windows pathname of the executed
           command.

       /proc/[pid]/winpid
           This read-only file contains the Windows process id for the
           process.

       /proc/cpuinfo
           This is a collection of CPU and system architecture dependent
           items, for each supported architecture a different list. Two common
           entries are processor which gives CPU number and bogomips; a system
           constant that is calculated during kernel initialization. SMP
           machines have information for each CPU. The lscpu(1) command
           gathers its information from this file.

       /proc/cygdrive
           This file is a symbolic link that points to the user's Windows
           mapped drive mount point, and behaves in the same way as root.

       /proc/devices
           Text listing of major numbers and device groups. This can be used
           by MAKEDEV scripts for consistency with the kernel.

       /proc/filesystems
           A text listing of the filesystems which are supported by the
           kernel, namely filesystems which were compiled into the kernel or
           whose kernel modules are currently loaded. (See also
           filesystems(5).) If a filesystem is marked with "nodev", this means
           that it does not require a block device to be mounted (e.g.,
           virtual filesystem, network filesystem).

           Incidentally, this file may be used by mount(8) when no filesystem
           is specified and it didn't manage to determine the filesystem type.
           Then filesystems contained in this file are tried (excepted those
           that are marked with "nodev").

       /proc/loadavg
           The first three fields in this file are load average figures giving
           the number of jobs in the run queue (state R) or waiting for disk
           I/O (state D) averaged over 1, 5, and 15 minutes. They are the same
           as the load average numbers given by uptime(1) and other programs.
           The fourth field consists of two numbers separated by a slash (/).
           The first of these is the number of currently runnable kernel
           scheduling entities (processes, threads). The value after the slash
           is the number of kernel scheduling entities that currently exist on
           the system.

       /proc/meminfo
           This file reports statistics about memory usage on the system. It
           is used by free(1) to report the amount of free and used memory
           (both physical and swap) on the system as well as the shared memory
           and buffers used by the kernel. Each line of the file consists of a
           parameter name, followed by a colon, the value of the parameter,
           and an option unit of measurement (e.g., "kB"). The list below
           describes the parameter names and the format specifier required to
           read the field value. Some fields are displayed only if the kernel
           was configured with various options; those dependencies are noted
           in the list.

           MemTotal %lu
               Total usable RAM (i.e., physical RAM minus a few reserved bits
               and the kernel binary code).

           MemFree %lu
               The sum of LowFree+HighFree.

           HighTotal %lu
               Total amount of highmem.

           HighFree %lu
               Amount of free highmem.

           LowTotal %lu
               Total amount of lowmem. Lowmem is memory which can be used for
               everything that highmem can be used for, but it is also
               available for the kernel's use for its own data structures. Bad
               things happen when you're out of lowmem.

           LowFree %lu
               Amount of free lowmem.

           SwapTotal %lu
               Total amount of swap space available.

           SwapFree %lu
               Amount of swap space that is currently unused.

       /proc/misc
           Text listing of minor device numbers and names of devices with
           major device number of the misc device group. This can be used by
           MAKEDEV scripts for consistency with the kernel.

       /proc/mounts
           With the introduction of per-process mount namespaces, this file
           became a link to /proc/self/mounts, which lists the mount points of
           the process's own mount namespace. The format of this file is
           documented in fstab(5).

       /proc/net
           This directory contains various files and subdirectories containing
           information about the networking layer. The files contain ASCII
           structures and are, therefore, readable with cat(1). However, the
           standard netstat(8) suite provides much cleaner access to these
           files.

       /proc/net/if_inet6
           This file contains information about IP V6 interface adapters, if
           used. Each line represents an IP V6 interface adapter.

               fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
               fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
               fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
               fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
               20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
               00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
                                          (1)  (2)(3)(4)(5)  (6)

           The fields in each line are:

           (1)
               The IP V6 address of the interface adapter.

           (2)
               The IP V6 interface adapter index.

           (3)
               The prefix length of the IP V6 interface address.

           (4)
               The scope of the IP V6 interface address.

           (5)
               The state of the IP V6 interface address.

           (6)
               The DUID/GUID/UUID of the IP V6 interface adapter.

           The last number exists only for compatibility reasons and is always
           1.

       /proc/partitions
           Contains the major and minor numbers of each partition as well as
           the number of 1024-byte blocks and the partition name.

       /proc/registry
           Under Windows, this directory contains subdirectories for registry
           paths, keys, and subkeys, and files named for registry values which
           contain registry data, for the current process.

       /proc/registry32
           Under 64 bit Windows, this directory contains subdirectories for
           registry paths, keys, and subkeys, and files named for registry
           values which contain registry data, for 32 bit processes.

       /proc/registry64
           Under 64 bit Windows, this directory contains subdirectories for
           registry paths, keys, and subkeys, and files named for registry
           values which contain registry data, for 64 bit processes.

       /proc/self
           This directory refers to the process accessing the /proc
           filesystem, and is identical to the /proc directory named by the
           process ID of the same process.

       /proc/stat
           kernel/system statistics. Varies with architecture. Common entries
           include:

           cpu 10132153 0 3084719 46828483, cpu0 1393280 0 572056 13343292
               The amount of time, measured in units of USER_HZ (1/100ths of a
               second on most architectures, use sysconf(_SC_CLK_TCK) to
               obtain the right value), that the system ("cpu" line) or the
               specific CPU ("cpuN" line) spent in various states:

               user
                   (1) Time spent in user mode.

               nice
                   (2) Time spent in user mode with low priority (nice).

               system
                   (3) Time spent in system mode.

               idle
                   (4) Time spent in the idle task.

           page 5741 1808
               The number of pages the system paged in and the number that
               were paged out (from disk).

           swap 1 0
               The number of swap pages that have been brought in and out.

           intr 1462898
               This number of interrupts serviced.

           ctxt 115315
               The number of context switches that the system underwent.

           btime 769041601
               boot time, in seconds since the Epoch, 1970-01-01 00:00:00
               +0000 (UTC).

       /proc/swaps
           Swap areas in use. See also swapon(8).

       /proc/sys
           This directory contains a number of files and subdirectories
           corresponding to kernel variables. These variables can be read
           using the /proc filesystem, and the (deprecated) sysctl(2) system
           call.

           String values may be terminated by either ''\0'' or ''\n''.

           Integer and long values may be written either in decimal or in
           hexadecimal notation (e.g. 0x3FFF). When writing multiple integer
           or long values, these may be separated by any of the following
           whitespace characters: '' '', ''\t'', or ''\n''. Using other
           separators leads to the error EINVAL.

       /proc/sysvipc
           Subdirectory containing the pseudo-files msg, sem and shm. These
           files list the System V Interprocess Communication (IPC) objects
           (respectively: message queues, semaphores, and shared memory) that
           currently exist on the system, providing similar information to
           that available via ipcs(1). These files have headers and are
           formatted (one IPC object per line) for easy understanding.
           svipc(7) provides further background on the information shown by
           these files.

       /proc/uptime
           This file contains two numbers (values in seconds): the uptime of
           the system (including time spent in suspend) and the amount of time
           spent in the idle process.

       /proc/version
           This string identifies the kernel version that is currently
           running. For example:

               CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC

           Many files contain strings (e.g., the environment and command line)
           that are in the internal format, with subfields terminated by null
           bytes (''\0''). When inspecting such files, you may find that the
           results are more readable if you use a command of the following
           form to display them:

           $ cat -A file

       This manual page is incomplete, possibly inaccurate, and is the kind of
       thing that needs to be updated very often.

SEE ALSO
       cat(1), find(1), free(1), ps(1), pstree(1), tr(1), uptime(1),
       chroot(2), mmap(2), readlink(2), syslog(2), hier(7), arp(8), mount(8),
       netstat(8), route(8).

COLOPHON
       This page is part of version 3 of Cygwin. A description of the project,
       information about reporting bugs, and the latest documentation, can be
       found at https://cygwin.com/docs.html.

Cygwin                            2020-11-11                           PROC(5)

[-- Attachment #7: proc-5.diff --]
[-- Type: text/plain, Size: 78846 bytes --]

--- proc-5-man.txt	2020-11-13 06:57:19.434325800 -0700
+++ proc-5-xml.txt	2020-11-13 06:57:37.827550000 -0700
@@ -1,846 +1,854 @@
-PROC(5)                      Cygwin User's Manual                      PROC(5)
+PROC(5)                       Cygwin Users Manual                      PROC(5)
 
 NAME
        proc - process information pseudo-filesystem
 
 DESCRIPTION
-       The  proc filesystem is a pseudo-filesystem which provides an interface
-       to kernel data structures.  It is commonly  mounted  at  /proc.   Typi‐
-       cally, it is mounted automatically by the system.
+       The proc filesystem is a pseudo-filesystem which provides an interface
+       to kernel data structures. It is commonly mounted at /proc. Typically,
+       it is mounted automatically by the system.
 
    Overview
-       Underneath  /proc,  there are the following general groups of files and
+       Underneath /proc, there are the following general groups of files and
        subdirectories:
 
        /proc/[pid] subdirectories
-              Each one of these subdirectories contains files and  subdirecto‐
-              ries exposing information about the process with the correspond‐
-              ing process ID.
-
-              The  /proc/[pid]  subdirectories  are  visible  when   iterating
-              through  /proc  with  getdents(2) (and thus are visible when one
-              uses ls(1) to view the contents of /proc).
+           Each one of these subdirectories contains files and subdirectories
+           exposing information about the process with the corresponding
+           process ID.
+
+           The /proc/[pid] subdirectories are visible when iterating through
+           /proc with getdents(2) (and thus are visible when one uses ls(1) to
+           view the contents of /proc).
 
        /proc/self
-              When a process accesses this magic symbolic link, it resolves to
-              the process's own /proc/[pid] directory.
+           When a process accesses this magic symbolic link, it resolves to
+           the process's own /proc/[pid] directory.
 
        /proc/[a-z]*
-              Various  other  files and subdirectories under /proc expose sys‐
-              tem-wide information.
+           Various other files and subdirectories under /proc expose
+           system-wide information.
 
        All of the above are described in more detail below.
 
    Files and directories
-       The following list provides details of many of the files  and  directo‐
-       ries under the /proc hierarchy.
+       The following list provides details of many of the files and
+       directories under the /proc hierarchy.
 
        /proc/[pid]
-              There  is a numerical subdirectory for each running process; the
-              subdirectory is named by the process ID.  Each /proc/[pid]  sub‐
-              directory  contains  the  pseudo-files and directories described
-              below.
+           There is a numerical subdirectory for each running process; the
+           subdirectory is named by the process ID. Each /proc/[pid]
+           subdirectory contains the pseudo-files and directories described
+           below.
 
-              The files inside each /proc/[pid] directory are  normally  owned
-              by the effective user and effective group ID of the process.
+           The files inside each /proc/[pid] directory are normally owned by
+           the effective user and effective group ID of the process.
 
        /proc/[pid]/cmdline
-              This  read-only  file  holds  the  complete command line for the
-              process, unless the process is a zombie.  In  the  latter  case,
-              there is nothing in this file: that is, a read on this file will
-              return 0 characters.  The command-line arguments appear in  this
-              file as a set of strings followed by null bytes ('\0').
+           This read-only file holds the complete command line for the
+           process, unless the process is a zombie. In the latter case, there
+           is nothing in this file: that is, a read on this file will return 0
+           characters. The command-line arguments appear in this file as a set
+           of strings followed by null bytes (''\0'').
 
        /proc/[pid]/ctty
-              This  read-only  file  holds  the name of the console or control
-              terminal device for the process, unless the process is  detached
-              from  any terminal.  In the latter case, there is only a newline
-              in this file.
+           This read-only file holds the name of the console or control
+           terminal device for the process, unless the process is detached
+           from any terminal. In the latter case, there is only a newline in
+           this file.
 
        /proc/[pid]/cwd
-              This is a symbolic link to the current working directory of  the
-              process.   To  find out the current working directory of process
-              20, for instance, you can do this:
+           This is a symbolic link to the current working directory of the
+           process. To find out the current working directory of process 20,
+           for instance, you can do this:
 
-                  $ cd /proc/20/cwd; /bin/pwd
+               $ cd /proc/20/cwd; /bin/pwd
 
-              Note that the pwd command is often a shell built-in,  and  might
-              not work properly.  In bash(1), you may use pwd -P.
+           Note that the pwd command is often a shell built-in, and might not
+           work properly. In bash(1), you may use pwd -P.
 
        /proc/[pid]/environ
-              This  read-only  file  contains the initial environment that was
-              set when the currently executing program  was  started  via  ex‐
-              ecve(2).   The  entries  are separated by null bytes ('\0'), and
-              there may be a null byte at the end.  Thus, to print out the en‐
-              vironment of process 1, you would do:
-
-                  $ cat -A /proc/1/environ
-
-              If,  after  an  execve(2),  the process modifies its environment
-              (e.g., by calling functions such as putenv(3) or  modifying  the
-              environ(7)  variable directly), this file will not reflect those
-              changes.
+           This read-only file contains the initial environment that was set
+           when the currently executing program was started via execve(2). The
+           entries are separated by null bytes (''\0''), and there may be a
+           null byte at the end. Thus, to print out the environment of process
+           1, you would do:
+
+               $ cat -A /proc/1/environ
+
+           If, after an execve(2), the process modifies its environment (e.g.,
+           by calling functions such as putenv(3) or modifying the environ(7)
+           variable directly), this file will not reflect those changes.
 
        /proc/[pid]/exe
-              This file is a symbolic link containing the actual  pathname  of
-              the  executed  command.   This symbolic link can be dereferenced
-              normally; attempting to open it will open the  executable.   You
-              can  even  type  /proc/[pid]/exe to run another copy of the same
-              executable that is being run by process [pid].   /proc/[pid]/exe
-              is  a pointer to the binary which was executed, and appears as a
-              symbolic link.
+           This file is a symbolic link containing the actual pathname of the
+           executed command. This symbolic link can be dereferenced normally;
+           attempting to open it will open the executable. You can even type
+           /proc/[pid]/exe to run another copy of the same executable that is
+           being run by process [pid].  /proc/[pid]/exe is a pointer to the
+           binary which was executed, and appears as a symbolic link.
 
        /proc/[pid]/exename
-              This read-only file contains the actual pathname of the executed
-              command.
+           This read-only file contains the actual pathname of the executed
+           command.
 
        /proc/[pid]/fd/
-              This  is a subdirectory containing one entry for each file which
-              the process has open, named by its file descriptor, and which is
-              a  symbolic link to the actual file.  Thus, 0 is standard input,
-              1 standard output, 2 standard error, and so on.
-
-              For file descriptors for pipes and sockets, the entries will  be
-              symbolic links whose content is the file type with the inode.  A
-              readlink(2) call on this file returns a string in the format:
-
-                  type:[inode]
-
-              For example, socket:[2248868] will be a socket and its inode  is
-              2248868.
-
-              Programs  that  take  a filename as a command-line argument, but
-              don't take input from standard input if no argument is supplied,
-              and  programs that write to a file named as a command-line argu‐
-              ment, but don't send their output to standard output if no argu‐
-              ment is supplied, can nevertheless be made to use standard input
-              or standard output by using /proc/[pid]/fd files as command-line
-              arguments.   For example, assuming that -i is the flag designat‐
-              ing an input file and -o is the flag designating an output file:
-
-                  $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...
-
-              and you have a working filter.
-
-              /proc/self/fd/N is approximately the same as /dev/fd/N  in  some
-              UNIX and UNIX-like systems.  Most Linux MAKEDEV scripts symboli‐
-              cally link /dev/fd to /proc/self/fd, in fact.
-
-              Most systems provide symbolic links /dev/stdin, /dev/stdout, and
-              /dev/stderr, which respectively link to the files 0, 1, and 2 in
-              /proc/self/fd.  Thus the example command above could be  written
-              as:
-
-                  $ foobar -i /dev/stdin -o /dev/stdout ...
-
-              Note  that  for  file descriptors referring to inodes (pipes and
-              sockets, see above), those inodes still have permission bits and
-              ownership  information distinct from those of the /proc/[pid]/fd
-              entry, and that the owner may differ from the user and group IDs
-              of the process.  An unprivileged process may lack permissions to
-              open them, as in this example:
-
-                  $ echo test | sudo -u nobody cat
-                  test
-                  $ echo test | sudo -u nobody cat /proc/self/fd/0
-                  cat: /proc/self/fd/0: Permission denied
-
-              File descriptor 0 refers to the pipe created by  the  shell  and
-              owned by that shell's user, which is not nobody, so cat does not
-              have permission to create a new file  descriptor  to  read  from
-              that inode, even though it can still read from its existing file
-              descriptor 0.
+           This is a subdirectory containing one entry for each file which the
+           process has open, named by its file descriptor, and which is a
+           symbolic link to the actual file. Thus, 0 is standard input, 1
+           standard output, 2 standard error, and so on.
+
+           For file descriptors for pipes and sockets, the entries will be
+           symbolic links whose content is the file type with the inode. A
+           readlink(2) call on this file returns a string in the format:
+
+           type:[inode]
+
+           For example, socket:[2248868] will be a socket and its inode is
+           2248868.
+
+           Programs that take a filename as a command-line argument, but don't
+           take input from standard input if no argument is supplied, and
+           programs that write to a file named as a command-line argument, but
+           don't send their output to standard output if no argument is
+           supplied, can nevertheless be made to use standard input or
+           standard output by using /proc/[pid]/fd files as command-line
+           arguments. For example, assuming that -i is the flag designating an
+           input file and -o is the flag designating an output file:
+
+               $ foobar -i /proc/self/fd/0 -o /proc/self/fd/1 ...
+
+           and you have a working filter.
+
+           /proc/self/fd/N is approximately the same as /dev/fd/N in some UNIX
+           and UNIX-like systems. Most Linux MAKEDEV scripts symbolically link
+           /dev/fd to /proc/self/fd, in fact.
+
+           Most systems provide symbolic links /dev/stdin, /dev/stdout, and
+           /dev/stderr, which respectively link to the files 0, 1, and 2 in
+           /proc/self/fd. Thus the example command above could be written as:
+
+               $ foobar -i /dev/stdin -o /dev/stdout ...
+
+           Note that for file descriptors referring to inodes (pipes and
+           sockets, see above), those inodes still have permission bits and
+           ownership information distinct from those of the /proc/[pid]/fd
+           entry, and that the owner may differ from the user and group IDs of
+           the process. An unprivileged process may lack permissions to open
+           them, as in this example:
+
+               $ echo test | sudo -u nobody cat
+               test
+               $ echo test | sudo -u nobody cat /proc/self/fd/0
+               cat: /proc/self/fd/0: Permission denied
+
+           File descriptor 0 refers to the pipe created by the shell and owned
+           by that shell's user, which is not nobody, so cat does not have
+           permission to create a new file descriptor to read from that inode,
+           even though it can still read from its existing file descriptor 0.
 
        /proc/[pid]/gid
-              This read-only file  contains  the  primary  group  id  for  the
-              process.
+           This read-only file contains the primary group id for the process.
 
        /proc/[pid]/maps
-              A  file containing the currently mapped memory regions and their
-              access permissions.  See mmap(2) for  some  further  information
-              about memory mappings.
-
-              The format of the file is:
-
-address          perms offset   dev       inode               pathname
-00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
-...
-00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
-00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
-000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
-000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
-000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
-000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
-00200000-00377000 ===p 00000000 0000:0000 0
-00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
-00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
-...
-00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
-005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
-005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
-00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
-...
-100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
-100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
-100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
-...
-180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
-180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
-180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
-180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
-180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
-18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
-180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
-...
-800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
-800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
-7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0
-7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0
-7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0
-...
-7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
-7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
-7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
-7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
-7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
-...
-
-              The  address  field is the address space in the process that the
-              mapping occupies.  The perms field is a set of permissions:
-
-                  r: read
-                  w: write
-                  x: execute
-                  ===: reserved
-                  s: shared
-                  g: guard
-                  p: private
-
-              The offset field is the offset into the  file/whatever;  dev  is
-              the  device (major:minor); inode is the inode on that device.  0
-              indicates that no inode is associated with the memory region, as
-              would be the case with BSS (uninitialized data).
-
-              The  pathname field will usually be the file that is backing the
-              mapping.
-
-              There are additional helpful pseudo-paths:
-
-                   [cygwin-shared]
-                          Global shared Cygwin process information.
-
-                   [cygwin-user-shared]
-                          Global shared Cygwin user information.
-
-                   [peb]  Windows Process Environment Block.
-
-                   [procinfo]
-                          Cygwin process information.
-
-                   [shared-user-data]
-                          Shared user information.
-
-                   [heap] The process's heap.
-
-                   [stack]
-                          The  initial  process's  (also  known  as  the  main
-                          thread's) stack.
-
-                   [stack (tid <tid>)]
-                          A thread's stack (where the <tid> is a thread id).
-
-                   [teb (tid <tid>)]
-                          Windows  Thread  Environment Block (where <tid> is a
-                          thread id).
-
-                   [win heap <n> default shared exec grow noserial debug]
-                          Windows extended heap (where <n> is a heap id)
-                          and the rest of the words are heap flags:
-
-                          default   default heap flags
-
-                          shared    shareable and mapped heap flags
-
-                          exec      executable heap flag
-
-                          grow      growable heap flag
-
-                          noserial  do not serialize heap flag
-
-                          debug     debugged heap flag
-
-              If the pathname field is blank, this is an anonymous mapping  as
-              obtained  via  mmap(2).  There is no easy way to coordinate this
-              back to a process's source, short of running it through  gdb(1),
-              strace(1), or similar.
-
-              pathname is shown unescaped except for newline characters, which
-              are replaced with an octal escape sequence.  As a result, it  is
-              not  possible  to  determine  whether the original pathname con‐
-              tained a newline character or the literal  \e012  character  se‐
-              quence.
-
-              If the mapping is file-backed and the file has been deleted, the
-              string " (deleted)" is appended to the pathname.  Note that this
-              is ambiguous too.
+           A file containing the currently mapped memory regions and their
+           access permissions. See mmap(2) for some further information about
+           memory mappings.
+
+           The format of the file is:
+
+               address          perms offset   dev       inode               pathname
+               00010000-00020000 rw-s 00000000 0000:0000 0                   [win heap 1 default shared]
+               ...
+               00080000-00082000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
+               00082000-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
+               000A0000-000A1000 rw-p 00000000 0000:0000 0                   [win heap 2 grow]
+               000A1000-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
+               000C0000-000D9000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
+               000D9000-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
+               00200000-00377000 ===p 00000000 0000:0000 0
+               00377000-00378000 rw-p 00177000 0000:0000 0                   [peb]
+               00378000-0037A000 rw-p 00178000 0000:0000 0                   [teb (tid 8844)]
+               ...
+               00400000-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
+               005F9000-005FC000 rw-g 001F9000 0000:0000 0                   [stack (tid 8884)]
+               005FC000-00600000 rw-p 001FC000 0000:0000 0                   [stack (tid 8884)]
+               00600000-006C7000 r--s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale.nls
+               ...
+               100400000-100401000 r--p 00000000 EE45:4341 281474978095037   /usr/bin/sh.exe
+               100401000-100413000 r-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh.exe
+               100413000-100414000 rw-p 00013000 EE45:4341 281474978095037   /usr/bin/sh.exe
+               ...
+               180010000-180020000 rw-s 00000000 0000:0000 0                 [procinfo]
+               180020000-180029000 rw-s 00000000 0000:0000 0                 [cygwin-user-shared]
+               180030000-18003C000 rw-s 00000000 0000:0000 0                 [cygwin-shared]
+               180040000-180041000 r--p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
+               180041000-18022D000 r-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
+               18022D000-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
+               180231000-18026A000 rw-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1.dll
+               ...
+               800000000-800090000 rw-p 00000000 0000:0000 0                 [heap]
+               800090000-820000000 ===p 00090000 0000:0000 0                 [heap]
+               7FF4FDEB0000-7FF4FDEB5000 r--s 00000000 0000:0000 0
+               7FF4FDEB5000-7FF4FDFB0000 ===s 00005000 0000:0000 0
+               7FF4FDFB0000-7FF5FDFD0000 ===p 00000000 0000:0000 0
+               ...
+               7FFBEEAC0000-7FFBEEAC1000 r--p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
+               7FFBEEAC1000-7FFBEEB36000 r-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
+               7FFBEEB36000-7FFBEEB68000 r--p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
+               7FFBEEB68000-7FFBEEB6A000 rw-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
+               7FFBEEB6A000-7FFBEEB72000 r--p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32.dll
+               ...
+
+           The address field is the address space in the process that the
+           mapping occupies. The perms field is a set of permissions:
+
+               r: read
+               w: write
+               x: execute
+               ===: reserved
+               s: shared
+               g: guard
+               p: private
+
+           The offset field is the offset into the file/whatever; dev is the
+           device (major:minor); inode is the inode on that device. 0
+           indicates that no inode is associated with the memory region, as
+           would be the case with BSS (uninitialized data).
+
+           The pathname field will usually be the file that is backing the
+           mapping.
+
+           There are additional helpful pseudo-paths:
+
+           [cygwin-shared]
+               Global shared Cygwin process information.
+
+           [cygwin-user-shared]
+               Global shared Cygwin user information.
+
+           [peb]
+               Windows Process Environment Block.
+
+           [procinfo]
+               Cygwin process information.
+
+           [shared-user-data]
+               Shared user information.
+
+           [heap]
+               The process's heap.
+
+           [stack]
+               The initial process's (also known as the main thread's) stack.
+
+           [stack (tid <tid>)]
+               A thread's stack (where the <tid> is a thread id).
+
+           [teb (tid <tid>)]
+               Windows Thread Environment Block (where <tid> is a thread id).
+
+           [win heap <n> default shared exec grow noserial debug]
+               Windows extended heap (where <n> is a heap id) and the rest of
+               the words are heap flags:
+
+               default
+                   default heap flags
+
+               shared
+                   shareable and mapped heap flags
+
+               exec
+                   executable heap flag
+
+               grow
+                   growable heap flag
+
+               noserial
+                   do not serialize heap flag
+
+               debug
+                   debugged heap flag
+
+           If the pathname field is blank, this is an anonymous mapping as
+           obtained via mmap(2). There is no easy way to coordinate this back
+           to a process's source, short of running it through gdb(1),
+           strace(1), or similar.
+
+           pathname is shown unescaped except for newline characters, which
+           are replaced with an octal escape sequence. As a result, it is not
+           possible to determine whether the original pathname contained a
+           newline character or the literal \e012 character sequence.
+
+           If the mapping is file-backed and the file has been deleted, the
+           string " (deleted)" is appended to the pathname. Note that this is
+           ambiguous too.
 
        /proc/[pid]/mountinfo
-              This  file  contains  information  about  mount  points  in  the
-              process's mount namespace (see  mount_namespaces(7)).   It  sup‐
-              plies  various  information  (e.g.,  propagation  state, root of
-              mount for bind mounts, identifier for each mount and its parent)
-              that  is  missing  from the (older) /proc/[pid]/mounts file, and
-              fixes various other problems with that file  (e.g.,  nonextensi‐
-              bility,  failure  to distinguish per-mount versus per-superblock
-              options).
-
-              The file contains lines of the form:
-
-36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
-(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
-
-              The numbers in parentheses are labels for the  descriptions  be‐
-              low:
-
-              (1)  mount  ID:  a  unique ID for the mount (may be reused after
-                   umount(2)).
-
-              (2)  parent ID: the ID of the parent mount (or of self  for  the
-                   root of this mount namespace's mount tree).
-
-                   If  a  new  mount  is stacked on top of a previous existing
-                   mount (so that it hides the existing mount) at pathname  P,
-                   then  the  parent of the new mount is the previous mount at
-                   that location.   Thus,  when  looking  at  all  the  mounts
-                   stacked at a particular location, the top-most mount is the
-                   one that is not the parent of any other mount at  the  same
-                   location.  (Note, however, that this top-most mount will be
-                   accessible only if the longest path subprefix of P that  is
-                   a mount point is not itself hidden by a stacked mount.)
-
-                   If  the  parent mount point lies outside the process's root
-                   directory (see chroot(2)), the ID shown here won't  have  a
-                   corresponding  record in mountinfo whose mount ID (field 1)
-                   matches this parent mount ID (because mount points that lie
-                   outside  the  process's  root  directory  are  not shown in
-                   mountinfo).  As a special case of this point, the process's
-                   root mount point may have a parent mount (for the initramfs
-                   filesystem) that lies outside the process's root directory,
-                   and  an  entry  for  that  mount  point  will not appear in
-                   mountinfo.
-
-              (3)  major:minor: the value of st_dev for files on this filesys‐
-                   tem (see stat(2)).
-
-              (4)  root: the pathname of the directory in the filesystem which
-                   forms the root of this mount.
-
-              (5)  mount point: the pathname of the mount  point  relative  to
-                   the process's root directory.
-
-              (6)  mount options: per-mount options (see mount(2)).
-
-              (7)  optional   fields:   zero   or  more  fields  of  the  form
-                   "tag[:value]"; see below.
-
-              (8)  separator: the end of the optional fields is  marked  by  a
-                   single hyphen.
+           This file contains information about mount points in the process's
+           mount namespace (see mount_namespaces(7)). It supplies various
+           information (e.g., propagation state, root of mount for bind
+           mounts, identifier for each mount and its parent) that is missing
+           from the (older) /proc/[pid]/mounts file, and fixes various other
+           problems with that file (e.g., nonextensibility, failure to
+           distinguish per-mount versus per-superblock options).
+
+           The file contains lines of the form:
+
+               36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue
+               (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
+
+           The numbers in parentheses are labels for the descriptions below:
+
+           (1)
+               mount ID: a unique ID for the mount (may be reused after
+               umount(2)).
+
+           (2)
+               parent ID: the ID of the parent mount (or of self for the root
+               of this mount namespace's mount tree).
+
+               If a new mount is stacked on top of a previous existing mount
+               (so that it hides the existing mount) at pathname P, then the
+               parent of the new mount is the previous mount at that location.
+               Thus, when looking at all the mounts stacked at a particular
+               location, the top-most mount is the one that is not the parent
+               of any other mount at the same location. (Note, however, that
+               this top-most mount will be accessible only if the longest path
+               subprefix of P that is a mount point is not itself hidden by a
+               stacked mount.)
+
+               If the parent mount point lies outside the process's root
+               directory (see chroot(2)), the ID shown here won't have a
+               corresponding record in mountinfo whose mount ID (field 1)
+               matches this parent mount ID (because mount points that lie
+               outside the process's root directory are not shown in
+               mountinfo). As a special case of this point, the process's root
+               mount point may have a parent mount (for the initramfs
+               filesystem) that lies outside the process's root directory, and
+               an entry for that mount point will not appear in mountinfo.
+
+           (3)
+               major:minor: the value of st_dev for files on this filesystem
+               (see stat(2)).
+
+           (4)
+               root: the pathname of the directory in the filesystem which
+               forms the root of this mount.
+
+           (5)
+               mount point: the pathname of the mount point relative to the
+               process's root directory.
+
+           (6)
+               mount options: per-mount options (see mount(2)).
+
+           (7)
+               optional fields: zero or more fields of the form "tag[:value]";
+               see below.
+
+           (8)
+               separator: the end of the optional fields is marked by a single
+               hyphen.
+
+           (9)
+               filesystem type: the filesystem type in the form
+               "type[.subtype]".
 
-              (9)  filesystem   type:   the   filesystem   type  in  the  form
-                   "type[.subtype]".
+           (10)
+               mount source: filesystem-specific information or "none".
 
-              (10) mount source: filesystem-specific information or "none".
-
-              (11) super options: per-superblock options (see mount(2)).
+           (11)
+               super options: per-superblock options (see mount(2)).
 
        /proc/[pid]/mounts
-              This file lists all the filesystems  currently  mounted  in  the
-              process's mount namespace (see mount_namespaces(7)).  The format
-              of this file is documented in fstab(5).
+           This file lists all the filesystems currently mounted in the
+           process's mount namespace (see mount_namespaces(7)). The format of
+           this file is documented in fstab(5).
 
        /proc/[pid]/pgid
-              This read-only file  contains  the  process  group  id  for  the
-              process.
+           This read-only file contains the process group id for the process.
 
        /proc/[pid]/ppid
-              This  read-only  file  contains  the  parent  process id for the
-              process.
+           This read-only file contains the parent process id for the process.
 
        /proc/[pid]/root
-              UNIX and Linux support the idea of a  per-process  root  of  the
-              filesystem,  set  by  the chroot(2) system call.  This file is a
-              symbolic link that points to the process's root  directory,  and
-              behaves in the same way as exe, and fd/*.
+           UNIX and Linux support the idea of a per-process root of the
+           filesystem, set by the chroot(2) system call. This file is a
+           symbolic link that points to the process's root directory, and
+           behaves in the same way as exe, and fd/*.
 
        /proc/[pid]/sid
-              This read-only file contains the session id for the process.
+           This read-only file contains the session id for the process.
 
        /proc/[pid]/stat
-              Status information about the process.  This is used by ps(1).
+           Status information about the process. This is used by ps(1).
 
-              The  fields,  in order, with their proper scanf(3) format speci‐
-              fiers, are listed below.
+           The fields, in order, with their proper scanf(3) format specifiers,
+           are listed below.
 
-              (1) pid  %d
-                        The process ID.
+           (1) pid %d
+               The process ID.
 
-              (2) comm  %s
-                        The filename of the executable, in parentheses.   This
-                        is  visible  whether  or not the executable is swapped
-                        out.
-
-              (3) state  %c
-                        One of the following  characters,  indicating  process
-                        state:
-
-                        R  Runnable
-
-                        O  Running
-
-                        S  Sleeping in an interruptible wait
-
-                        D  Waiting in uninterruptible disk sleep
-
-                        Z  Zombie
-
-                        T  Stopped (on a signal) or trace stopped
-
-              (4) ppid  %d
-                        The PID of the parent of this process.
-
-              (5) pgrp  %d
-                        The process group ID of the process.
-
-              (6) session  %d
-                        The session ID of the process.
-
-              (7) tty_nr  %d
-                        The  controlling  terminal of the process.  (The minor
-                        device number is contained in the combination of  bits
-                        31  to  20  and  7 to 0; the major device number is in
-                        bits 15 to 8.)
-
-              (8) tpgid  %d
-                        The ID of the foreground process group of the control‐
-                        ling terminal of the process.
-
-              (9) flags  %u
-                        The kernel flags word of the process.
-
-              (10) minflt  %lu
-                        The  number of minor faults the process has made which
-                        have not required loading a memory page from disk.
-
-              (11) cminflt  %lu
-                        The number of minor faults that the process's  waited-
-                        for children have made.
-
-              (12) majflt  %lu
-                        The  number of major faults the process has made which
-                        have required loading a memory page from disk.
-
-              (13) cmajflt  %lu
-                        The number of major faults that the process's  waited-
-                        for children have made.
-
-              (14) utime  %lu
-                        Amount of time that this process has been scheduled in
-                        user  mode,  measured  in  clock  ticks   (divide   by
-                        sysconf(_SC_CLK_TCK)).    This  includes  guest  time,
-                        guest_time (time spent running a virtual CPU, see  be‐
-                        low),  so  that applications that are not aware of the
-                        guest time field do not lose that time from their cal‐
-                        culations.
-
-              (15) stime  %lu
-                        Amount of time that this process has been scheduled in
-                        kernel  mode,  measured  in  clock  ticks  (divide  by
-                        sysconf(_SC_CLK_TCK)).
-
-              (16) cutime  %ld
-                        Amount of time that this process's waited-for children
-                        have been scheduled in user mode,  measured  in  clock
-                        ticks  (divide  by  sysconf(_SC_CLK_TCK)).   (See also
-                        times(2).)   This  includes  guest  time,  cguest_time
-                        (time spent running a virtual CPU, see below).
-
-              (17) cstime  %ld
-                        Amount of time that this process's waited-for children
-                        have been scheduled in kernel mode, measured in  clock
-                        ticks (divide by sysconf(_SC_CLK_TCK)).
-
-              (18) priority  %ld
-                        For  processes  running  a real-time scheduling policy
-                        (policy below; see sched_setscheduler(2)), this is the
-                        negated  scheduling  priority,  minus  one; that is, a
-                        number in the range -2 to -100, corresponding to real-
-                        time  priorities 1 to 99.  For processes running under
-                        a non-real-time scheduling policy,  this  is  the  raw
-                        nice value (setpriority(2)) as represented in the ker‐
-                        nel.  The kernel stores nice values as numbers in  the
-                        range 0 (high) to 39 (low), corresponding to the user-
-                        visible nice range of -20 to 19.
-
-              (19) nice  %ld
-                        The nice value (see setpriority(2)), a  value  in  the
-                        range 19 (low priority) to -20 (high priority).
-
-              (20) num_threads  %ld
-                        Number of threads in this process.
-
-              (21) itrealvalue  %ld
-                        The time in jiffies before the next SIGALRM is sent to
-                        the process due to an interval timer.  This  field  is
-                        no longer maintained, and is hard coded as 0.
-
-              (22) starttime  %llu
-                        The  time  the process started after system boot.  The
-                        value  is  expressed  in  clock   ticks   (divide   by
-                        sysconf(_SC_CLK_TCK)).
-
-              (23) vsize  %lu
-                        Virtual memory size in bytes.
-
-              (24) rss  %ld
-                        Resident  Set Size: number of pages the process has in
-                        real memory.  This is just the pages which  count  to‐
-                        ward  text,  data,  or stack space.  This does not in‐
-                        clude pages which have not been demand-loaded  in,  or
-                        which are swapped out.
-
-              (25) rsslim  %lu
-                        Current soft limit in bytes on the rss of the process;
-                        see the description of RLIMIT_RSS in getrlimit(2).
+           (2) comm %s
+               The filename of the executable, in parentheses. This is visible
+               whether or not the executable is swapped out.
+
+           (3) state %c
+               One of the following characters, indicating process state:
+
+               R
+                   Runnable
+
+               O
+                   Running
+
+               S
+                   Sleeping in an interruptible wait
+
+               D
+                   Waiting in uninterruptible disk sleep
+
+               Z
+                   Zombie
+
+               T
+                   Stopped (on a signal) or trace stopped
+
+           (4) ppid %d
+               The PID of the parent of this process.
+
+           (5) pgrp %d
+               The process group ID of the process.
+
+           (6) session %d
+               The session ID of the process.
+
+           (7) tty_nr %d
+               The controlling terminal of the process. (The minor device
+               number is contained in the combination of bits 31 to 20 and 7
+               to 0; the major device number is in bits 15 to 8.)
+
+           (8) tpgid %d
+               The ID of the foreground process group of the controlling
+               terminal of the process.
+
+           (9) flags %u
+               The kernel flags word of the process.
+
+           (10) minflt %lu
+               The number of minor faults the process has made which have not
+               required loading a memory page from disk.
+
+           (11) cminflt %lu
+               The number of minor faults that the process's waited-for
+               children have made.
+
+           (12) majflt %lu
+               The number of major faults the process has made which have
+               required loading a memory page from disk.
+
+           (13) cmajflt %lu
+               The number of major faults that the process's waited-for
+               children have made.
+
+           (14) utime %lu
+               Amount of time that this process has been scheduled in user
+               mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).
+               This includes guest time, guest_time (time spent running a
+               virtual CPU, see below), so that applications that are not
+               aware of the guest time field do not lose that time from their
+               calculations.
+
+           (15) stime %lu
+               Amount of time that this process has been scheduled in kernel
+               mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK)).
+
+           (16) cutime %ld
+               Amount of time that this process's waited-for children have
+               been scheduled in user mode, measured in clock ticks (divide by
+               sysconf(_SC_CLK_TCK)). (See also times(2).) This includes guest
+               time, cguest_time (time spent running a virtual CPU, see
+               below).
+
+           (17) cstime %ld
+               Amount of time that this process's waited-for children have
+               been scheduled in kernel mode, measured in clock ticks (divide
+               by sysconf(_SC_CLK_TCK)).
+
+           (18) priority %ld
+               For processes running a real-time scheduling policy (policy
+               below; see sched_setscheduler(2)), this is the negated
+               scheduling priority, minus one; that is, a number in the range
+               -2 to -100, corresponding to real-time priorities 1 to 99. For
+               processes running under a non-real-time scheduling policy, this
+               is the raw nice value (setpriority(2)) as represented in the
+               kernel. The kernel stores nice values as numbers in the range 0
+               (high) to 39 (low), corresponding to the user-visible nice
+               range of -20 to 19.
+
+           (19) nice %ld
+               The nice value (see setpriority(2)), a value in the range 19
+               (low priority) to -20 (high priority).
+
+           (20) num_threads %ld
+               Number of threads in this process.
+
+           (21) itrealvalue %ld
+               The time in jiffies before the next SIGALRM is sent to the
+               process due to an interval timer. This field is no longer
+               maintained, and is hard coded as 0.
+
+           (22) starttime %llu
+               The time the process started after system boot. The value is
+               expressed in clock ticks (divide by sysconf(_SC_CLK_TCK)).
+
+           (23) vsize %lu
+               Virtual memory size in bytes.
+
+           (24) rss %ld
+               Resident Set Size: number of pages the process has in real
+               memory. This is just the pages which count toward text, data,
+               or stack space. This does not include pages which have not been
+               demand-loaded in, or which are swapped out.
+
+           (25) rsslim %lu
+               Current soft limit in bytes on the rss of the process; see the
+               description of RLIMIT_RSS in getrlimit(2).
 
        /proc/[pid]/statm
-              Provides information about memory usage, measured in pages.  The
-              columns are:
+           Provides information about memory usage, measured in pages. The
+           columns are:
 
-                  size       (1) total program size
-                             (same as VmSize in /proc/[pid]/status)
-                  resident   (2) resident set size
-                             (same as VmRSS in /proc/[pid]/status)
-                  shared     (3) number of resident shared pages (i.e., backed by a file)
-                             (same as RssFile+RssShmem in /proc/[pid]/status)
-                  text       (4) text (code)
-                  lib        (5) library
-                  data       (6) data + stack
-                  dt         (7) dirty pages (always 0)
-
-       /proc/[pid]/status
-              Provides   much  of  the  information  in  /proc/[pid]/stat  and
-              /proc/[pid]/statm in a format that's easier for humans to parse.
-              Here's an example:
-
-                  $ cat /proc/$$/status
-                  Name:   bash
-                  Umask:  0022
-                  State:  S (sleeping)
-                  Tgid:   17248
-                  Pid:    17248
-                  PPid:   17200
-                  Uid:    1000    1000    1000    1000
-                  Gid:    100     100     100     100
-                  VmSize:     131168 kB
-                  VmLck:           0 kB
-                  VmRSS:       13484 kB
-                  VmData:      10332 kB
-                  VmStk:         136 kB
-                  VmExe:         992 kB
-                  VmLib:        2104 kB
-                  SigPnd: 0000000000000000
-                  SigBlk: 0000000000010000
-                  SigIgn: 0000000000384004
-
-              The fields are as follows:
-
-              * Name: Command run by this process.
-
-              * Umask:  Process umask, expressed in octal with a leading zero;
-                see umask(2).
-
-              * State: Current state of the process.  One of  "R  (runnable)",
-                "O   (running)",   "S   (sleeping)",   "D  (disk  sleep)",  "T
-                (stopped)", "T (tracing stop)", or "Z (zombie)".
-
-              * Tgid: Thread group ID (i.e., Process ID).
-
-              * Pid: Thread ID (see gettid(2)).
-
-              * PPid: PID of parent process.
-
-              * Uid, Gid: Real, effective,  saved  set,  and  filesystem  UIDs
-                (GIDs).
-
-              * VmSize: Virtual memory size.
-
-              * VmLck: Locked memory size (see mlock(2)).
-
-              * VmRSS: Resident set size.
-
-              * VmData, VmStk, VmExe: Size of data, stack, and text segments.
+               size       (1) total program size
+                          (same as VmSize in /proc/[pid]/status)
+               resident   (2) resident set size
+                          (same as VmRSS in /proc/[pid]/status)
+               shared     (3) number of resident shared pages (i.e., backed by a file)
+                          (same as RssFile+RssShmem in /proc/[pid]/status)
+               text       (4) text (code)
+               lib        (5) library
+               data       (6) data + stack
+               dt         (7) dirty pages (always 0)
+
+           /proc/[pid]/status Provides much of the information in
+           /proc/[pid]/stat and /proc/[pid]/statm in a format that's easier
+           for humans to parse. Here's an example:
+
+               $ cat /proc/$$/status
+               Name:   bash
+               Umask:  0022
+               State:  S (sleeping)
+               Tgid:   17248
+               Pid:    17248
+               PPid:   17200
+               Uid:    1000    1000    1000    1000
+               Gid:    100     100     100     100
+               VmSize:     131168 kB
+               VmLck:           0 kB
+               VmRSS:       13484 kB
+               VmData:      10332 kB
+               VmStk:         136 kB
+               VmExe:         992 kB
+               VmLib:        2104 kB
+               SigPnd: 0000000000000000
+               SigBlk: 0000000000010000
+               SigIgn: 0000000000384004
+
+           The fields are as follows:
+
+           •   Name: Command run by this process.
+
+           •   Umask: Process umask, expressed in octal with a leading zero;
+               see umask(2).
+
+           •   State: Current state of the process. One of "R (runnable)", "O
+               (running)", "S (sleeping)", "D (disk sleep)", "T (stopped)", "T
+               (tracing stop)", or "Z (zombie)".
+
+           •   Tgid: Thread group ID (i.e., Process ID).
+
+           •   Pid: Thread ID (see gettid(2)).
+
+           •   PPid: PID of parent process.
+
+           •   Uid, Gid: Real, effective, saved set, and filesystem UIDs
+               (GIDs).
+
+           •   VmSize: Virtual memory size.
+
+           •   VmLck: Locked memory size (see mlock(2)).
+
+           •   VmRSS: Resident set size.
+
+           •   VmData, VmStk, VmExe: Size of data, stack, and text segments.
 
-              * VmLib: Shared library code size.
+           •   VmLib: Shared library code size.
 
-              * SigPnd:  Number of signals pending for process as a whole (see
-                pthreads(7) and signal(7)).
+           •   SigPnd: Number of signals pending for process as a whole (see
+               pthreads(7) and signal(7)).
 
-              * SigBlk, SigIgn: Masks indicating signals being blocked and ig‐
-                nored (see signal(7)).
+           •   SigBlk, SigIgn: Masks indicating signals being blocked and
+               ignored (see signal(7)).
 
        /proc/[pid]/uid
-              This read-only file contains the user id for the process.
+           This read-only file contains the user id for the process.
 
        /proc/[pid]/winexename
-              This  read-only  file  contains the Windows pathname of the exe‐
-              cuted command.
+           This read-only file contains the Windows pathname of the executed
+           command.
 
        /proc/[pid]/winpid
-              This read-only file contains the  Windows  process  id  for  the
-              process.
+           This read-only file contains the Windows process id for the
+           process.
 
        /proc/cpuinfo
-              This  is  a  collection of CPU and system architecture dependent
-              items, for each supported architecture a  different  list.   Two
-              common  entries  are  processor  which  gives CPU number and bo‐
-              gomips; a system constant that is calculated during kernel  ini‐
-              tialization.   SMP  machines have information for each CPU.  The
-              lscpu(1) command gathers its information from this file.
+           This is a collection of CPU and system architecture dependent
+           items, for each supported architecture a different list. Two common
+           entries are processor which gives CPU number and bogomips; a system
+           constant that is calculated during kernel initialization. SMP
+           machines have information for each CPU. The lscpu(1) command
+           gathers its information from this file.
 
        /proc/cygdrive
-              This file is a symbolic link that points to the  user's  Windows
-              mapped drive mount point, and behaves in the same way as root.
+           This file is a symbolic link that points to the user's Windows
+           mapped drive mount point, and behaves in the same way as root.
 
        /proc/devices
-              Text  listing  of  major numbers and device groups.  This can be
-              used by MAKEDEV scripts for consistency with the kernel.
+           Text listing of major numbers and device groups. This can be used
+           by MAKEDEV scripts for consistency with the kernel.
 
        /proc/filesystems
-              A text listing of the filesystems which  are  supported  by  the
-              kernel,  namely  filesystems which were compiled into the kernel
-              or  whose  kernel  modules  are  currently  loaded.   (See  also
-              filesystems(5).)   If  a filesystem is marked with "nodev", this
-              means that it does not require a  block  device  to  be  mounted
-              (e.g., virtual filesystem, network filesystem).
-
-              Incidentally, this file may be used by mount(8) when no filesys‐
-              tem is specified and it didn't manage to determine the  filesys‐
-              tem  type.   Then  filesystems  contained in this file are tried
-              (excepted those that are marked with "nodev").
+           A text listing of the filesystems which are supported by the
+           kernel, namely filesystems which were compiled into the kernel or
+           whose kernel modules are currently loaded. (See also
+           filesystems(5).) If a filesystem is marked with "nodev", this means
+           that it does not require a block device to be mounted (e.g.,
+           virtual filesystem, network filesystem).
+
+           Incidentally, this file may be used by mount(8) when no filesystem
+           is specified and it didn't manage to determine the filesystem type.
+           Then filesystems contained in this file are tried (excepted those
+           that are marked with "nodev").
 
        /proc/loadavg
-              The first three fields in this file  are  load  average  figures
-              giving  the number of jobs in the run queue (state R) or waiting
-              for disk I/O (state D) averaged over 1, 5, and 15 minutes.  They
-              are  the same as the load average numbers given by uptime(1) and
-              other programs.  The fourth field consists of two numbers  sepa‐
-              rated  by a slash (/).  The first of these is the number of cur‐
-              rently runnable kernel scheduling entities (processes, threads).
-              The value after the slash is the number of kernel scheduling en‐
-              tities that currently exist on the system.
+           The first three fields in this file are load average figures giving
+           the number of jobs in the run queue (state R) or waiting for disk
+           I/O (state D) averaged over 1, 5, and 15 minutes. They are the same
+           as the load average numbers given by uptime(1) and other programs.
+           The fourth field consists of two numbers separated by a slash (/).
+           The first of these is the number of currently runnable kernel
+           scheduling entities (processes, threads). The value after the slash
+           is the number of kernel scheduling entities that currently exist on
+           the system.
 
        /proc/meminfo
-              This file reports statistics about memory usage on  the  system.
-              It is used by free(1) to report the amount of free and used mem‐
-              ory (both physical and swap) on the system as well as the shared
-              memory  and  buffers  used by the kernel.  Each line of the file
-              consists of a parameter name, followed by a colon, the value  of
-              the  parameter,  and an option unit of measurement (e.g., "kB").
-              The list below describes the  parameter  names  and  the  format
-              specifier  required  to  read  the field value.  Some fields are
-              displayed only if the kernel was  configured  with  various  op‐
-              tions; those dependencies are noted in the list.
-
-              MemTotal %lu
-                     Total usable RAM (i.e., physical RAM minus a few reserved
-                     bits and the kernel binary code).
-
-              MemFree %lu
-                     The sum of LowFree+HighFree.
-
-              HighTotal %lu
-                     Total amount of highmem.
-
-              HighFree %lu
-                     Amount of free highmem.
-
-              LowTotal %lu
-                     Total amount of lowmem.  Lowmem is memory  which  can  be
-                     used  for everything that highmem can be used for, but it
-                     is also available for the kernel's use for its  own  data
-                     structures.  Bad things happen when you're out of lowmem.
+           This file reports statistics about memory usage on the system. It
+           is used by free(1) to report the amount of free and used memory
+           (both physical and swap) on the system as well as the shared memory
+           and buffers used by the kernel. Each line of the file consists of a
+           parameter name, followed by a colon, the value of the parameter,
+           and an option unit of measurement (e.g., "kB"). The list below
+           describes the parameter names and the format specifier required to
+           read the field value. Some fields are displayed only if the kernel
+           was configured with various options; those dependencies are noted
+           in the list.
+
+           MemTotal %lu
+               Total usable RAM (i.e., physical RAM minus a few reserved bits
+               and the kernel binary code).
+
+           MemFree %lu
+               The sum of LowFree+HighFree.
+
+           HighTotal %lu
+               Total amount of highmem.
+
+           HighFree %lu
+               Amount of free highmem.
+
+           LowTotal %lu
+               Total amount of lowmem. Lowmem is memory which can be used for
+               everything that highmem can be used for, but it is also
+               available for the kernel's use for its own data structures. Bad
+               things happen when you're out of lowmem.
 
-              LowFree %lu
-                     Amount of free lowmem.
+           LowFree %lu
+               Amount of free lowmem.
 
-              SwapTotal %lu
-                     Total amount of swap space available.
+           SwapTotal %lu
+               Total amount of swap space available.
 
-              SwapFree %lu
-                     Amount of swap space that is currently unused.
+           SwapFree %lu
+               Amount of swap space that is currently unused.
 
        /proc/misc
-              Text  listing  of minor device numbers and names of devices with
-              major device number of the misc device group.  This can be  used
-              by MAKEDEV scripts for consistency with the kernel.
+           Text listing of minor device numbers and names of devices with
+           major device number of the misc device group. This can be used by
+           MAKEDEV scripts for consistency with the kernel.
 
        /proc/mounts
-              With the introduction of per-process mount namespaces, this file
-              became a link to /proc/self/mounts, which lists the mount points
-              of  the  process's own mount namespace.  The format of this file
-              is documented in fstab(5).
+           With the introduction of per-process mount namespaces, this file
+           became a link to /proc/self/mounts, which lists the mount points of
+           the process's own mount namespace. The format of this file is
+           documented in fstab(5).
 
        /proc/net
-              This directory contains various files  and  subdirectories  con‐
-              taining  information about the networking layer.  The files con‐
-              tain ASCII structures and are, therefore, readable with  cat(1).
-              However, the standard netstat(8) suite provides much cleaner ac‐
-              cess to these files.
+           This directory contains various files and subdirectories containing
+           information about the networking layer. The files contain ASCII
+           structures and are, therefore, readable with cat(1). However, the
+           standard netstat(8) suite provides much cleaner access to these
+           files.
 
        /proc/net/if_inet6
-              This file contains information about IP V6  interface  adapters,
-              if used.  Each line represents an IP V6 interface adapter.
-
-                  fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
-                  fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
-                  fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
-                  fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
-                  20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
-                  00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
-                                             (1)  (2)(3)(4)(5)  (6)
-
-              The fields in each line are:
-
-              (1)  The IP V6 address of the interface adapter.
-
-              (2)  The IP V6 interface adapter index.
-
-              (3)  The prefix length of the IP V6 interface address.
+           This file contains information about IP V6 interface adapters, if
+           used. Each line represents an IP V6 interface adapter.
 
-              (4)  The scope of the IP V6 interface address.
+               fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5-A3AC-4DB0-A308-8EE94E1406A4}
+               fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972-0918-41FC-851B-090C446C7D1C}
+               fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD-DFAC-4398-AA85-FB33E17E38EA}
+               fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53-1659-4065-BDA5-F41162250E03}
+               20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8-99CF-4220-8715-6FDF268B002F}
+               00000000000000000000000000000001 01 80 10 80 {2B5345AC-7502-11EA-AC73-806E6F6E6963}
+                                          (1)  (2)(3)(4)(5)  (6)
+
+           The fields in each line are:
+
+           (1)
+               The IP V6 address of the interface adapter.
+
+           (2)
+               The IP V6 interface adapter index.
+
+           (3)
+               The prefix length of the IP V6 interface address.
+
+           (4)
+               The scope of the IP V6 interface address.
 
-              (5)  The state of the IP V6 interface address.
+           (5)
+               The state of the IP V6 interface address.
 
-              (6)  The DUID/GUID/UUID of the IP V6 interface adapter.
+           (6)
+               The DUID/GUID/UUID of the IP V6 interface adapter.
 
-              The last number exists only for compatibility reasons and is al‐
-              ways 1.
+           The last number exists only for compatibility reasons and is always
+           1.
 
        /proc/partitions
-              Contains the major and minor numbers of each partition  as  well
-              as the number of 1024-byte blocks and the partition name.
+           Contains the major and minor numbers of each partition as well as
+           the number of 1024-byte blocks and the partition name.
 
        /proc/registry
-              Under  Windows,  this directory contains subdirectories for reg‐
-              istry paths, keys, and subkeys, and  files  named  for  registry
-              values which contain registry data, for the current process.
+           Under Windows, this directory contains subdirectories for registry
+           paths, keys, and subkeys, and files named for registry values which
+           contain registry data, for the current process.
 
        /proc/registry32
-              Under 64 bit Windows, this directory contains subdirectories for
-              registry paths, keys, and subkeys, and files named for  registry
-              values which contain registry data, for 32 bit processes.
+           Under 64 bit Windows, this directory contains subdirectories for
+           registry paths, keys, and subkeys, and files named for registry
+           values which contain registry data, for 32 bit processes.
 
        /proc/registry64
-              Under 64 bit Windows, this directory contains subdirectories for
-              registry paths, keys, and subkeys, and files named for  registry
-              values which contain registry data, for 64 bit processes.
+           Under 64 bit Windows, this directory contains subdirectories for
+           registry paths, keys, and subkeys, and files named for registry
+           values which contain registry data, for 64 bit processes.
 
        /proc/self
-              This  directory  refers  to  the  process  accessing  the  /proc
-              filesystem, and is identical to the /proc directory named by the
-              process ID of the same process.
+           This directory refers to the process accessing the /proc
+           filesystem, and is identical to the /proc directory named by the
+           process ID of the same process.
 
        /proc/stat
-              kernel/system statistics.  Varies with architecture.  Common en‐
-              tries include:
+           kernel/system statistics. Varies with architecture. Common entries
+           include:
 
-              cpu 10132153 0 3084719 46828483
-              cpu0 1393280 0 572056 13343292
-                     The  amount  of  time,  measured  in  units  of   USER_HZ
-                     (1/100ths   of   a  second  on  most  architectures,  use
-                     sysconf(_SC_CLK_TCK) to obtain the right value), that the
-                     system  ("cpu"  line)  or  the specific CPU ("cpuN" line)
-                     spent in various states:
+           cpu 10132153 0 3084719 46828483, cpu0 1393280 0 572056 13343292
+               The amount of time, measured in units of USER_HZ (1/100ths of a
+               second on most architectures, use sysconf(_SC_CLK_TCK) to
+               obtain the right value), that the system ("cpu" line) or the
+               specific CPU ("cpuN" line) spent in various states:
 
-                     user   (1) Time spent in user mode.
+               user
+                   (1) Time spent in user mode.
 
-                     nice   (2) Time spent in  user  mode  with  low  priority
-                            (nice).
+               nice
+                   (2) Time spent in user mode with low priority (nice).
 
-                     system (3) Time spent in system mode.
+               system
+                   (3) Time spent in system mode.
 
-                     idle   (4) Time spent in the idle task.
+               idle
+                   (4) Time spent in the idle task.
 
-              page 5741 1808
-                     The  number  of  pages the system paged in and the number
-                     that were paged out (from disk).
+           page 5741 1808
+               The number of pages the system paged in and the number that
+               were paged out (from disk).
 
-              swap 1 0
-                     The number of swap pages that have been  brought  in  and
-                     out.
+           swap 1 0
+               The number of swap pages that have been brought in and out.
 
-              intr 1462898
-                     This number of interrupts serviced.
+           intr 1462898
+               This number of interrupts serviced.
 
-              ctxt 115315
-                     The number of context switches that the system underwent.
+           ctxt 115315
+               The number of context switches that the system underwent.
 
-              btime 769041601
-                     boot   time,  in  seconds  since  the  Epoch,  1970-01-01
-                     00:00:00 +0000 (UTC).
+           btime 769041601
+               boot time, in seconds since the Epoch, 1970-01-01 00:00:00
+               +0000 (UTC).
 
        /proc/swaps
-              Swap areas in use.  See also swapon(8).
+           Swap areas in use. See also swapon(8).
 
        /proc/sys
-              This directory contains a number  of  files  and  subdirectories
-              corresponding  to kernel variables.  These variables can be read
-              using the /proc filesystem, and the (deprecated) sysctl(2)  sys‐
-              tem call.
-
-              String values may be terminated by either '\0' or '\n'.
-
-              Integer  and  long values may be written either in decimal or in
-              hexadecimal notation (e.g. 0x3FFF).  When writing multiple inte‐
-              ger or long values, these may be separated by any of the follow‐
-              ing whitespace characters: ' ', '\t', or '\n'.  Using other sep‐
-              arators leads to the error EINVAL.
+           This directory contains a number of files and subdirectories
+           corresponding to kernel variables. These variables can be read
+           using the /proc filesystem, and the (deprecated) sysctl(2) system
+           call.
+
+           String values may be terminated by either ''\0'' or ''\n''.
+
+           Integer and long values may be written either in decimal or in
+           hexadecimal notation (e.g. 0x3FFF). When writing multiple integer
+           or long values, these may be separated by any of the following
+           whitespace characters: '' '', ''\t'', or ''\n''. Using other
+           separators leads to the error EINVAL.
 
        /proc/sysvipc
-              Subdirectory  containing  the  pseudo-files  msg,  sem  and shm.
-              These files list the System V Interprocess  Communication  (IPC)
-              objects  (respectively:  message  queues, semaphores, and shared
-              memory) that currently exist on the  system,  providing  similar
-              information  to  that  available  via ipcs(1).  These files have
-              headers and are formatted (one IPC object per line) for easy un‐
-              derstanding.  svipc(7) provides further background on the infor‐
-              mation shown by these files.
+           Subdirectory containing the pseudo-files msg, sem and shm. These
+           files list the System V Interprocess Communication (IPC) objects
+           (respectively: message queues, semaphores, and shared memory) that
+           currently exist on the system, providing similar information to
+           that available via ipcs(1). These files have headers and are
+           formatted (one IPC object per line) for easy understanding.
+           svipc(7) provides further background on the information shown by
+           these files.
 
        /proc/uptime
-              This file contains two numbers (values in seconds):  the  uptime
-              of  the  system (including time spent in suspend) and the amount
-              of time spent in the idle process.
+           This file contains two numbers (values in seconds): the uptime of
+           the system (including time spent in suspend) and the amount of time
+           spent in the idle process.
 
        /proc/version
-              This string identifies the kernel version that is currently run‐
-              ning.  For example:
+           This string identifies the kernel version that is currently
+           running. For example:
 
-  CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC
+               CYGWIN_NT-10.0-18363 version 3.1.7-340.x86_64 (corinna@calimero) (gcc version 9.3.0 20200312 (Fedora Cygwin 9.3.0-1) (GCC) ) 2020-08-22 17:48 UTC
 
-NOTES
-       Many  files  contain  strings  (e.g., the environment and command line)
-       that are in the internal format,  with  subfields  terminated  by  null
-       bytes  ('\0').   When  inspecting such files, you may find that the re‐
-       sults are more readable if you use a command of the following  form  to
-       display them:
+           Many files contain strings (e.g., the environment and command line)
+           that are in the internal format, with subfields terminated by null
+           bytes (''\0''). When inspecting such files, you may find that the
+           results are more readable if you use a command of the following
+           form to display them:
 
            $ cat -A file
 
@@ -848,13 +856,13 @@ NOTES
        thing that needs to be updated very often.
 
 SEE ALSO
-       cat(1), find(1),  free(1),  ps(1),  pstree(1),  tr(1),  uptime(1),  ch‐
-       root(2),  mmap(2),  readlink(2),  syslog(2), hier(7), arp(8), mount(8),
+       cat(1), find(1), free(1), ps(1), pstree(1), tr(1), uptime(1),
+       chroot(2), mmap(2), readlink(2), syslog(2), hier(7), arp(8), mount(8),
        netstat(8), route(8).
 
 COLOPHON
-       This page is part of  version  3  of  Cygwin.   A  description  of  the
-       project,  information  about  reporting bugs, and the latest documenta‐
-       tion, can be found at https://cygwin.com/docs.html.
+       This page is part of version 3 of Cygwin. A description of the project,
+       information about reporting bugs, and the latest documentation, can be
+       found at https://cygwin.com/docs.html.
 
 Cygwin                            2020-11-11                           PROC(5)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-13 14:25 proc(5) and xml version Brian Inglis
@ 2020-11-16 12:07 ` Corinna Vinschen
  2020-11-16 13:41   ` Jon Turney
  2020-11-16 23:15   ` Brian Inglis
  0 siblings, 2 replies; 7+ messages in thread
From: Corinna Vinschen @ 2020-11-16 12:07 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Hi Brain,

On Nov 13 07:25, Brian Inglis wrote:
> Hacked a Cygwin proc.5 man page FMOI over time, by combing through
> fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
> as in the build, man width 80 output from both, and diff (all attached).

Nice idea!

> Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
> ...?) and/or whether there may be xml remediation possible to generate
> verbatim output left justified with zero margin, and character value
> displays, the major output issues in the diff? Content feedback is also
> welcome.

This could replace the pathnames-proc and pathnames-proc-registry
sections in specialnames.xml. 

I think by using the refentry markup the man page would be generated
automagically, but Jon (CCed) is the definitiv source of wisdom here.

A few comments in terms of the content...

> The
> .I /proc/[pid]
> subdirectories are visible when iterating through
> .I /proc
> with
> .BR getdents (2)
      ^^^^^^^^

We don't have that system call.  readdir(2) is the matching, exposed API.

> .I /proc/[pid]/environ
> This read-only file contains the initial environment that was set
> when the currently executing program was started via
> .BR execve (2).

Neither Cygwin nor Windows maintain the initial environment.  What you
get is the current environment, with all changes performed by the process
itself.

> If, after an
> .BR execve (2),
> the process modifies its environment
> (e.g., by calling functions such as
> .BR putenv (3)
> or modifying the
> .BR environ (7)
> variable directly),
> this file will
> .I not
> reflect those changes.

Yeah, see above.

> .IR /proc/[pid]/mounts
> file, and fixes various other problems with that file
> (e.g., nonextensibility,
> failure to distinguish per-mount versus per-superblock options).
> .IP
> The file contains lines of the form:
> .IP
> .in 0n
> .EX
> 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
> (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
> .in
> .EE
> .IP
> The numbers in parentheses are labels for the descriptions below:
> .RS 7
> .TP 5
> (1)
> mount ID: a unique ID for the mount (may be reused after
> .BR umount (2)).
> .TP
> (2)
> parent ID: the ID of the parent mount
> (or of self for the root of this mount namespace's mount tree).

Has no meaning in Cygwin, it's just the same number as (1).

> If the parent mount point lies outside the process's root directory (see
> .BR chroot (2)),
> the ID shown here won't have a corresponding record in

That affects chroot as well.  I'd rather not mention this function
call anyway, it was a bad idea in the first place.

> .I mountinfo
> whose mount ID (field 1) matches this parent mount ID
> (because mount points that lie outside the process's root directory
> are not shown in
> .IR mountinfo ).
> As a special case of this point,
> the process's root mount point may have a parent mount
> (for the initramfs filesystem) that lies
> .\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
> .\" mtk: In the initial mount namespace, this hidden ID has the value 0
> outside the process's root directory,
> and an entry for that mount point will not appear in

I think this can entirely go away either.

> (7)
> optional fields: zero or more fields of the form "tag[:value]"; see below.

This field doesn't exist on Cygwin.  Do we have to update the output
to follow current Linux?

> .TP
> (8)
> separator: the end of the optional fields is marked by a single hyphen.

So that's field 7.

> .TP
> (9)
> filesystem type: the filesystem type in the form "type[.subtype]".

Field 8

> .TP
> (10)
> mount source: filesystem-specific information or "none".

Field 9

> .TP
> (11)
> super options: per-superblock options (see
> .BR mount (2)).

Field 10, always ro or rw, so it's just the info if the filesystem is
read-only or read-write

> .I /proc/[pid]/stat
> Status information about the process.
> This is used by
> .BR ps (1).

Only by ps from the procps package

> One of the following characters, indicating process state:
> .RS
> .IP R 3
> Runnable
> .IP O
> Running

We don't generate O, but I don't quite grok why.  There is a per-Thread
StateRunning state in Windows, so I don't see why the code doesn't just
use it.  A process with a single thread in StateRunning is running, no?

> .IP S
> Sleeping in an interruptible wait
> .IP D
> Waiting in uninterruptible
> disk sleep

We don't know the 'D' state.

> (14) \fIutime\fP \ %lu
> Amount of time that this process has been scheduled in user mode,
> measured in clock ticks (divide by
> .IR sysconf(_SC_CLK_TCK) ).

This includes Cygwin time.

> This includes guest time, \fIguest_time\fP
> (time spent running a virtual CPU, see below),
> so that applications that are not aware of the guest time field
> do not lose that time from their calculations.

The guest time hints should go away, I think.

> (16) \fIcutime\fP \ %ld
> (17) \fIcstime\fP \ %ld

Faked.

> (20) \fInum_threads\fP \ %ld
> Number of threads in this process.

Always 0, albeit we probably could print this info.

> This file is a symbolic link that points to the user's
> Windows mapped drive mount point, and behaves in the same way as
> .IR root .

I don't understand what you're trying to say here.

> Incidentally, this file may be used by
> .BR mount (8)
> when no filesystem is specified and it didn't manage to determine the
> filesystem type.
> Then filesystems contained in this file are tried
> (excepted those that are marked with "nodev").

Doesn't work that way on Cygwin

> .I /proc/sys
> This directory contains a number of files
> and subdirectories corresponding to kernel variables.
> These variables can be read using
> the \fI/proc\fP filesystem, and the (deprecated)
> .BR sysctl (2)
> system call.

This is wrong for Cygwin.  /proc/sys is kind of a mount point, pointing
into the native NT object namespace.  E.g., /proc/sys/GLOBAL?? is the
native NT directory containing native NT object namespace symlinks
constituting the DOS device names as returned by the QueryDosDevice
WinAPI call.  Global?? is the global subdir available to all sessions.
Session-specific ?? dirs exist

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#nt-namespaces may be helpful here.

> These files list the System V Interprocess Communication (IPC) objects
> (respectively: message queues, semaphores, and shared memory)
> that currently exist on the system,
> providing similar information to that available via
> .BR ipcs (1).
> These files have headers and are formatted (one IPC object per line)
> for easy understanding.

> .BR svipc (7)
> provides further background on the information shown by these files.

This should be replaced with the info that the files in sysvipc
are only available if cygserver is running, just as SYSV ipc, too.

> This string identifies the kernel version that is currently running.
                             ^^^^^^
                             Cygwin
> .SH COLOPHON
> This page is part of version 3 of

I would skip that "of version 3" part

Other than these minor nits, this looks great!


Thanks,
Corinna

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-16 12:07 ` Corinna Vinschen
@ 2020-11-16 13:41   ` Jon Turney
  2020-11-16 23:21     ` Brian Inglis
  2020-11-16 23:15   ` Brian Inglis
  1 sibling, 1 reply; 7+ messages in thread
From: Jon Turney @ 2020-11-16 13:41 UTC (permalink / raw)
  To: cygwin-patches

On 16/11/2020 12:07, Corinna Vinschen wrote:
> Hi Brain,
> 
> On Nov 13 07:25, Brian Inglis wrote:
>> Hacked a Cygwin proc.5 man page FMOI over time, by combing through
>> fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
>> as in the build, man width 80 output from both, and diff (all attached).
> 
> Nice idea!
> 

Yes, nice work.

>> Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
>> ...?) and/or whether there may be xml remediation possible to generate
>> verbatim output left justified with zero margin, and character value
>> displays, the major output issues in the diff? Content feedback is also
>> welcome.
> 
> This could replace the pathnames-proc and pathnames-proc-registry
> sections in specialnames.xml.
> 
> I think by using the refentry markup the man page would be generated
> automagically, but Jon (CCed) is the definitiv source of wisdom here.

Yes, all refentries in the UG should have manpages generated from them 
(only cygwin utilities currently).

The install rule in the Makefile would probably need extending to 
install *.5 to man5dir.

These would then be included in the cygwin-doc package.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-16 12:07 ` Corinna Vinschen
  2020-11-16 13:41   ` Jon Turney
@ 2020-11-16 23:15   ` Brian Inglis
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Inglis @ 2020-11-16 23:15 UTC (permalink / raw)
  To: cygwin-patches

On 2020-11-16 05:07, Corinna Vinschen wrote:
> Hi Brain,
> 
> On Nov 13 07:25, Brian Inglis wrote:
>> Hacked a Cygwin proc.5 man page FMOI over time, by combing through
>> fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
>> as in the build, man width 80 output from both, and diff (all attached).
> 
> Nice idea!
> 
>> Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
>> ...?) and/or whether there may be xml remediation possible to generate
>> verbatim output left justified with zero margin, and character value
>> displays, the major output issues in the diff? Content feedback is also
>> welcome.
> 
> This could replace the pathnames-proc and pathnames-proc-registry
> sections in specialnames.xml.

Thanks, my searches failed to find that section, so I'll check that out, compare 
to gauge ease of update, and use Jon's info.

> I think by using the refentry markup the man page would be generated
> automagically, but Jon (CCed) is the definitiv source of wisdom here.
> 
> A few comments in terms of the content...
> 
>> The
>> .I /proc/[pid]
>> subdirectories are visible when iterating through
>> .I /proc
>> with
>> .BR getdents (2)
>        ^^^^^^^^
> 
> We don't have that system call.  readdir(2) is the matching, exposed API.
> 
>> .I /proc/[pid]/environ
>> This read-only file contains the initial environment that was set
>> when the currently executing program was started via
>> .BR execve (2).
> 
> Neither Cygwin nor Windows maintain the initial environment.  What you
> get is the current environment, with all changes performed by the process
> itself.
> 
>> If, after an
>> .BR execve (2),
>> the process modifies its environment
>> (e.g., by calling functions such as
>> .BR putenv (3)
>> or modifying the
>> .BR environ (7)
>> variable directly),
>> this file will
>> .I not
>> reflect those changes.
> 
> Yeah, see above.
> 
>> .IR /proc/[pid]/mounts
>> file, and fixes various other problems with that file
>> (e.g., nonextensibility,
>> failure to distinguish per-mount versus per-superblock options).
>> .IP
>> The file contains lines of the form:
>> .IP
>> .in 0n
>> .EX
>> 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
>> (1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
>> .in
>> .EE
>> .IP
>> The numbers in parentheses are labels for the descriptions below:
>> .RS 7
>> .TP 5
>> (1)
>> mount ID: a unique ID for the mount (may be reused after
>> .BR umount (2)).
>> .TP
>> (2)
>> parent ID: the ID of the parent mount
>> (or of self for the root of this mount namespace's mount tree).
> 
> Has no meaning in Cygwin, it's just the same number as (1).
> 
>> If the parent mount point lies outside the process's root directory (see
>> .BR chroot (2)),
>> the ID shown here won't have a corresponding record in
> 
> That affects chroot as well.  I'd rather not mention this function
> call anyway, it was a bad idea in the first place.
> 
>> .I mountinfo
>> whose mount ID (field 1) matches this parent mount ID
>> (because mount points that lie outside the process's root directory
>> are not shown in
>> .IR mountinfo ).
>> As a special case of this point,
>> the process's root mount point may have a parent mount
>> (for the initramfs filesystem) that lies
>> .\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
>> .\" mtk: In the initial mount namespace, this hidden ID has the value 0
>> outside the process's root directory,
>> and an entry for that mount point will not appear in
> 
> I think this can entirely go away either.
> 
>> (7)
>> optional fields: zero or more fields of the form "tag[:value]"; see below.
> 
> This field doesn't exist on Cygwin.  Do we have to update the output
> to follow current Linux?
> 
>> .TP
>> (8)
>> separator: the end of the optional fields is marked by a single hyphen.
> 
> So that's field 7.
> 
>> .TP
>> (9)
>> filesystem type: the filesystem type in the form "type[.subtype]".
> 
> Field 8
> 
>> .TP
>> (10)
>> mount source: filesystem-specific information or "none".
> 
> Field 9
> 
>> .TP
>> (11)
>> super options: per-superblock options (see
>> .BR mount (2)).
> 
> Field 10, always ro or rw, so it's just the info if the filesystem is
> read-only or read-write
> 
>> .I /proc/[pid]/stat
>> Status information about the process.
>> This is used by
>> .BR ps (1).
> 
> Only by ps from the procps package
> 
>> One of the following characters, indicating process state:
>> .RS
>> .IP R 3
>> Runnable
>> .IP O
>> Running
> 
> We don't generate O, but I don't quite grok why.  There is a per-Thread
> StateRunning state in Windows, so I don't see why the code doesn't just
> use it.  A process with a single thread in StateRunning is running, no?
> 
>> .IP S
>> Sleeping in an interruptible wait
>> .IP D
>> Waiting in uninterruptible
>> disk sleep
> 
> We don't know the 'D' state.
> 
>> (14) \fIutime\fP \ %lu
>> Amount of time that this process has been scheduled in user mode,
>> measured in clock ticks (divide by
>> .IR sysconf(_SC_CLK_TCK) ).
> 
> This includes Cygwin time.
> 
>> This includes guest time, \fIguest_time\fP
>> (time spent running a virtual CPU, see below),
>> so that applications that are not aware of the guest time field
>> do not lose that time from their calculations.
> 
> The guest time hints should go away, I think.
> 
>> (16) \fIcutime\fP \ %ld
>> (17) \fIcstime\fP \ %ld
> 
> Faked.
> 
>> (20) \fInum_threads\fP \ %ld
>> Number of threads in this process.
> 
> Always 0, albeit we probably could print this info.
> 
>> This file is a symbolic link that points to the user's
>> Windows mapped drive mount point, and behaves in the same way as
>> .IR root .
> 
> I don't understand what you're trying to say here.
> 
>> Incidentally, this file may be used by
>> .BR mount (8)
>> when no filesystem is specified and it didn't manage to determine the
>> filesystem type.
>> Then filesystems contained in this file are tried
>> (excepted those that are marked with "nodev").
> 
> Doesn't work that way on Cygwin
> 
>> .I /proc/sys
>> This directory contains a number of files
>> and subdirectories corresponding to kernel variables.
>> These variables can be read using
>> the \fI/proc\fP filesystem, and the (deprecated)
>> .BR sysctl (2)
>> system call.
> 
> This is wrong for Cygwin.  /proc/sys is kind of a mount point, pointing
> into the native NT object namespace.  E.g., /proc/sys/GLOBAL?? is the
> native NT directory containing native NT object namespace symlinks
> constituting the DOS device names as returned by the QueryDosDevice
> WinAPI call.  Global?? is the global subdir available to all sessions.
> Session-specific ?? dirs exist
> 
> https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#nt-namespaces may be helpful here.
> 
>> These files list the System V Interprocess Communication (IPC) objects
>> (respectively: message queues, semaphores, and shared memory)
>> that currently exist on the system,
>> providing similar information to that available via
>> .BR ipcs (1).
>> These files have headers and are formatted (one IPC object per line)
>> for easy understanding.
> 
>> .BR svipc (7)
>> provides further background on the information shown by these files.
> 
> This should be replaced with the info that the files in sysvipc
> are only available if cygserver is running, just as SYSV ipc, too.
> 
>> This string identifies the kernel version that is currently running.
>                               ^^^^^^
>                               Cygwin
>> .SH COLOPHON
>> This page is part of version 3 of
> 
> I would skip that "of version 3" part
> 
> Other than these minor nits, this looks great!

Thanks for that great feedback.
I did careful comparisons of Cygwin vs Linux outputs, and the fhandler_proc... 
and fhandler_process... code, and left known values (status D, O) and suitably 
weasel-worded comments (mounts, mountinfo e.g. zero or more optional...) as is, 
or added some weasel-words, but missed weeding a few irrelevant points which 
I'll cull, change the rest to incorporate the comments, including changing 
"kernel" to Cygwin, make it xml, update, and repost some time in the future...

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-16 13:41   ` Jon Turney
@ 2020-11-16 23:21     ` Brian Inglis
  2020-11-20 16:42       ` Brian Inglis
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-11-16 23:21 UTC (permalink / raw)
  To: Cygwin Patches

On 2020-11-16 06:41, Jon Turney wrote:
> On 16/11/2020 12:07, Corinna Vinschen wrote:
>> Hi Brain,
>>
>> On Nov 13 07:25, Brian Inglis wrote:
>>> Hacked a Cygwin proc.5 man page FMOI over time, by combing through
>>> fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
>>> as in the build, man width 80 output from both, and diff (all attached).
>>
>> Nice idea!
>>
> 
> Yes, nice work.
> 
>>> Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
>>> ...?) and/or whether there may be xml remediation possible to generate
>>> verbatim output left justified with zero margin, and character value
>>> displays, the major output issues in the diff? Content feedback is also
>>> welcome.
>>
>> This could replace the pathnames-proc and pathnames-proc-registry
>> sections in specialnames.xml.
>>
>> I think by using the refentry markup the man page would be generated
>> automagically, but Jon (CCed) is the definitiv source of wisdom here.
> 
> Yes, all refentries in the UG should have manpages generated from them (only 
> cygwin utilities currently).

I saw those but not specialnames, so should be able to incorporate the comments 
to update the content, generate the xml and adapt to the existing context as an 
update, then look at manpage generation.

> The install rule in the Makefile would probably need extending to install *.5 to 
> man5dir.
> 
> These would then be included in the cygwin-doc package.

Great, that sounds workable.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-16 23:21     ` Brian Inglis
@ 2020-11-20 16:42       ` Brian Inglis
  2020-11-23  8:45         ` Corinna Vinschen
  0 siblings, 1 reply; 7+ messages in thread
From: Brian Inglis @ 2020-11-20 16:42 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]

On 2020-11-16 16:21, Brian Inglis wrote:
> On 2020-11-16 06:41, Jon Turney wrote:
>> On 16/11/2020 12:07, Corinna Vinschen wrote:
>>> Hi Brain,
>>>
>>> On Nov 13 07:25, Brian Inglis wrote:
>>>> Hacked a Cygwin proc.5 man page FMOI over time, by combing through
>>>> fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
>>>> as in the build, man width 80 output from both, and diff (all attached).
>>>
>>> Nice idea!
>>>
>>
>> Yes, nice work.
>>
>>>> Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
>>>> ...?) and/or whether there may be xml remediation possible to generate
>>>> verbatim output left justified with zero margin, and character value
>>>> displays, the major output issues in the diff? Content feedback is also
>>>> welcome.
>>>
>>> This could replace the pathnames-proc and pathnames-proc-registry
>>> sections in specialnames.xml.
>>>
>>> I think by using the refentry markup the man page would be generated
>>> automagically, but Jon (CCed) is the definitiv source of wisdom here.
>>
>> Yes, all refentries in the UG should have manpages generated from them (only 
>> cygwin utilities currently).
> 
> I saw those but not specialnames, so should be able to incorporate the comments 
> to update the content, generate the xml and adapt to the existing context as an 
> update, then look at manpage generation.
> 
>> The install rule in the Makefile would probably need extending to install *.5 
>> to man5dir.
>>
>> These would then be included in the cygwin-doc package.
> 
> Great, that sounds workable.

Attaching UG build doc outputs as results easier to see and review and change 
more obvious, rather than specialnames.xml and Makefile.in patches for now, as 
git does not appear to like non-patch attachments.

One of the issues with the xml input is that formatting wide screen displays as 
if at .in 0 appears to be impossible, or at least not in evidence in any of the 
other inputs or outputs, which don't include such heavily indented lists of 
lists, and ending and restarting heavy indenting context appears ugly.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

[-- Attachment #2: cygwin-ug-net.info --]
[-- Type: application/octet-stream, Size: 10765 bytes --]

[-- Attachment #3: cygwin-ug-net.info-1 --]
[-- Type: application/octet-stream, Size: 300804 bytes --]

[-- Attachment #4: cygwin-ug-net.info-2 --]
[-- Type: application/octet-stream, Size: 164834 bytes --]

[-- Attachment #5: proc.5 --]
[-- Type: text/plain, Size: 35092 bytes --]

'\" t
.\"     Title: proc
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
.\"      Date: 2020-11-11
.\"    Manual: Cygwin User\*(Aqs Manual
.\"    Source: Cygwin
.\"  Language: English
.\"
.TH "PROC" "5" "2020\-11\-11" "Cygwin" "Cygwin User\*(Aqs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
proc \- process information pseudo\-filesystem
.SH "DESCRIPTION"
.PP
The
proc
filesystem is a pseudo\-filesystem which provides an interface to Cygwin data structures\&. It is commonly mounted at
/proc\&. Typically, it is mounted automatically by the system\&.
.SS "Overview"
.PP
Underneath
/proc, there are the following general groups of files and subdirectories:
.PP
/proc/[pid] subdirectories
.RS 4
Each one of these subdirectories contains files and subdirectories exposing information about the process with the corresponding process id\&.
.sp
The
/proc/[pid]
subdirectories are visible when iterating through
/proc
with
\fBreaddir\fR(2)
(and thus are visible when one uses
\fBls\fR(1)
to view the contents of
/proc)\&.
.RE
.PP
/proc/self
.RS 4
When a process accesses this magic symbolic link, it resolves to the process\*(Aqs own
/proc/[pid]
directory\&.
.RE
.PP
/proc/[a\-z]*
.RS 4
Various other files and subdirectories under
/proc
expose system\-wide information\&.
.RE
.PP
All of the above are described in more detail below\&.
.SS "Files and directories"
.PP
The following list provides details of many of the files and directories under the
/proc
hierarchy\&.
.PP
/proc/[pid]
.RS 4
There is a numerical subdirectory for each running process; the subdirectory is named by the process id\&. Each
/proc/[pid]
subdirectory contains the pseudo\-files and directories described below\&.
.sp
The files inside each
/proc/[pid]
directory are normally owned by the effective user and effective group id of the process\&.
.RE
.PP
/proc/[pid]/cmdline
.RS 4
This read\-only file holds the complete command line for the process, unless the process is a zombie\&. In the latter case, there is nothing in this file: that is, a read on this file will return 0 characters\&. The command\-line arguments appear in this file as a set of strings followed by null bytes (\*(Aq\e0\*(Aq)\&.
.RE
.PP
/proc/[pid]/ctty
.RS 4
This read\-only file holds the name of the console or control terminal device for the process, unless the process is detached from any terminal\&. In the latter case, there is only a newline in this file\&.
.RE
.PP
/proc/[pid]/cwd
.RS 4
This is a symbolic link to the current working directory of the process\&. To find out the current working directory of process 20, for instance, you can do this:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBcd /proc/20/cwd; /bin/pwd\fR
		
.fi
.if n \{\
.RE
.\}
.sp
Note that the
\fIpwd\fR
command is often a shell built\-in, and might not work properly\&. In
\fBbash\fR(1), you may use
\fBpwd\ \&\-P\fR\&.
.RE
.PP
/proc/[pid]/environ
.RS 4
This read\-only file contains the current environment that may have been changed by the currently executing program\&. The entries are separated by null bytes (\*(Aq\e0\*(Aq), and there may be a null byte at the end\&. Thus, to print out the environment of process 1, you would do:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBcat \-A /proc/1/environ\fR
		
.fi
.if n \{\
.RE
.\}
.sp
If, after an
\fBexecve\fR(2), the process modifies its environment (e\&.g\&., by calling functions such as
\fBputenv\fR(3)
or modifying the
\fBenviron\fR(7)
variable directly), this file will reflect those changes\&. That may not be the case on other systems such as Linux\&.
.RE
.PP
/proc/[pid]/exe
.RS 4
This file is a symbolic link containing the actual pathname of the executed command\&. This symbolic link can be dereferenced normally; attempting to open it will open the executable\&. You can even type
/proc/[pid]/exe
to run another copy of the same executable that is being run by process [pid]\&.
/proc/[pid]/exe
is a pointer to the binary which was executed, and appears as a symbolic link\&.
.RE
.PP
/proc/[pid]/exename
.RS 4
This read\-only file contains the actual pathname of the executed command\&.
.RE
.PP
/proc/[pid]/fd/
.RS 4
This is a subdirectory containing one entry for each file which the process has open, named by its file descriptor, and which is a symbolic link to the actual file\&. Thus, 0 is standard input, 1 standard output, 2 standard error, and so on\&.
.sp
For file descriptors for pipes and sockets, the entries will be symbolic links whose content is the file type with the inode\&. A
\fBreadlink\fR(2)
call on this file returns a string in the format:
type:[inode]
.sp
For example,
socket:[2248868]
will be a socket and its inode is 2248868\&.
.sp
Programs that take a filename as a command\-line argument, but don\*(Aqt take input from standard input if no argument is supplied, and programs that write to a file named as a command\-line argument, but don\*(Aqt send their output to standard output if no argument is supplied, can nevertheless be made to use standard input or standard output by using
/proc/[pid]/fd
files as command\-line arguments\&. For example, assuming that
\fB\-i\fR
is the flag designating an input file and
\fB\-o\fR
is the flag designating an output file:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBfoobar \-i /proc/self/fd/0 \-o /proc/self/fd/1 \&.\&.\&.\fR
		
.fi
.if n \{\
.RE
.\}
.sp
and you have a working filter\&.
.sp
/proc/self/fd/N
is approximately the same as
/dev/fd/N
in some Unix and Unix\-like systems\&. Most Linux
\fBmakedev\fR
scripts symbolically link
/dev/fd
to
/proc/self/fd, in fact\&.
.sp
Most systems provide symbolic links
/dev/stdin,
/dev/stdout, and
/dev/stderr, which respectively link to the files
0,
1, and
2
in
/proc/self/fd\&. Thus the example command above could be written as:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBfoobar \-i /dev/stdin \-o /dev/stdout \&.\&.\&.\fR
		
.fi
.if n \{\
.RE
.\}
.sp
Note that for file descriptors referring to inodes (pipes and sockets, see above), those inodes still have permission bits and ownership information distinct from those of the
/proc/[pid]/fd
entry, and that the owner may differ from the user and group ids of the process\&. An unprivileged process may lack permissions to open them, as in this example:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBecho test | sudo \-u nobody cat\fR
		  test
		  $ \fBecho test | sudo \-u nobody cat /proc/self/fd/0\fR
		  cat: /proc/self/fd/0: Permission denied
		
.fi
.if n \{\
.RE
.\}
.sp
File descriptor 0 refers to the pipe created by the shell and owned by that shell\*(Aqs user, which is not
nobody, so
\fBcat\fR
does not have permission to create a new file descriptor to read from that inode, even though it can still read from its existing file descriptor 0\&.
.RE
.PP
/proc/[pid]/gid
.RS 4
This read\-only file contains the primary group id for the process\&.
.RE
.PP
/proc/[pid]/maps
.RS 4
A file containing the currently mapped memory regions and their access permissions\&. See
\fBmmap\fR(2)
for some further information about memory mappings\&.
.sp
The format of the file is:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIaddress          perms offset   dev       inode               pathname\fR

00010000\-00020000 rw\-s 00000000 0000:0000 0                   [win heap 1 default shared]
\&.\&.\&.
00080000\-00082000 rw\-p 00000000 0000:0000 0                   [win heap 0 default grow]
00082000\-0009A000 ===p 00002000 0000:0000 0                   [win heap 0 default grow]
000A0000\-000A1000 rw\-p 00000000 0000:0000 0                   [win heap 2 grow]
000A1000\-000BA000 ===p 00001000 0000:0000 0                   [win heap 2 grow]
000C0000\-000D9000 rw\-p 00000000 0000:0000 0                   [win heap 0 default grow]
000D9000\-001C0000 ===p 00019000 0000:0000 0                   [win heap 0 default grow]
00200000\-00377000 ===p 00000000 0000:0000 0
00377000\-00378000 rw\-p 00177000 0000:0000 0                   [peb]
00378000\-0037A000 rw\-p 00178000 0000:0000 0                   [teb (tid 8844)]
\&.\&.\&.
00400000\-005F9000 ===p 00000000 0000:0000 0                   [stack (tid 8884)]
005F9000\-005FC000 rw\-g 001F9000 0000:0000 0                   [stack (tid 8884)]
005FC000\-00600000 rw\-p 001FC000 0000:0000 0                   [stack (tid 8884)]
00600000\-006C7000 r\-\-s 00000000 EE45:4341 281474976741117     /proc/cygdrive/c/Windows/System32/locale\&.nls
\&.\&.\&.
100400000\-100401000 r\-\-p 00000000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
100401000\-100413000 r\-xp 00001000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
100413000\-100414000 rw\-p 00013000 EE45:4341 281474978095037   /usr/bin/sh\&.exe
\&.\&.\&.
180010000\-180020000 rw\-s 00000000 0000:0000 0                 [procinfo]
180020000\-180029000 rw\-s 00000000 0000:0000 0                 [cygwin\-user\-shared]
180030000\-18003C000 rw\-s 00000000 0000:0000 0                 [cygwin\-shared]
180040000\-180041000 r\-\-p 00000000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
180041000\-18022D000 r\-xp 00001000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
18022D000\-180231000 rwxp 001ED000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
180231000\-18026A000 rw\-p 001F1000 EE45:4341 2251799814294868   /usr/bin/cygwin1\&.dll
\&.\&.\&.
800000000\-800090000 rw\-p 00000000 0000:0000 0                 [heap]
800090000\-820000000 ===p 00090000 0000:0000 0                 [heap]
7FF4FDEB0000\-7FF4FDEB5000 r\-\-s 00000000 0000:0000 0
7FF4FDEB5000\-7FF4FDFB0000 ===s 00005000 0000:0000 0
7FF4FDFB0000\-7FF5FDFD0000 ===p 00000000 0000:0000 0
\&.\&.\&.
7FFBEEAC0000\-7FFBEEAC1000 r\-\-p 00000000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEAC1000\-7FFBEEB36000 r\-xp 00001000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB36000\-7FFBEEB68000 r\-\-p 00076000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB68000\-7FFBEEB6A000 rw\-p 000A8000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
7FFBEEB6A000\-7FFBEEB72000 r\-\-p 000AA000 EE45:4341 844424934724994   /proc/cygdrive/c/Windows/System32/kernel32\&.dll
\&.\&.\&.

.fi
.if n \{\
.RE
.\}
.sp
The
address
field is the address space in the process that the mapping occupies\&. The
perms
field is a set of permissions:
.PP
r
.RS 4
read
.RE
.PP
w
.RS 4
write
.RE
.PP
x
.RS 4
execute
.RE
.PP
===
.RS 4
reserved
.RE
.PP
s
.RS 4
shared
.RE
.PP
g
.RS 4
guard
.RE
.PP
p
.RS 4
private
.RE
.sp
The
offset
field is the offset into the file/whatever;
dev
is the device (major:minor);
inode
is the inode on that device\&. 0 indicates that no inode is associated with the memory region, as would be the case with BSS (uninitialized data)\&.
.sp
The
pathname
field will usually be the file that is backing the mapping\&.
.sp
There are additional helpful pseudo\-paths:
.PP
[cygwin\-shared]
.RS 4
Global shared Cygwin process information\&.
.RE
.PP
[cygwin\-user\-shared]
.RS 4
Global shared Cygwin user information\&.
.RE
.PP
[peb]
.RS 4
Windows Process Environment Block\&.
.RE
.PP
[procinfo]
.RS 4
Cygwin process information\&.
.RE
.PP
[shared\-user\-data]
.RS 4
Shared user information\&.
.RE
.PP
[heap]
.RS 4
The process\*(Aqs heap\&.
.RE
.PP
[stack]
.RS 4
The initial process\*(Aqs (also known as the main thread\*(Aqs) stack\&.
.RE
.PP
[stack (tid <tid>)]
.RS 4
A thread\*(Aqs stack (where the
<tid>
is a thread id)\&.
.RE
.PP
[teb (tid <tid>)]
.RS 4
Windows Thread Environment Block (where
<tid>
is a thread id)\&.
.RE
.PP
[win heap <n> default shared exec grow noserial debug]
.RS 4
Windows extended heap (where
<n>
is a heap id) and the rest of the words are heap flags:
.PP
default
.RS 4
default heap flags
.RE
.PP
shared
.RS 4
shareable and mapped heap flags
.RE
.PP
exec
.RS 4
executable heap flag
.RE
.PP
grow
.RS 4
growable heap flag
.RE
.PP
noserial
.RS 4
do not serialize heap flag
.RE
.PP
debug
.RS 4
debugged heap flag
.RE
.sp
.RE
.sp
If the
pathname
field is blank, this is an anonymous mapping as obtained via
\fBmmap\fR(2)\&. There is no easy way to coordinate this back to a process\*(Aqs source, short of running it through
\fBgdb\fR(1),
\fBstrace\fR(1), or similar\&.
.sp

pathname
is shown unescaped except for newline characters, which are replaced with an octal escape sequence\&. As a result, it is not possible to determine whether the original
pathname
contained a newline character or the literal
\ee012
character sequence\&.
.sp
If the mapping is file\-backed and the file has been deleted, the string "(deleted)" is appended to the
pathname\&. Note that this is ambiguous too\&.
.RE
.PP
/proc/[pid]/mountinfo
.RS 4
This file contains information about mount points in the process\*(Aqs mount namespace (see
\fBmount_namespaces\fR(7))\&. It supplies various information (e\&.g\&., propagation state, root of mount for bind mounts, identifier for each mount and its parent) that is missing from the (older)
/proc/[pid]/mounts
file, and fixes various other problems with that file (e\&.g\&., nonextensibility, failure to distinguish per\-mount versus per\-superblock options)\&.
.sp
The file contains lines of the form:
.sp
.if n \{\
.RS 4
.\}
.nf

36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (?)   (7) (8)   (9)         (10)

.fi
.if n \{\
.RE
.\}
.sp
The numbers in parentheses are labels for the descriptions below:
.PP
(1)
.RS 4
mount id: a unique id for the mount (may be reused after
\fBumount\fR(2))\&.
.RE
.PP
(2)
.RS 4
parent id: the id of the parent mount (or of self for the root of this mount namespace\*(Aqs mount tree)\&.
.RE
.PP
(3)
.RS 4
\fBmajor\fR:\fBminor\fR: the value of
st_dev
for files on this filesystem (see
\fBstat\fR(2))\&.
.RE
.PP
(4)
.RS 4
root: the pathname of the directory in the filesystem which forms the root of this mount\&.
.RE
.PP
(5)
.RS 4
mount point: the pathname of the mount point relative to the process\*(Aqs root directory\&.
.RE
.PP
(6)
.RS 4
mount options: per\-mount options (see
\fBmount\fR(2))\&.
.RE
.PP
(?)
.RS 4
optional fields: zero or more fields of the form "\fItag\fR[:\fIvalue\fR]"; see below\&.
.RE
.PP
(7)
.RS 4
separator: the end of the optional fields is marked by a single hyphen\&.
.RE
.PP
(8)
.RS 4
filesystem type: the filesystem type in the form "\fItype\fR[\&.\fIsubtype\fR]"\&.
.RE
.PP
(9)
.RS 4
mount source: filesystem\-specific information or "none"\&.
.RE
.PP
(10)
.RS 4
super options: per\-superblock options (see
\fBmount\fR(2))\&.
.RE
.sp
.RE
.PP
/proc/[pid]/mounts
.RS 4
This file lists all the filesystems currently mounted in the process\*(Aqs mount namespace (see
\fBmount_namespaces\fR(7))\&. The format of this file is documented in
\fBfstab\fR(5)\&.
.RE
.PP
/proc/[pid]/pgid
.RS 4
This read\-only file contains the process group id for the process\&.
.RE
.PP
/proc/[pid]/ppid
.RS 4
This read\-only file contains the parent process id for the process\&.
.RE
.PP
/proc/[pid]/root
.RS 4
UNIX and Linux support the idea of a per\-process root of the filesystem, set by the
\fBchroot\fR(2)
system call\&. This file is a symbolic link that points to the process\*(Aqs root directory, and behaves in the same way as
exe, and
fd/*\&.
.RE
.PP
/proc/[pid]/sid
.RS 4
This read\-only file contains the session id for the process\&.
.RE
.PP
/proc/[pid]/stat
.RS 4
Status information about the process\&. This is used by some implementations of
\fBps\fR(1)\&.
.sp
The fields, in order, with their proper
\fBscanf\fR(3)
format specifiers, are listed below\&.
.PP
(1) \fIpid\fR %d
.RS 4
The process id\&.
.RE
.PP
(2) \fIcomm\fR %s
.RS 4
The filename of the executable, in parentheses\&. This is visible whether or not the executable is swapped out\&.
.RE
.PP
(3) \fIstate\fR %c
.RS 4
One of the following characters, indicating process state:
.PP
R
.RS 4
Runnable
.RE
.PP
O
.RS 4
Running
.RE
.PP
S
.RS 4
Sleeping in an interruptible wait
.RE
.PP
D
.RS 4
Waiting in uninterruptible disk sleep
.RE
.PP
Z
.RS 4
Zombie
.RE
.PP
T
.RS 4
Stopped (on a signal) or trace stopped
.RE
.RE
.PP
(4) \fIppid\fR %d
.RS 4
The PID of the parent of this process\&.
.RE
.PP
(5) \fIpgrp\fR %d
.RS 4
The process group id of the process\&.
.RE
.PP
(6) \fIsession\fR %d
.RS 4
The session id of the process\&.
.RE
.PP
(7) \fItty_nr\fR %d
.RS 4
The controlling terminal of the process\&. (The minor device number is contained in the combination of bits 31 to 20 and 7 to 0; the major device number is in bits 15 to 8\&.)
.RE
.PP
(8) \fItpgid\fR %d
.RS 4
The id of the foreground process group of the controlling terminal of the process\&.
.RE
.PP
(9) \fIflags\fR %u
.RS 4
The kernel flags word of the process\&.
.RE
.PP
(10) \fIminflt\fR %lu
.RS 4
The number of minor faults the process has made which have not required loading a memory page from disk\&.
.RE
.PP
(11) \fIcminflt\fR %lu
.RS 4
The number of minor faults that the process\*(Aqs waited\-for children have made\&.
.RE
.PP
(12) \fImajflt\fR %lu
.RS 4
The number of major faults the process has made which have required loading a memory page from disk\&.
.RE
.PP
(13) \fIcmajflt\fR %lu
.RS 4
The number of major faults that the process\*(Aqs waited\-for children have made\&.
.RE
.PP
(14) \fIutime\fR %lu
.RS 4
Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK))\&.
.RE
.PP
(15) \fIstime\fR %lu
.RS 4
Amount of time that this process has been scheduled in kernel mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK))\&.
.RE
.PP
(16) \fIcutime\fR %ld
.RS 4
Amount of time that this process\*(Aqs waited\-for children have been scheduled in user mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK))\&. (See also
\fBtimes\fR(2))\&.
.RE
.PP
(17) \fIcstime\fR %ld
.RS 4
Amount of time that this process\*(Aqs waited\-for children have been scheduled in kernel mode, measured in clock ticks (divide by
sysconf(_SC_CLK_TCK))\&.
.RE
.PP
(18) \fIpriority\fR %ld
.RS 4
For processes running a real\-time scheduling policy (\fIpolicy\fR
below; see
\fBsched_setscheduler\fR(2)), this is the negated scheduling priority, minus one; that is, a number in the range \-2 to \-100, corresponding to real\-time priorities 1 to 99\&. For processes running under a non\-real\-time scheduling policy, this is the raw nice value (\fBsetpriority\fR(2)) as represented in the kernel\&. The kernel stores nice values as numbers in the range 0 (high) to 39 (low), corresponding to the user\-visible nice range of \-20 to 19\&.
.RE
.PP
(19) \fInice\fR %ld
.RS 4
The nice value (see
\fBsetpriority\fR(2)), a value in the range 19 (low priority) to \-20 (high priority)\&.
.RE
.PP
(20) \fInum_threads\fR %ld
.RS 4
Number of threads in this process\&. Currently shown as 0\&.
.RE
.PP
(21) \fIitrealvalue\fR %ld
.RS 4
The time in jiffies before the next
SIGALRM
is sent to the process due to an interval timer\&. This field is no longer maintained, and is hard coded as 0\&.
.RE
.PP
(22) \fIstarttime\fR %llu
.RS 4
The time the process started after system boot\&. The value is expressed in clock ticks (divide by
sysconf(_SC_CLK_TCK))\&.
.RE
.PP
(23) \fIvsize\fR %lu
.RS 4
Virtual memory size in bytes\&.
.RE
.PP
(24) \fIrss\fR %ld
.RS 4
Resident Set Size: number of pages the process has in real memory\&. This is just the pages which count toward text, data, or stack space\&. This does not include pages which have not been demand\-loaded in, or which are swapped out\&.
.RE
.PP
(25) \fIrsslim\fR %lu
.RS 4
Current soft limit in bytes on the rss of the process; see the description of
RLIMIT_RSS
in
\fBgetrlimit\fR(2)\&.
.RE
.RE
.PP
/proc/[pid]/statm
.RS 4
Provides information about memory usage, measured in pages\&. The columns are:
.PP
(1) size
.RS 4
total program size (same as VmSize in
/proc/[pid]/status)
.RE
.PP
(2) resident
.RS 4
resident set size (same as VmRSS in
/proc/[pid]/status)
.RE
.PP
(3) shared
.RS 4
number of resident shared pages (i\&.e\&., backed by a file) (same as RssFile+RssShmem in
/proc/[pid]/status)
.RE
.PP
(4) text
.RS 4
text (code)
.RE
.PP
(5) lib
.RS 4
library
.RE
.PP
(6) data
.RS 4
data + stack
.RE
.PP
(7) dt
.RS 4
dirty pages (always 0)
.RE
.sp
.RE
.PP
/proc/[pid]/status
.RS 4
Provides much of the information in
/proc/[pid]/stat
and
/proc/[pid]/statm
in a format that\*(Aqs easier for humans to parse\&. Here\*(Aqs an example:
.sp
.if n \{\
.RS 4
.\}
.nf
		  $ \fBcat /proc/$$/status\fR
		  
		  Name:   bash
		  Umask:  0022
		  State:  S (sleeping)
		  Tgid:   17248
		  Pid:    17248
		  PPid:   17200
		  Uid:    1000    1000    1000    1000
		  Gid:    100     100     100     100
		  VmSize:	  131168 kB
		  VmLck:	       0 kB
		  VmRSS:	   13484 kB
		  VmData:	   10332 kB
		  VmStk:	     136 kB
		  VmExe:	     992 kB
		  VmLib:	    2104 kB
		  SigPnd: 0000000000000000
		  SigBlk: 0000000000010000
		  SigIgn: 0000000000384004
		  
		
.fi
.if n \{\
.RE
.\}
.sp
The fields are as follows:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIName\fR: Command run by this process\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIUmask\fR: Process umask, expressed in octal with a leading zero; see
\fBumask\fR(2)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIState\fR: Current state of the process\&. One of:
.PP
R
.RS 4
runnable
.RE
.PP
O
.RS 4
running
.RE
.PP
S
.RS 4
sleeping
.RE
.PP
D
.RS 4
disk sleep
.RE
.PP
T
.RS 4
stopped or tracing stop
.RE
.PP
Z
.RS 4
zombie
.RE
.sp
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fITgid\fR: Thread group id (i\&.e\&., Process id)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIPid\fR: Thread id (see
\fBgettid\fR(2))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIPPid\fR: PID of parent process\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIUid\fR,
\fIGid\fR: Real, effective, saved set, and filesystem UIDs (GIDs)\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIVmSize\fR: Virtual memory size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIVmLck\fR: Locked memory size (see
\fBmlock\fR(2))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIVmRSS\fR: Resident set size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIVmData\fR,
\fIVmStk\fR,
\fIVmExe\fR: Size of data, stack, and text segments\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fIVmLib\fR: Shared library code size\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fISigPnd\fR: Number of signals pending for process as a whole (see
\fBpthreads\fR(7)
and
\fBsignal\fR(7))\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}

\fISigBlk\fR,
\fISigIgn\fR: Masks indicating signals being blocked and ignored (see
\fBsignal\fR(7))\&.
.RE
.sp
.RE
.PP
/proc/[pid]/uid
.RS 4
This read\-only file contains the user id for the process\&.
.RE
.PP
/proc/[pid]/winexename
.RS 4
This read\-only file contains the Windows pathname of the executed command\&.
.RE
.PP
/proc/[pid]/winpid
.RS 4
This read\-only file contains the Windows process id for the process\&.
.RE
.PP
/proc/cpuinfo
.RS 4
This is a collection of CPU and system architecture dependent items, for each supported architecture a different list\&. Two common entries are
\fIprocessor\fR
which gives CPU number and
\fIbogomips\fR, a system constant that is calculated during kernel initialization\&. SMP machines have information for each CPU\&. The
\fBlscpu\fR(1)
command gathers its information from this file\&.
.RE
.PP
/proc/cygdrive
.RS 4
This file is a symbolic link that points to the user\*(Aqs Windows mapped drive mount point, similar to
\fIroot\fR\&.
.RE
.PP
/proc/devices
.RS 4
Text listing of major numbers and device groups\&. This can be used by
\fBmakedev\fR
scripts for consistency with the system\&.
.RE
.PP
/proc/filesystems
.RS 4
A text listing of the filesystems which are supported by Cygwin\&. (See also
\fBfilesystems\fR(5)\&.) If a filesystem is marked with "nodev", this means that it does not require a block device to be mounted (e\&.g\&., virtual filesystem, network filesystem)\&.
.RE
.PP
/proc/loadavg
.RS 4
The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes\&. They are the same as the load average numbers given by
\fBuptime\fR(1)
and other programs\&. The fourth field consists of two numbers separated by a slash (/)\&. The first of these is the number of currently runnable scheduling entities (processes, threads)\&. The value after the slash is the number of scheduling entities that currently exist on the system\&.
.RE
.PP
/proc/meminfo
.RS 4
This file reports statistics about memory usage on the system\&. It is used by
\fBfree\fR(1)
to report the amount of free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel\&. Each line of the file consists of a parameter name, followed by a colon, the value of the parameter, and an option unit of measurement (e\&.g\&., "kB")\&. The list below describes the parameter names and the format specifier required to read the field value\&. Some fields are displayed only if the system was configured with various options; those dependencies are noted in the list\&.
.PP
\fIMemTotal\fR %lu
.RS 4
Total usable RAM (i\&.e\&., physical RAM minus a few reserved bits and the kernel binary code)\&.
.RE
.PP
\fIMemFree\fR %lu
.RS 4
The sum of
\fILowFree\fR
+
\fIHighFree\fR\&.
.RE
.PP
\fIHighTotal\fR %lu
.RS 4
Total amount of highmem\&.
.RE
.PP
\fIHighFree\fR %lu
.RS 4
Amount of free highmem\&.
.RE
.PP
\fILowTotal\fR %lu
.RS 4
Total amount of lowmem\&. Lowmem is memory which can be used for everything that highmem can be used for, but it is also available for the system\*(Aqs use for its own data structures\&. Bad things happen when you\*(Aqre out of lowmem\&.
.RE
.PP
\fILowFree\fR %lu
.RS 4
Amount of free lowmem\&.
.RE
.PP
\fISwapTotal\fR %lu
.RS 4
Total amount of swap space available\&.
.RE
.PP
\fISwapFree\fR %lu
.RS 4
Amount of swap space that is currently unused\&.
.RE
.RE
.PP
/proc/misc
.RS 4
Text listing of minor device numbers and names of devices with major device number of the
misc
device group\&. This can be used by
\fBmakedev\fR
scripts for consistency with the system\&.
.RE
.PP
/proc/mounts
.RS 4
With the introduction of per\-process mount namespaces, this file became a link to
/proc/self/mounts, which lists the mount points of the process\*(Aqs own mount namespace\&. The format of this file is documented in
\fBfstab\fR(5)\&.
.RE
.PP
/proc/net
.RS 4
This directory contains various files and subdirectories containing information about the networking layer\&. The files contain ASCII structures and are, therefore, readable with
\fBcat\fR(1)\&. However, the standard
\fBnetstat\fR(8)
suite provides much cleaner access to these files\&.
.RE
.PP
/proc/net/if_inet6
.RS 4
This file contains information about IP V6 interface adapters, if used\&. Each line represents an IP V6 interface adapter\&.
.sp
.if n \{\
.RS 4
.\}
.nf

fe800000000000002c393d3da6108636 12 40 20 80 {C6B5FBE5\-A3AC\-4DB0\-A308\-8EE94E1406A4}
fe8000000000000039da016f76bd92bc 13 40 20 20 {E06B8972\-0918\-41FC\-851B\-090C446C7D1C}
fe8000000000000050ba9cedf1fe1628 0b 40 20 20 {680ED6FD\-DFAC\-4398\-AA85\-FB33E17E38EA}
fe8000000000000030c5c6a0b30f109d 11 40 20 20 {B9E39F53\-1659\-4065\-BDA5\-F41162250E03}
20021840ac2c12343427e3b9ec6fa585 08 40 00 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c12342403e3b2c7a5a32f 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234284e8d0ecb4160cb 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c123468cb06ea72f1d678 08 80 00 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c12346cb59aca97c36e3b 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c123498af9881de1fb828 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234cd62a3d73a498611 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
20021840ac2c1234e410c873be09df93 08 80 00 20 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
fe800000000000003427e3b9ec6fa585 08 40 20 80 {4083A7F8\-99CF\-4220\-8715\-6FDF268B002F}
00000000000000000000000000000001 01 80 10 80 {2B5345AC\-7502\-11EA\-AC73\-806E6F6E6963}
			   (1)  (2)(3)(4)(5)  (6)

.fi
.if n \{\
.RE
.\}
.sp
The fields in each line are:
.PP
(1)
.RS 4
The IP V6 address of the interface adapter\&.
.RE
.PP
(2)
.RS 4
The IP V6 interface adapter index\&.
.RE
.PP
(3)
.RS 4
The prefix length of the IP V6 interface address\&.
.RE
.PP
(4)
.RS 4
The scope of the IP V6 interface address\&.
.RE
.PP
(5)
.RS 4
The state of the IP V6 interface address\&.
.RE
.PP
(6)
.RS 4
The DUID/GUID/UUID of the IP V6 interface adapter\&.
.RE
.sp

The last number exists only for compatibility reasons and is always 1\&.
.RE
.PP
/proc/partitions
.RS 4
Contains the major and minor numbers of each partition as well as the number of 1024\-byte blocks and the partition name\&.
.RE
.PP
/proc/registry
.RS 4
Under Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for the current process\&.
.RE
.PP
/proc/registry32
.RS 4
Under 64 bit Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for 32 bit processes\&.
.RE
.PP
/proc/registry64
.RS 4
Under 64 bit Windows, this directory contains subdirectories for registry paths, keys, and subkeys, and files named for registry values which contain registry data, for 64 bit processes\&.
.RE
.PP
/proc/self
.RS 4
This directory refers to the process accessing the
/proc
filesystem, and is identical to the
/proc
directory named by the process id of the same process\&.
.RE
.PP
/proc/stat
.RS 4
kernel/system statistics\&. Varies with architecture\&. Common entries include:
.PP
\fIcpu 10132153 0 3084719 46828483\fR
.RS 4
.RE
.PP
\fIcpu0 1393280 0 572056 13343292\fR
.RS 4
The amount of time, measured in units of USER_HZ (1/100ths of a second on most architectures, use
sysconf(_SC_CLK_TCK)
to obtain the right value), that the system ("cpu" line) or the specific CPU ("cpu
\fIN\fR" line) spent in various states:
.PP
(1) \fIuser\fR
.RS 4
Time spent in user mode\&.
.RE
.PP
(2) \fInice\fR
.RS 4
Time spent in user mode with low priority (nice)\&.
.RE
.PP
(3) \fIsystem\fR
.RS 4
Time spent in system mode\&.
.RE
.PP
(4) \fIidle\fR
.RS 4
Time spent in the idle task\&.
.RE
.sp
.RE
.PP
\fIpage 5741 1808\fR
.RS 4
The number of pages the system paged in and the number that were paged out (from disk)\&.
.RE
.PP
\fIswap 1 0\fR
.RS 4
The number of swap pages that have been brought in and out\&.
.RE
.PP
\fIintr 1462898\fR
.RS 4
The number of interrupts serviced\&.
.RE
.PP
\fIctxt 115315\fR
.RS 4
The number of context switches that the system underwent\&.
.RE
.PP
\fIbtime 769041601\fR
.RS 4
boot time, in seconds since the Epoch, 1970\-01\-01 00:00:00 +0000 (UTC)\&.
.RE
.sp
.RE
.PP
/proc/swaps
.RS 4
Swap areas in use\&. See also
\fBswapon\fR(8)\&.
.RE
.PP
/proc/sys
.RS 4
This directory contains a number of files and subdirectories linking to Windows objects, which can be read using these entries\&.
.sp
String values may be terminated by either \*(Aq\e0\*(Aq or \*(Aq\en\*(Aq\&.
.sp
Integer and long values may be either in decimal or in hexadecimal notation (e\&.g\&. 0x3FFF)\&. Multiple integer or long values may be separated by any of the following whitespace characters: \*(Aq\ \&\*(Aq, \*(Aq\et\*(Aq, or \*(Aq\en\*(Aq\&.
.RE
.PP
/proc/sysvipc
.RS 4
Subdirectory containing the pseudo\-files
msg,
semand
shm\&. These files list the System V Interprocess Communication (IPC) objects (respectively: message queues, semaphores, and shared memory) that currently exist on the system, providing similar information to that available via
\fBipcs\fR(1)\&. These files are only available if the cygserver Cygwin service is running\&. These files have headers and are formatted (one IPC object per line) for easy understanding\&.
\fBsvipc\fR(7)
provides further background on the information shown by these files\&.
.RE
.PP
/proc/uptime
.RS 4
This file contains two numbers (values in seconds): the uptime of the system (including time spent in suspend) and the amount of time spent in the idle process\&.
.RE
.PP
/proc/version
.RS 4
This string identifies the kernel version that is currently running\&. For example:
.sp
.if n \{\
.RS 4
.\}
.nf

CYGWIN_NT\-10\&.0\-18363 version 3\&.1\&.7\-340\&.x86_64 (corinna@calimero) (gcc version 9\&.3\&.0 20200312 (Fedora Cygwin 9\&.3\&.0\-1) (GCC) ) 2020\-08\-22 17:48 UTC

.fi
.if n \{\
.RE
.\}
.sp
.RE
.PP
Many files contain strings (e\&.g\&., the environment and command line) that are in the internal format, with subfields terminated by null bytes (\*(Aq\e0\*(Aq)\&. When inspecting such files, you may find that the results are more readable if you use a command of the following form to display them:
.sp
.if n \{\
.RS 4
.\}
.nf
	    $ \fBcat \-A \fR\fB\fIfile\fR\fR
	  
.fi
.if n \{\
.RE
.\}
.PP
This manual page is incomplete, possibly inaccurate, and is the kind of thing that needs to be updated very often\&.
.SH "SEE ALSO"
.PP

\fBcat\fR(1),
\fBfind\fR(1),
\fBfree\fR(1),
\fBps\fR(1),
\fBpstree\fR(1),
\fBtr\fR(1),
\fBuptime\fR(1),
\fBchroot\fR(2),
\fBmmap\fR(2),
\fBreadlink\fR(2),
\fBsyslog\fR(2),
\fBhier\fR(7),
\fBarp\fR(8),
\fBmount\fR(8),
\fBnetstat\fR(8),
\fBroute\fR(8)\&.
.SH "COLOPHON"
.PP
This page is part of the
\fICygwin\fR
project\&. A description of the project, information about reporting bugs, and the latest documentation, can be found on
\m[blue]\fBthe Cygwin project web pages\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SH "COPYRIGHT"
.br
.SH "NOTES"
.IP " 1." 4
the Cygwin project web pages
.RS 4
\%https://cygwin.com/docs.html
.RE

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: proc(5) and xml version
  2020-11-20 16:42       ` Brian Inglis
@ 2020-11-23  8:45         ` Corinna Vinschen
  0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2020-11-23  8:45 UTC (permalink / raw)
  To: cygwin-patches

On Nov 20 09:42, Brian Inglis wrote:
> On 2020-11-16 16:21, Brian Inglis wrote:
> > On 2020-11-16 06:41, Jon Turney wrote:
> > > On 16/11/2020 12:07, Corinna Vinschen wrote:
> > > > Hi Brain,
> > > > 
> > > > On Nov 13 07:25, Brian Inglis wrote:
> > > > > Hacked a Cygwin proc.5 man page FMOI over time, by combing through
> > > > > fhandler_proc..., converted to proc-5.xml using doclifter, back with xmlto
> > > > > as in the build, man width 80 output from both, and diff (all attached).
> > > > 
> > > > Nice idea!
> > > > 
> > > 
> > > Yes, nice work.
> > > 
> > > > > Unsure how this might best be fitted into the distro (cygwin, cygwin-doc,
> > > > > ...?) and/or whether there may be xml remediation possible to generate
> > > > > verbatim output left justified with zero margin, and character value
> > > > > displays, the major output issues in the diff? Content feedback is also
> > > > > welcome.
> > > > 
> > > > This could replace the pathnames-proc and pathnames-proc-registry
> > > > sections in specialnames.xml.
> > > > 
> > > > I think by using the refentry markup the man page would be generated
> > > > automagically, but Jon (CCed) is the definitiv source of wisdom here.
> > > 
> > > Yes, all refentries in the UG should have manpages generated from
> > > them (only cygwin utilities currently).
> > 
> > I saw those but not specialnames, so should be able to incorporate the
> > comments to update the content, generate the xml and adapt to the
> > existing context as an update, then look at manpage generation.
> > 
> > > The install rule in the Makefile would probably need extending to
> > > install *.5 to man5dir.
> > > 
> > > These would then be included in the cygwin-doc package.
> > 
> > Great, that sounds workable.
> 
> Attaching UG build doc outputs as results easier to see and review and
> change more obvious, rather than specialnames.xml and Makefile.in patches
> for now, as git does not appear to like non-patch attachments.

The actual patch is preferable, actually.


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-23  8:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 14:25 proc(5) and xml version Brian Inglis
2020-11-16 12:07 ` Corinna Vinschen
2020-11-16 13:41   ` Jon Turney
2020-11-16 23:21     ` Brian Inglis
2020-11-20 16:42       ` Brian Inglis
2020-11-23  8:45         ` Corinna Vinschen
2020-11-16 23:15   ` Brian Inglis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).